Documentation ¶
Index ¶
- Constants
- func EnableMonitor(listen string)
- func Forward(serviceName string, packet *pkt.LogicPkt) error
- func ForwardWithSelector(serviceName string, packet *pkt.LogicPkt, selector Selector) error
- func HashCode(key string) int
- func Init(srv qim.Server, lg *zap.Logger, deps ...string) error
- func Push(server string, p *pkt.LogicPkt) error
- func SetDialer(dialer qim.Dialer)
- func SetSelector(selector Selector)
- func SetServiceNaming(nm naming.Naming)
- func Start() error
- type ClientMap
- type ClientsImpl
- type Container
- type HashSelector
- type Selector
Constants ¶
View Source
const ( StateYoung = "young" StateAdult = "adult" )
View Source
const (
KeyServiceState = "service_state"
)
Variables ¶
This section is empty.
Functions ¶
func EnableMonitor ¶
func EnableMonitor(listen string)
func ForwardWithSelector ¶
func Init ¶
init container with a Server, and its deps
For example, in the gateway, it depends on the login and chat services, and it will cal the function like this: _ = container.Init(srv, wire.SNChat, wire.SNLogin)
func SetSelector ¶
func SetSelector(selector Selector)
func SetServiceNaming ¶
Types ¶
type ClientMap ¶
type ClientMap interface { Add(client qim.Client) Remove(id string) Get(id string) (qim.Client, bool) Services(kvs ...string) []qim.Service }
func NewClients ¶
type ClientsImpl ¶
type ClientsImpl struct {
// contains filtered or unexported fields
}
type Container ¶
type HashSelector ¶
type HashSelector struct { }
Click to show internal directories.
Click to hide internal directories.