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