Documentation
¶
Overview ¶
Package cluster exports an asynchronously updated model of the swarm.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrClosing = errors.New("closing")
Functions ¶
This section is empty.
Types ¶
type Clock ¶
type Clock interface { // Context returns a context that SHALL expire before a call // to Stop() returns. Context() context.Context // Tick returns a channel that receives the current time // at regular intervals. Implementations SHOULD select a // tick interval that is smaller than the minimum expected // TTL for the cluster. Implementations MUST NOT close the // channel returned by Tick until c.Context() has expired. // Closing the channel returned by Tick() is OPTIONAL. Tick() <-chan time.Time // Stop closes the context returned by Context() and frees // all resources. Relay is guaranteed not to call Start() // after Stop() returns. Relay MAY however call Context() // after Stop() has returned. Stop() }
Clock tracks the passage of time, allowing Router to update its internal state and free resources when the clock has stopped. Clock's methods MUST be safe for concurrent access.
type Router ¶
type Router struct { Topic Topic Log log.Logger TTL time.Duration Meta pulse.Preparer Clock Clock RoutingTable RoutingTable // contains filtered or unexported fields }
Router is a peer participating in the cluster membership protocol. It maintains a global view of the cluster with PA/EL guarantees, and periodically announces its presence to others.
Directories
¶
Path | Synopsis |
---|---|
Package pulse provides ev cluster-management service based on pubsub.
|
Package pulse provides ev cluster-management service based on pubsub. |
test
Package test_pulse is a generated GoMock package.
|
Package test_pulse is a generated GoMock package. |
test
Package test_routing is a generated GoMock package.
|
Package test_routing is a generated GoMock package. |
Package test_cluster is a generated GoMock package.
|
Package test_cluster is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.