talk

package
v0.0.0-...-37e6509 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2020 License: MIT Imports: 7 Imported by: 2

Documentation

Index

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

func TMessageDataKey

func TMessageDataKey(nodeId string, kind *resource.Kind, id string) string

if Method=MethodPUB, then Key=/tdata/{node}/{resource_kind}/{resouce_id}

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) Descriptor() ([]byte, []int)

func (*TMessage) GetId

func (m *TMessage) GetId() string

func (*TMessage) GetKey

func (m *TMessage) GetKey() string

func (*TMessage) GetMethod

func (m *TMessage) GetMethod() string

func (*TMessage) GetPayload

func (m *TMessage) GetPayload() []byte

func (*TMessage) GetSender

func (m *TMessage) GetSender() string

func (*TMessage) NodeId

func (t *TMessage) NodeId() string

func (*TMessage) ProtoMessage

func (*TMessage) ProtoMessage()

func (*TMessage) Reset

func (m *TMessage) Reset()

func (*TMessage) ResourceId

func (t *TMessage) ResourceId() string

func (*TMessage) ResourceKind

func (t *TMessage) ResourceKind() string

func (*TMessage) ServiceFunction

func (t *TMessage) ServiceFunction() string

func (*TMessage) ServiceId

func (t *TMessage) ServiceId() string

func (*TMessage) String

func (m *TMessage) String() string

func (*TMessage) XXX_DiscardUnknown

func (m *TMessage) XXX_DiscardUnknown()

func (*TMessage) XXX_Marshal

func (m *TMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TMessage) XXX_Merge

func (m *TMessage) XXX_Merge(src proto.Message)

func (*TMessage) XXX_Size

func (m *TMessage) XXX_Size() int

func (*TMessage) XXX_Unmarshal

func (m *TMessage) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL