Documentation ¶
Index ¶
- type Locator
- func (l *Locator) BindGate(ctx context.Context, uid int64, gid string) error
- func (l *Locator) BindNode(ctx context.Context, uid int64, name, nid string) error
- func (l *Locator) LocateGate(ctx context.Context, uid int64) (string, error)
- func (l *Locator) LocateNode(ctx context.Context, uid int64, name string) (string, error)
- func (l *Locator) Name() string
- func (l *Locator) UnbindGate(ctx context.Context, uid int64, gid string) error
- func (l *Locator) UnbindNode(ctx context.Context, uid int64, name string, nid string) error
- func (l *Locator) Watch(ctx context.Context, kinds ...string) (locate.Watcher, error)
- type Option
- func WithAddrs(addrs ...string) Option
- func WithClient(client redis.UniversalClient) Option
- func WithContext(ctx context.Context) Option
- func WithDB(db int) Option
- func WithMaxRetries(maxRetries int) Option
- func WithPassword(password string) Option
- func WithPrefix(prefix string) Option
- func WithUsername(username string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Locator ¶
type Locator struct {
// contains filtered or unexported fields
}
func NewLocator ¶
func (*Locator) LocateGate ¶
LocateGate 定位用户所在网关
func (*Locator) LocateNode ¶
LocateNode 定位用户所在节点
func (*Locator) UnbindGate ¶
UnbindGate 解绑网关
func (*Locator) UnbindNode ¶
UnbindNode 解绑节点
Click to show internal directories.
Click to hide internal directories.