Versions in this module Expand all Collapse all v0 v0.0.1 Feb 15, 2020 Changes in this version + const EventScopeDaemon + const SpaceDaemon + func PublishDaemonEvent(event DaemonEvent) + func SubscribeDaemonEvent(path types.EventPath, name string, handler types.EventHandler) error + func UnsubscribeDaemonEvent(path types.EventPath, name string) + type ClusterState interface + GetAliveMemberIDs func() []string + IsLeader func() bool + type Context interface + GetClient func() types.Client + GetClusterState func() ClusterState + GetConfig func() DaemonConfig + GetNodeID func() string + GetTMConfig func() *cfg.Config + LastBlockIndex func() int64 + LastBlockTime func() time.Time + SetClusterState func(state ClusterState) + func NewContext(tmCfg *cfg.Config, logger log.Logger, tmNode *node.Node, config DaemonConfig) Context + type DaemonConfig struct + AliveThresholdSeconds uint + ChainID string + HeartbeatInterval uint + NodeID string + NodeName string + type DaemonEvent types.Event + type DefaultContext struct + func (ctx *DefaultContext) Debug(msg string, keyvals ...interface{}) + func (ctx *DefaultContext) Error(msg string, keyvals ...interface{}) + func (ctx *DefaultContext) GetClient() types.Client + func (ctx *DefaultContext) GetClusterState() ClusterState + func (ctx *DefaultContext) GetConfig() DaemonConfig + func (ctx *DefaultContext) GetNodeID() string + func (ctx *DefaultContext) GetTMConfig() *cfg.Config + func (ctx *DefaultContext) Info(msg string, keyvals ...interface{}) + func (ctx *DefaultContext) LastBlockIndex() int64 + func (ctx *DefaultContext) LastBlockTime() time.Time + func (ctx *DefaultContext) SetClusterState(state ClusterState) + func (ctx *DefaultContext) With(keyvals ...interface{}) log.Logger