Documentation ¶
Index ¶
- func SetLogger(log ILogger)
- type DefaultLogger
- func (this *DefaultLogger) Error(args ...interface{})
- func (this *DefaultLogger) Errorf(format string, args ...interface{})
- func (this *DefaultLogger) Errorln(args ...interface{})
- func (this *DefaultLogger) Info(args ...interface{})
- func (this *DefaultLogger) Infof(format string, args ...interface{})
- func (this *DefaultLogger) Infoln(args ...interface{})
- type ILogger
- type INode
- type IPut
- type IWatch
- type Node
- func (this *Node) Close()
- func (this *Node) DisablePort()
- func (this *Node) GetBase() interface{}
- func (this *Node) GetClient() *clientv3.Client
- func (this *Node) GetCtx() context.Context
- func (this *Node) GetPutData() (string, error)
- func (this *Node) Id() uint32
- func (this *Node) Init(inst interface{})
- func (this *Node) Ip() string
- func (this *Node) NewNodeId() (uint32, error)
- func (this *Node) OnNodeJoin(nodeIP string, nodeType int, id uint32, data []byte)
- func (this *Node) OnNodeLeave(nodeType int, id uint32)
- func (this *Node) OnNodeUpdate(nodeIP string, nodeType int, id uint32, data []byte)
- func (this *Node) Open(hosts []string, whatsmyipHost string, nodeType int, watchNodeTypes []int, ...)
- func (this *Node) OpenByStr(hostsStr string, whatsmyipHost string, nodeType int, watchNodeTypesStr string, ...)
- func (this *Node) SetId(id uint32)
- type Port
- type Put
- type Watch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DefaultLogger ¶
type DefaultLogger struct { }
func NewDefaultLogger ¶
func NewDefaultLogger() *DefaultLogger
func (*DefaultLogger) Error ¶
func (this *DefaultLogger) Error(args ...interface{})
func (*DefaultLogger) Errorf ¶
func (this *DefaultLogger) Errorf(format string, args ...interface{})
func (*DefaultLogger) Errorln ¶
func (this *DefaultLogger) Errorln(args ...interface{})
func (*DefaultLogger) Info ¶
func (this *DefaultLogger) Info(args ...interface{})
func (*DefaultLogger) Infof ¶
func (this *DefaultLogger) Infof(format string, args ...interface{})
func (*DefaultLogger) Infoln ¶
func (this *DefaultLogger) Infoln(args ...interface{})
type Node ¶
func (*Node) DisablePort ¶
func (this *Node) DisablePort()
func (*Node) GetPutData ¶
func (*Node) OnNodeJoin ¶
func (*Node) OnNodeLeave ¶
func (*Node) OnNodeUpdate ¶
子类可以根据需要重载下面的方法
注意 OnNodeUpdate、OnNodeJoin、OnNodeLeave、GetPutData 在内部协程被调用,请注意多协程安全!!!
Directories ¶
Path | Synopsis |
---|---|
examples
|
|
Package discovery is a generated protocol buffer package.
|
Package discovery is a generated protocol buffer package. |
Click to show internal directories.
Click to hide internal directories.