Documentation ¶
Index ¶
- Constants
- type Registry
- func (r *Registry) GetPeer(fullName string) *gira.Peer
- func (r *Registry) ListLocalUser() []string
- func (r *Registry) LockLocalUser(userId string) (*gira.Peer, error)
- func (r *Registry) NewServiceName(serviceName string, opt ...service_options.RegisterOption) string
- func (r *Registry) RangePeers(f func(k any, v any) bool)
- func (r *Registry) RegisterService(serviceName string, opt ...service_options.RegisterOption) (*gira.Peer, error)
- func (r *Registry) SelfPeer() *gira.Peer
- func (r *Registry) StartAsMember() error
- func (r *Registry) StartReslover() error
- func (r *Registry) Stop() error
- func (r *Registry) UnlockLocalUser(userId string) (*gira.Peer, error)
- func (r *Registry) UnregisterService(serviceName string) (*gira.Peer, error)
- func (r *Registry) Watch(peerWatchHandlers []gira.PeerWatchHandler, ...) error
- func (r *Registry) WhereIsPeer(appFullName string) (*gira.Peer, error)
- func (r *Registry) WhereIsService(serviceName string, opt ...service_options.WhereOption) ([]*gira.Peer, error)
- func (r *Registry) WhereIsUser(userId string) (*gira.Peer, error)
Constants ¶
View Source
const (
GRPC_KEY string = "grpc"
)
View Source
const (
PeerScheme string = "peer"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewConfigRegistry ¶
func (*Registry) ListLocalUser ¶
func (*Registry) LockLocalUser ¶
锁定玩家
func (*Registry) NewServiceName ¶
func (r *Registry) NewServiceName(serviceName string, opt ...service_options.RegisterOption) string
func (*Registry) RegisterService ¶
func (r *Registry) RegisterService(serviceName string, opt ...service_options.RegisterOption) (*gira.Peer, error)
注册服务
func (*Registry) UnlockLocalUser ¶
解锁玩家
func (*Registry) UnregisterService ¶
反注册服务
func (*Registry) Watch ¶
func (r *Registry) Watch(peerWatchHandlers []gira.PeerWatchHandler, localPlayerWatchHandlers []gira.LocalPlayerWatchHandler, serviceWatchHandlers []gira.ServiceWatchHandler) error
func (*Registry) WhereIsPeer ¶
查找节点
func (*Registry) WhereIsService ¶
func (r *Registry) WhereIsService(serviceName string, opt ...service_options.WhereOption) ([]*gira.Peer, error)
查找服务
Click to show internal directories.
Click to hide internal directories.