Documentation ¶
Index ¶
- Constants
- func TMessageChatKey(nodeId string, service service.ServiceId, function service.ServiceFunction) string
- func TMessageDataKey(nodeId string, kind *resource.Kind, id string) string
- type TMessage
- func (*TMessage) Descriptor() ([]byte, []int)
- func (m *TMessage) GetId() string
- func (m *TMessage) GetKey() string
- func (m *TMessage) GetMethod() string
- func (m *TMessage) GetPayload() []byte
- func (m *TMessage) GetSender() string
- func (t *TMessage) NodeId() string
- func (*TMessage) ProtoMessage()
- func (m *TMessage) Reset()
- func (t *TMessage) ResourceId() string
- func (t *TMessage) ResourceKind() string
- func (t *TMessage) ServiceFunction() string
- func (t *TMessage) ServiceId() string
- func (m *TMessage) String() string
- func (m *TMessage) XXX_DiscardUnknown()
- func (m *TMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TMessage) XXX_Merge(src proto.Message)
- func (m *TMessage) XXX_Size() int
- func (m *TMessage) XXX_Unmarshal(b []byte) error
Constants ¶
View Source
const ( MethodERR = "ERR" MethodREQ = "REQ" MethodRSP = "RSP" MethodPUB = "PUB" )
View Source
const TMessageChatPrefix = "/TCHAT"
View Source
const TMessageDataPrefix = "/TDATA"
Variables ¶
This section is empty.
Functions ¶
func TMessageChatKey ¶
func TMessageChatKey(nodeId string, service service.ServiceId, function service.ServiceFunction) string
if Method=MethodREQ/MethodRSP/MethodERR, then Key=/tchan/{node}/{service}/{function}, for a pair of MethodREQ/MethodRSP or MethodREQ/MethodERR, their GetId will be the same
Types ¶
type TMessage ¶
type TMessage struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` Method string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"` Key string `protobuf:"bytes,4,opt,name=key,proto3" json:"key,omitempty"` Payload []byte `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func NewTMessage ¶
func NewTMessage() *TMessage
func (*TMessage) Descriptor ¶
func (*TMessage) GetPayload ¶
func (*TMessage) ProtoMessage ¶
func (*TMessage) ProtoMessage()
func (*TMessage) ResourceId ¶
func (*TMessage) ResourceKind ¶
func (*TMessage) ServiceFunction ¶
func (*TMessage) XXX_DiscardUnknown ¶
func (m *TMessage) XXX_DiscardUnknown()
func (*TMessage) XXX_Marshal ¶
func (*TMessage) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.