@@ -15,6 +15,7 @@ import (
1515// 3. DataFrame
1616// 4. BackflowFrame
1717// 5. RejectedFrame
18+ // 6. GoawayFrame
1819//
1920// Read frame comments to understand the role of the frame.
2021type Frame interface {
@@ -25,7 +26,7 @@ type Frame interface {
2526// Type defined The type of frame.
2627type Type byte
2728
28- // DataFrame carries tagged data to transmit across DataStream .
29+ // DataFrame carries tagged data to transmit across connection .
2930type DataFrame struct {
3031 // Metadata stores additional data beyond the Payload,
3132 // it is an map[string]string{} that be encoded in msgpack.
@@ -40,8 +41,8 @@ type DataFrame struct {
4041func (f * DataFrame ) Type () Type { return TypeDataFrame }
4142
4243// The HandshakeFrame is the frame through which the client obtains a new connection from the server.
43- // It include essential details required for the creation of a fresh DataStream .
44- // The server then generates the DataStream utilizing this provided information.
44+ // It includes essential details required for the creation of a fresh connection .
45+ // The server then generates the connection utilizing this provided information.
4546type HandshakeFrame struct {
4647 // Name is the name of the dataStream that will be created.
4748 Name string
@@ -51,9 +52,9 @@ type HandshakeFrame struct {
5152 ClientType byte
5253 // ObserveDataTags is the ObserveDataTags of the dataStream that will be created.
5354 ObserveDataTags []Tag
54- // AuthName.
55+ // AuthName is the authentication name .
5556 AuthName string
56- // AuthPayload.
57+ // AuthPayload is the authentication payload .
5758 AuthPayload string
5859}
5960
@@ -67,8 +68,8 @@ type HandshakeAckFrame struct{}
6768// Type returns the type of HandshakeAckFrame.
6869func (f * HandshakeAckFrame ) Type () Type { return TypeHandshakeAckFrame }
6970
70- // The BackflowFrame is used to receive the processed result of a DataStream with StreamFunction type
71- // and forward it to a DataStream with StreamSource type.
71+ // The BackflowFrame is used to receive the processed result of a connection with StreamFunction type
72+ // and forward it to a connection with StreamSource type.
7273type BackflowFrame struct {
7374 // Tag is used for data router.
7475 Tag Tag
@@ -79,7 +80,7 @@ type BackflowFrame struct {
7980// Type returns the type of BackflowFrame.
8081func (f * BackflowFrame ) Type () Type { return TypeBackflowFrame }
8182
82- // RejectedFrame is used to reject a ControlStream request.
83+ // RejectedFrame is used to reject a client request.
8384type RejectedFrame struct {
8485 // Message encapsulates the rationale behind the rejection of the request.
8586 Message string
@@ -99,7 +100,7 @@ func (f *GoawayFrame) Type() Type { return TypeGoawayFrame }
99100
100101const (
101102 TypeDataFrame Type = 0x3F // TypeDataFrame is the type of DataFrame.
102- TypeHandshakeFrame Type = 0x31 // TypeHandshakeFrame is the type of PayloadFrame .
103+ TypeHandshakeFrame Type = 0x31 // TypeHandshakeFrame is the type of HandshakeFrame .
103104 TypeHandshakeAckFrame Type = 0x29 // TypeHandshakeAckFrame is the type of HandshakeAckFrame.
104105 TypeRejectedFrame Type = 0x39 // TypeRejectedFrame is the type of RejectedFrame.
105106 TypeBackflowFrame Type = 0x2D // TypeBackflowFrame is the type of BackflowFrame.
0 commit comments