Documentation
¶
Index ¶
- Constants
- Variables
- func ReadMessage(r io.Reader, msg proto.Message) (int, error)
- func WriteMessage(w io.Writer, msg proto.Message) (int, error)
- type BufferStateUpdate
- func (*BufferStateUpdate) Descriptor() ([]byte, []int)deprecated
- func (x *BufferStateUpdate) GetAppendData() []byte
- func (x *BufferStateUpdate) GetAppendSeq() uint64
- func (x *BufferStateUpdate) GetBufLen() uint32
- func (x *BufferStateUpdate) GetStartSeq() uint64
- func (*BufferStateUpdate) ProtoMessage()
- func (x *BufferStateUpdate) ProtoReflect() protoreflect.Message
- func (x *BufferStateUpdate) Reset()
- func (x *BufferStateUpdate) String() string
- type StreamKey
- func (*StreamKey) Descriptor() ([]byte, []int)deprecated
- func (x *StreamKey) GetLocalPort() uint32
- func (x *StreamKey) GetRemoteAddr() []byte
- func (x *StreamKey) GetRemotePort() uint32
- func (*StreamKey) ProtoMessage()
- func (x *StreamKey) ProtoReflect() protoreflect.Message
- func (x *StreamKey) Reset()
- func (x *StreamKey) String() string
- type SyncReply
- func (*SyncReply) Descriptor() ([]byte, []int)deprecated
- func (x *SyncReply) GetMsgId() uint64
- func (x *SyncReply) GetRecvBufUpdate() *BufferStateUpdate
- func (x *SyncReply) GetSendBufUpdate() *BufferStateUpdate
- func (x *SyncReply) GetSendClosed() bool
- func (x *SyncReply) GetState() TcpConnState
- func (*SyncReply) ProtoMessage()
- func (x *SyncReply) ProtoReflect() protoreflect.Message
- func (x *SyncReply) Reset()
- func (x *SyncReply) String() string
- type SyncRequest
- func (*SyncRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SyncRequest) GetKey() *StreamKey
- func (x *SyncRequest) GetMsgId() uint64
- func (x *SyncRequest) GetRecvBufUpdate() *BufferStateUpdate
- func (x *SyncRequest) GetRecvInitSeq() uint64
- func (x *SyncRequest) GetSendBufUpdate() *BufferStateUpdate
- func (x *SyncRequest) GetSendClosed() bool
- func (x *SyncRequest) GetSendInitSeq() uint64
- func (x *SyncRequest) GetState() TcpConnState
- func (*SyncRequest) ProtoMessage()
- func (x *SyncRequest) ProtoReflect() protoreflect.Message
- func (x *SyncRequest) Reset()
- func (x *SyncRequest) String() string
- type TcpConnState
- func (TcpConnState) Descriptor() protoreflect.EnumDescriptor
- func (x TcpConnState) Enum() *TcpConnState
- func (TcpConnState) EnumDescriptor() ([]byte, []int)deprecated
- func (x TcpConnState) Number() protoreflect.EnumNumber
- func (x TcpConnState) String() string
- func (TcpConnState) Type() protoreflect.EnumType
Constants ¶
View Source
const (
MaxMsgLen = 1024 * 1024
)
Variables ¶
View Source
var ( TcpConnState_name = map[int32]string{ 0: "INIT", 1: "SYN_RECV", 2: "EST", 3: "FIN_WAIT_1", 4: "FIN_WAIT_2", 5: "CLOSE_WAIT", 6: "CLOSING", 7: "LAST_ACK", 8: "TIME_WAIT", 9: "CLOSED", } TcpConnState_value = map[string]int32{ "INIT": 0, "SYN_RECV": 1, "EST": 2, "FIN_WAIT_1": 3, "FIN_WAIT_2": 4, "CLOSE_WAIT": 5, "CLOSING": 6, "LAST_ACK": 7, "TIME_WAIT": 8, "CLOSED": 9, } )
Enum value maps for TcpConnState.
View Source
var File_messages_proto protoreflect.FileDescriptor
Functions ¶
Types ¶
type BufferStateUpdate ¶
type BufferStateUpdate struct {
// Sequence number of the first byte of un-ack'd/unread data in the buffer.
StartSeq uint64 `protobuf:"varint,1,opt,name=start_seq,json=startSeq,proto3" json:"start_seq,omitempty"`
BufLen uint32 `protobuf:"varint,2,opt,name=buf_len,json=bufLen,proto3" json:"buf_len,omitempty"`
// Sequence number to append data at.
AppendSeq uint64 `protobuf:"varint,3,opt,name=append_seq,json=appendSeq,proto3" json:"append_seq,omitempty"`
AppendData []byte `protobuf:"bytes,4,opt,name=append_data,json=appendData,proto3" json:"append_data,omitempty"`
// contains filtered or unexported fields
}
func (*BufferStateUpdate) Descriptor
deprecated
func (*BufferStateUpdate) Descriptor() ([]byte, []int)
Deprecated: Use BufferStateUpdate.ProtoReflect.Descriptor instead.
func (*BufferStateUpdate) GetAppendData ¶
func (x *BufferStateUpdate) GetAppendData() []byte
func (*BufferStateUpdate) GetAppendSeq ¶
func (x *BufferStateUpdate) GetAppendSeq() uint64
func (*BufferStateUpdate) GetBufLen ¶
func (x *BufferStateUpdate) GetBufLen() uint32
func (*BufferStateUpdate) GetStartSeq ¶
func (x *BufferStateUpdate) GetStartSeq() uint64
func (*BufferStateUpdate) ProtoMessage ¶
func (*BufferStateUpdate) ProtoMessage()
func (*BufferStateUpdate) ProtoReflect ¶
func (x *BufferStateUpdate) ProtoReflect() protoreflect.Message
func (*BufferStateUpdate) Reset ¶
func (x *BufferStateUpdate) Reset()
func (*BufferStateUpdate) String ¶
func (x *BufferStateUpdate) String() string
type StreamKey ¶
type StreamKey struct {
RemoteAddr []byte `protobuf:"bytes,1,opt,name=remote_addr,json=remoteAddr,proto3" json:"remote_addr,omitempty"`
RemotePort uint32 `protobuf:"varint,2,opt,name=remote_port,json=remotePort,proto3" json:"remote_port,omitempty"`
LocalPort uint32 `protobuf:"varint,3,opt,name=local_port,json=localPort,proto3" json:"local_port,omitempty"`
// contains filtered or unexported fields
}
func (*StreamKey) Descriptor
deprecated
func (*StreamKey) GetLocalPort ¶
func (*StreamKey) GetRemoteAddr ¶
func (*StreamKey) GetRemotePort ¶
func (*StreamKey) ProtoMessage ¶
func (*StreamKey) ProtoMessage()
func (*StreamKey) ProtoReflect ¶
func (x *StreamKey) ProtoReflect() protoreflect.Message
type SyncReply ¶
type SyncReply struct {
// Message ID. Matches the request ID.
MsgId uint64 `protobuf:"varint,1,opt,name=msg_id,json=msgId,proto3" json:"msg_id,omitempty"`
// Synced connection state. If this is INIT, it should be ignored.
State TcpConnState `protobuf:"varint,3,opt,name=state,proto3,enum=pb.TcpConnState" json:"state,omitempty"`
// Buffer state update of the send buffer
SendBufUpdate *BufferStateUpdate `protobuf:"bytes,8,opt,name=send_buf_update,json=sendBufUpdate,proto3" json:"send_buf_update,omitempty"`
SendClosed bool `protobuf:"varint,9,opt,name=send_closed,json=sendClosed,proto3" json:"send_closed,omitempty"`
// Buffer state update of the recv buffer
RecvBufUpdate *BufferStateUpdate `protobuf:"bytes,12,opt,name=recv_buf_update,json=recvBufUpdate,proto3" json:"recv_buf_update,omitempty"`
// contains filtered or unexported fields
}
func (*SyncReply) Descriptor
deprecated
func (*SyncReply) GetRecvBufUpdate ¶
func (x *SyncReply) GetRecvBufUpdate() *BufferStateUpdate
func (*SyncReply) GetSendBufUpdate ¶
func (x *SyncReply) GetSendBufUpdate() *BufferStateUpdate
func (*SyncReply) GetSendClosed ¶
func (*SyncReply) GetState ¶
func (x *SyncReply) GetState() TcpConnState
func (*SyncReply) ProtoMessage ¶
func (*SyncReply) ProtoMessage()
func (*SyncReply) ProtoReflect ¶
func (x *SyncReply) ProtoReflect() protoreflect.Message
type SyncRequest ¶
type SyncRequest struct {
// Message ID. Expect a reply to have the same ID.
MsgId uint64 `protobuf:"varint,1,opt,name=msg_id,json=msgId,proto3" json:"msg_id,omitempty"`
// 3-tuple key which identifies this stream.
Key *StreamKey `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
// Connection state to update. If this is INIT, it should be ignored.
State TcpConnState `protobuf:"varint,3,opt,name=state,proto3,enum=pb.TcpConnState" json:"state,omitempty"`
// Buffer state update of the send buffer
SendBufUpdate *BufferStateUpdate `protobuf:"bytes,8,opt,name=send_buf_update,json=sendBufUpdate,proto3" json:"send_buf_update,omitempty"`
SendClosed bool `protobuf:"varint,9,opt,name=send_closed,json=sendClosed,proto3" json:"send_closed,omitempty"`
SendInitSeq uint64 `protobuf:"varint,10,opt,name=send_init_seq,json=sendInitSeq,proto3" json:"send_init_seq,omitempty"`
// Buffer state update of the recv buffer
RecvBufUpdate *BufferStateUpdate `protobuf:"bytes,12,opt,name=recv_buf_update,json=recvBufUpdate,proto3" json:"recv_buf_update,omitempty"`
RecvInitSeq uint64 `protobuf:"varint,13,opt,name=recv_init_seq,json=recvInitSeq,proto3" json:"recv_init_seq,omitempty"`
// contains filtered or unexported fields
}
func (*SyncRequest) Descriptor
deprecated
func (*SyncRequest) Descriptor() ([]byte, []int)
Deprecated: Use SyncRequest.ProtoReflect.Descriptor instead.
func (*SyncRequest) GetKey ¶
func (x *SyncRequest) GetKey() *StreamKey
func (*SyncRequest) GetMsgId ¶
func (x *SyncRequest) GetMsgId() uint64
func (*SyncRequest) GetRecvBufUpdate ¶
func (x *SyncRequest) GetRecvBufUpdate() *BufferStateUpdate
func (*SyncRequest) GetRecvInitSeq ¶
func (x *SyncRequest) GetRecvInitSeq() uint64
func (*SyncRequest) GetSendBufUpdate ¶
func (x *SyncRequest) GetSendBufUpdate() *BufferStateUpdate
func (*SyncRequest) GetSendClosed ¶
func (x *SyncRequest) GetSendClosed() bool
func (*SyncRequest) GetSendInitSeq ¶
func (x *SyncRequest) GetSendInitSeq() uint64
func (*SyncRequest) GetState ¶
func (x *SyncRequest) GetState() TcpConnState
func (*SyncRequest) ProtoMessage ¶
func (*SyncRequest) ProtoMessage()
func (*SyncRequest) ProtoReflect ¶
func (x *SyncRequest) ProtoReflect() protoreflect.Message
func (*SyncRequest) Reset ¶
func (x *SyncRequest) Reset()
func (*SyncRequest) String ¶
func (x *SyncRequest) String() string
type TcpConnState ¶
type TcpConnState int32
const ( TcpConnState_INIT TcpConnState = 0 TcpConnState_SYN_RECV TcpConnState = 1 TcpConnState_EST TcpConnState = 2 TcpConnState_FIN_WAIT_1 TcpConnState = 3 TcpConnState_FIN_WAIT_2 TcpConnState = 4 TcpConnState_CLOSE_WAIT TcpConnState = 5 TcpConnState_CLOSING TcpConnState = 6 TcpConnState_LAST_ACK TcpConnState = 7 TcpConnState_TIME_WAIT TcpConnState = 8 TcpConnState_CLOSED TcpConnState = 9 )
func (TcpConnState) Descriptor ¶
func (TcpConnState) Descriptor() protoreflect.EnumDescriptor
func (TcpConnState) Enum ¶
func (x TcpConnState) Enum() *TcpConnState
func (TcpConnState) EnumDescriptor
deprecated
func (TcpConnState) EnumDescriptor() ([]byte, []int)
Deprecated: Use TcpConnState.Descriptor instead.
func (TcpConnState) Number ¶
func (x TcpConnState) Number() protoreflect.EnumNumber
func (TcpConnState) String ¶
func (x TcpConnState) String() string
func (TcpConnState) Type ¶
func (TcpConnState) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.