Documentation ¶
Index ¶
- Constants
- func Bind(behavior gen_server.GenServer)
- func BindLogger(logWriter logger.LogWriter, logLevel int)
- func BindMonitor(monitor monitor.GenMonitor)
- func Close(id string) error
- func Connect(nickid string, url string) error
- func CustomError(errcode int, errmsg string) error
- func Debug(arg0 interface{}, args ...interface{})
- func ErrorInfo(err error) (int, string)
- func GetNodeInfo(id string) (*gen_server.NodeInfo, error)
- func GetNodeStatus(id string, ref interface{}) error
- func Info() *gen_server.NodeInfo
- func IsPeer(id string) bool
- func Label(id string) string
- func Launch()
- func Listen(url string)
- func LogError(arg0 interface{}, args ...interface{})
- func LogInfo(arg0 interface{}, args ...interface{})
- func LogSource(callstack int) string
- func LogWarn(arg0 interface{}, args ...interface{})
- func Nodes(label string) []string
- func Self() string
- func Send(id string, msg []byte) error
- func SendAll(ids []string, msg []byte) []error
- func Supervise(super supervisor.Supervisor) error
- type EventHandler
- func (e *EventHandler) OnCheckNode(origin string) (string, bool)
- func (e *EventHandler) OnClose(id string, reason error)
- func (e *EventHandler) OnConn(id string)
- func (e *EventHandler) OnDCError(err error)
- func (e *EventHandler) OnDigestError(err interface{})
- func (e *EventHandler) OnError(id string, err error)
- func (e *EventHandler) OnMsg(id string, msg []byte)
- func (e *EventHandler) OnNewNode(id string) error
- func (e *EventHandler) OnUnregister(id string)
- func (e *EventHandler) OnUpdateNodeStatus() interface{}
- type GoNode
- func (g *GoNode) Bind(behavior gen_server.GenServer)
- func (g *GoNode) BindLogger(logWriter logger.LogWriter, logLevel int)
- func (g *GoNode) BindMonitor(monitor monitor.GenMonitor)
- func (g *GoNode) Close(id string) error
- func (g *GoNode) Connnect(nodeId string, url string) error
- func (g *GoNode) Info() *gen_server.NodeInfo
- func (g *GoNode) Launch()
- func (g *GoNode) Listen(url string)
- func (g *GoNode) Logger() *logger.Logger
- func (g *GoNode) Origin() string
- func (g *GoNode) Self() string
- func (g *GoNode) Send(id string, msg []byte) error
- func (g *GoNode) SendAll(ids []string, msg []byte) []error
- func (g *GoNode) Supervise(super supervisor.Supervisor) error
Constants ¶
View Source
const ( // version VERSION string = "v0.9.0.1" // reg channel CHAN_REG string = "gonode_reg" // log channel CHAN_LOG string = "gonode_log" // monitor channel CHAN_MONI string = "gonode_moni" // the supervisor role SUPERVISOR string = "supervisor" // when you set the backends to allnodes, // the node will try to conn to everynode in the cluster ALLNODES string = "allnodes" )
Variables ¶
This section is empty.
Functions ¶
func Bind ¶
func Bind(behavior gen_server.GenServer)
func BindLogger ¶
func BindMonitor ¶
func BindMonitor(monitor monitor.GenMonitor)
func CustomError ¶
func GetNodeInfo ¶
func GetNodeInfo(id string) (*gen_server.NodeInfo, error)
func GetNodeStatus ¶
func Info ¶
func Info() *gen_server.NodeInfo
func Supervise ¶
func Supervise(super supervisor.Supervisor) error
Types ¶
type EventHandler ¶
type EventHandler struct {
// contains filtered or unexported fields
}
func (*EventHandler) OnCheckNode ¶
func (e *EventHandler) OnCheckNode(origin string) (string, bool)
func (*EventHandler) OnClose ¶
func (e *EventHandler) OnClose(id string, reason error)
func (*EventHandler) OnConn ¶
func (e *EventHandler) OnConn(id string)
func (*EventHandler) OnDCError ¶
func (e *EventHandler) OnDCError(err error)
func (*EventHandler) OnDigestError ¶
func (e *EventHandler) OnDigestError(err interface{})
func (*EventHandler) OnError ¶
func (e *EventHandler) OnError(id string, err error)
func (*EventHandler) OnMsg ¶
func (e *EventHandler) OnMsg(id string, msg []byte)
func (*EventHandler) OnNewNode ¶
func (e *EventHandler) OnNewNode(id string) error
func (*EventHandler) OnUnregister ¶
func (e *EventHandler) OnUnregister(id string)
func (*EventHandler) OnUpdateNodeStatus ¶
func (e *EventHandler) OnUpdateNodeStatus() interface{}
type GoNode ¶
type GoNode struct {
// contains filtered or unexported fields
}
func (*GoNode) Bind ¶
func (g *GoNode) Bind(behavior gen_server.GenServer)
func (*GoNode) BindMonitor ¶
func (g *GoNode) BindMonitor(monitor monitor.GenMonitor)
func (*GoNode) Info ¶
func (g *GoNode) Info() *gen_server.NodeInfo
func (*GoNode) Supervise ¶
func (g *GoNode) Supervise(super supervisor.Supervisor) error
Click to show internal directories.
Click to hide internal directories.