Documentation ¶
Overview ¶
package server exports the Wetware worker node.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster interface { Bootstrap(context.Context) error View() cluster.View String() string Close() error }
Cluster is a local model of the global Wetware cluster. It models the cluster as a PA/EL system and makes no consistency guarantees.
type ClusterConfig ¶
type DebugConfig ¶
type DebugConfig struct { fx.In System debug.SystemContext `optional:"true" name:"debug-info"` Environ func() []string `optional:"true" name:"debug-environ"` Profiles map[debug.Profile]struct{} `optional:"true" name:"debug-profiles"` }
func (DebugConfig) New ¶
func (dc DebugConfig) New() *debug.Server
type Joiner ¶
type Joiner struct { fx.In Cluster ClusterConfig `optional:"true"` Debugger DebugConfig `optional:"true"` }
Joiner is a factory type that builds a Node from configuration, and joins the cluster. Joiners SHOULD NOT be reused, and should be promptly discarded after a call to Join.
type Node ¶
Node is a peer in the Wetware cluster. Manually populating Node's fields is NOT RECOMMENDED. Use Joiner instead.
type Router ¶
type Router interface { Join(string, ...ps.TopicOpt) (*ps.Topic, error) RegisterTopicValidator(topic string, val interface{}, opts ...ps.ValidatorOpt) error UnregisterTopicValidator(topic string) error }
Router provides an interface for routing messages by topic, and supports per-message validation. It is used by the Joiner to create the cluster topic through which heartbeat messages are routed.