Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Manifold ¶
func Manifold(config ManifoldConfig) dependency.Manifold
Manifold builds a dependency.Manifold for running a raftforwarder worker.
Types ¶
type Config ¶
type Config struct { Hub *pubsub.StructuredHub Raft RaftApplier Logger Logger Topic string Target raftlease.NotifyTarget }
Config defines the resources the worker needs to run.
type Logger ¶
type Logger interface { Errorf(string, ...interface{}) Warningf(string, ...interface{}) Tracef(string, ...interface{}) }
Logger specifies the interface we use from loggo.Logger.
type ManifoldConfig ¶
type ManifoldConfig struct { AgentName string RaftName string StateName string CentralHubName string RequestTopic string Logger Logger NewWorker func(Config) (worker.Worker, error) NewTarget func(*state.State, io.Writer, Logger) raftlease.NotifyTarget }
ManifoldConfig holds the resources needed to start a raft forwarder worker in a dependency engine.
func (ManifoldConfig) Validate ¶
func (config ManifoldConfig) Validate() error
Validate checks that the config has all the required values.
type RaftApplier ¶
type RaftApplier interface {
Apply(cmd []byte, timeout time.Duration) raft.ApplyFuture
}
RaftApplier allows applying a command to the raft FSM.
Click to show internal directories.
Click to hide internal directories.