Documentation ¶
Index ¶
- type RedisRegisterPlugin
- func (p *RedisRegisterPlugin) HandleConnAccept(conn net.Conn) (net.Conn, bool)
- func (p *RedisRegisterPlugin) PreCall(_ context.Context, _, _ string, args interface{}) (interface{}, error)
- func (p *RedisRegisterPlugin) Register(name string, rcvr interface{}, metadata string) (err error)
- func (p *RedisRegisterPlugin) Start() error
- func (p *RedisRegisterPlugin) Stop() error
- func (p *RedisRegisterPlugin) Unregister(name string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisRegisterPlugin ¶
type RedisRegisterPlugin struct { // service address, for example, tcp@127.0.0.1:8972, quic@127.0.0.1:1234 ServiceAddress string // redis addresses RedisServers []string // base path for rpcx server, for example com/example/rpcx BasePath string Metrics metrics.Registry // Registered services Services []string UpdateInterval time.Duration Options *store.Config // contains filtered or unexported fields }
RedisRegisterPlugin implements redis registry.
func (*RedisRegisterPlugin) HandleConnAccept ¶
HandleConnAccept handles connections from clients
func (*RedisRegisterPlugin) PreCall ¶
func (p *RedisRegisterPlugin) PreCall(_ context.Context, _, _ string, args interface{}) (interface{}, error)
PreCall handles rpc call from clients
func (*RedisRegisterPlugin) Register ¶
func (p *RedisRegisterPlugin) Register(name string, rcvr interface{}, metadata string) (err error)
Register handles registering event. this service is registered at BASE/serviceName/thisIpAddress node
func (*RedisRegisterPlugin) Start ¶
func (p *RedisRegisterPlugin) Start() error
Start starts to connect redis cluster
func (*RedisRegisterPlugin) Stop ¶
func (p *RedisRegisterPlugin) Stop() error
Stop unregister all services.
func (*RedisRegisterPlugin) Unregister ¶
func (p *RedisRegisterPlugin) Unregister(name string) (err error)
Click to show internal directories.
Click to hide internal directories.