wu-sheng commented on a change in pull request #5:
URL: https://github.com/apache/skywalking-satellite/pull/5#discussion_r532207584



##########
File path: internal/pkg/api/plugin.go
##########
@@ -0,0 +1,94 @@
+// Licensed to Apache Software Foundation (ASF) under one or more contributor
+// license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright
+// ownership. Apache Software Foundation (ASF) licenses this file to you under
+// the Apache License, Version 2.0 (the "License"); you may
+// not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package api
+
+import "io"
+
+// The following graph illustrates the relationship between different plugin 
interface in api package.
+//
+//
+//                   Gatherer                                Processor
+//       -------------------------------      
-------------------------------------------
+//      |  -----------       ---------   |   |  -----------                 
-----------  |
+//      | | Collector | ==> |  Queue   | |==>| |  Filter   | ==>  ...  ==> |  
Filter   | |
+//      | | (Parser)  |     | Mem/File | |   |  -----------                 
-----------  |
+//      |  -----------       ----------  |   |      ||                         
 ||       |
+//       --------------------------------    |      \/                         
\/       |
+//                                           |  
---------------------------------------  |
+//                                           | |             
OutputEventContext        | |
+//                                           |  
---------------------------------------  |
+//                                            
-------------------------------------------
+//                                                                ||
+//                                             ||        
--------------------------------
+//                                             ||     ->|         Sharing 
Client        |
+//                                             ||    |   
--------------------------------
+//                                             ||    |
+//                                             \/    |            SegmentSender
+//                                            ---    |  
---------------------------------
+//                                           |   |   | |  -----------       
-----------  |
+//                                           | D |   |-| |BatchBuffer| ==> | 
Forwarder | |
+//                                           | i |   | |  -----------       
-----------  |
+//                                           | s |   |  
---------------------------------
+//                                           | p |   |
+//                                           | a |=> |              .......    
             ===> Kafka/OAP
+//                                           | t |   |
+//                                           | c |   |             MeterSender
+//                                           | h |   | 
-----------------------------------
+//                                           | e |   -|  -------------       
-----------  |
+//                                           | r |    | | BatchBuffer | ==> | 
Forwarder | |
+//                                           |   |    |  -------------       
-----------  |
+//                                            ---      
-----------------------------------
+//
+//
+// 1. The Collector plugin would fetch or receive the input data.
+// 2. The Parser plugin would parse the input data to SerializationEvent that 
is supported
+//    to be stored in Queue.
+// 3. The Queue plugin stores the SerializationEvent. However, the 
serialization depends on
+//    the Queue implements. For example, the serialization is unnecessary when 
using a Memory
+//    Queue.
+// 4. The Filter plugin would pull an event from the Queue and process the 
event to create
+//    a new event. Next, the event is passed to the next filter to do the same 
things until
+//    the whole filters are performed. The events labeled with RemoteEvent 
type would be

Review comment:
       I think we should add an `output` catalog in the event directly, right? 
And every type as `output` should have a collection of forwarder(s), right?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to