Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
EmptyDictionary = NewMemberDictionary()
)
View Source
var ErrIndexCodeNotFound = errors.New("dictionary: index code not found")
View Source
var ErrIndexRouteNotFound = errors.New("dictionary: index route not found")
Functions ¶
func ShortVersion ¶
func WriteDictionary ¶
func WriteDictionary(items []*clusterpb.DictionaryItem)
WriteDictionary is to set dictionary when new route dictionary is found.
func WriteDictionaryItem ¶
WriteDictionaryItem is to set dictionary item when server registers.
Types ¶
type Dictionary ¶ added in v1.0.1
type LuaDictionary ¶ added in v1.0.1
type LuaDictionary struct {
// contains filtered or unexported fields
}
func NewLuaDictionary ¶ added in v1.0.1
func NewLuaDictionary(file string) *LuaDictionary
func (*LuaDictionary) IndexCode ¶ added in v1.0.1
func (d *LuaDictionary) IndexCode(code uint32) (string, error)
func (*LuaDictionary) IndexRoute ¶ added in v1.0.1
func (d *LuaDictionary) IndexRoute(route string) (uint32, error)
func (*LuaDictionary) InitModule ¶ added in v1.0.1
func (d *LuaDictionary) InitModule(l *lua.LState) int
func (*LuaDictionary) LoadLua ¶ added in v1.0.1
func (d *LuaDictionary) LoadLua(file string)
type MemberDictionary ¶ added in v1.0.1
type MemberDictionary struct {
// contains filtered or unexported fields
}
func DuplicateDictionary ¶ added in v1.0.1
func DuplicateDictionary() *MemberDictionary
DuplicateDictionary returns dictionary for compressed route.
func NewMemberDictionary ¶ added in v1.0.1
func NewMemberDictionary() *MemberDictionary
func (*MemberDictionary) IndexCode ¶ added in v1.0.1
func (d *MemberDictionary) IndexCode(code uint32) (string, error)
func (*MemberDictionary) IndexRoute ¶ added in v1.0.1
func (d *MemberDictionary) IndexRoute(route string) (uint32, error)
type Message ¶
type Message struct { Type Type // message type Branch uint32 // client branch ShortVer uint32 // message short version ID uint64 // unique id, zero while notify mode UnixTime uint32 // unix time in seconds SessionID uint64 // server session id int64 Route string // route for locating service DataType uint32 // data type Data []byte // payload }
Message represents a unmarshaled message or a message which to be marshaled
func (*Message) Serializer ¶ added in v1.1.37
func (m *Message) Serializer() serializer.Serializer
Click to show internal directories.
Click to hide internal directories.