Versions in this module Expand all Collapse all v1 v1.12.0 Jul 26, 2016 Changes in this version + const DefaultHeartBeatPeriod + var ErrNodeAlreadyRegistered = errors.New("node already registered") + var ErrNodeNotFound = errors.New("node not found") + var ErrNodeNotRegistered = errors.New("node not registered") + var ErrSessionInvalid = errors.New("session invalid") + type Cluster interface + GetMemberlist func() map[uint64]*api.RaftMember + MemoryStore func() *store.MemoryStore + type Config struct + Addr string + GracePeriodMultiplier int + HeartbeatEpsilon time.Duration + HeartbeatPeriod time.Duration + RateLimitPeriod time.Duration + func DefaultConfig() *Config + type Dispatcher struct + func New(cluster Cluster, c *Config) *Dispatcher + func (d *Dispatcher) Heartbeat(ctx context.Context, r *api.HeartbeatRequest) (*api.HeartbeatResponse, error) + func (d *Dispatcher) NodeCount() int + func (d *Dispatcher) Run(ctx context.Context) error + func (d *Dispatcher) Session(r *api.SessionRequest, stream api.Dispatcher_SessionServer) error + func (d *Dispatcher) Stop() error + func (d *Dispatcher) Tasks(r *api.TasksRequest, stream api.Dispatcher_TasksServer) error + func (d *Dispatcher) UpdateTaskStatus(ctx context.Context, r *api.UpdateTaskStatusRequest) (*api.UpdateTaskStatusResponse, error)