rpc

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args struct {
	Session Session
	MsgId   int
	MsgReq  interface{}
}

func (*Args) GetObject

func (a *Args) GetObject(t interface{}) error

type ArgsGroup

type ArgsGroup struct {
	Sids    []int64
	Route   string
	Payload []byte
}

Group message request

type CustomerRoute

type CustomerRoute func(session *Session, servicePath, serviceName string) (string, error)

Route msg to the specified node

type Reply

type Reply struct {
	Code    int
	ErrMsg  string
	MsgResp interface{}
}

type ReplyGroup

type ReplyGroup struct {
}

Group message response

type Session

type Session struct {
	NodeId    string
	SessionId int64

	UserId int64

	Settings map[string]string
	// contains filtered or unexported fields
}

func NewSession

func NewSession(nodeId string) *Session

func (*Session) Bind

func (s *Session) Bind(userId int64)

func (*Session) Clone

func (s *Session) Clone() *Session

func (*Session) Close

func (s *Session) Close(reason string)

func (*Session) Get

func (s *Session) Get(key string) string

func (*Session) GetSessionId

func (s *Session) GetSessionId() int64

func (*Session) GetUserId

func (s *Session) GetUserId() int64

func (*Session) Push

func (s *Session) Push()

synchronize setting with frontend session

func (*Session) Remove

func (s *Session) Remove(key string)

func (*Session) Set

func (s *Session) Set(key, value string)

func (*Session) SetUserId

func (s *Session) SetUserId(userId int64)

func (*Session) SyncSettings

func (s *Session) SyncSettings(settings map[string]interface{})

func (*Session) UnBind

func (s *Session) UnBind()

Jump to

Keyboard shortcuts

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