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 kim.Server, deps ...string) error
- func Push(server string, p *pkt.LogicPkt) error
- func SetDialer(dialer kim.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 ForwardWithSelector ¶
ForwardWithSelector forward data to the specified node of service which is chosen by selector
Types ¶
type ClientMap ¶
type ClientMap interface { Add(client kim.Client) Remove(id string) Get(id string) (client kim.Client, ok bool) // Find(name string) (client []kim.Client) Services(kvs ...string) []kim.Service }
Clients Clients
type ClientsImpl ¶
type ClientsImpl struct {
// contains filtered or unexported fields
}
type Container ¶
type Container struct { sync.RWMutex Naming naming.Naming Srv kim.Server // contains filtered or unexported fields }
Container Container
Click to show internal directories.
Click to hide internal directories.