Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Discovery ¶
type Discovery interface { // ID returns the discovery name ID() string // Start the discovery engine Start(ctx context.Context, meta Meta) error // Nodes returns the list of up and running Nodes at a given time Nodes(ctx context.Context) ([]*Node, error) // Watch returns event based upon node lifecycle Watch(ctx context.Context) (<-chan Event, error) // EarliestNode returns the earliest node. This is based upon the node timestamp EarliestNode(ctx context.Context) (*Node, error) // Stop shutdown the discovery provider Stop() error }
Discovery helps discover other running actor system in a cloud environment
type Meta ¶
Meta represents the meta information to pass to the discovery engine
func (Meta) GetBool ¶
GetBool returns the int value of a given key which value is a boolean If the key value is not a boolean then an error is return
func (Meta) GetInt ¶
GetInt returns the int value of a given key which value is an integer If the key value is not an integer then an error is return
func (Meta) GetMapString ¶
GetMapString returns the map of string value of a given key which value is a map of string Map of string means that the map key value pair are both string
type Node ¶
type Node struct { // Name specifies the discovered node's Name Name string // Host specifies the discovered node's Host Host string // Specifies the start time StartTime int64 // Ports specifies the list of Ports Ports map[string]int32 // IsRunning specifies whether the node is up and running IsRunning bool }
Node represents a discovered node
type NodeAdded ¶
type NodeAdded struct { // Node specifies the added node Node *Node }
NodeAdded discovery lifecycle event
type NodeModified ¶
type NodeModified struct { // Node specifies the modified node Node *Node // Current specifies the existing nde Current *Node }
NodeModified discovery lifecycle event
func (NodeModified) IsEvent ¶
func (e NodeModified) IsEvent()
type NodeRemoved ¶
type NodeRemoved struct { // Node specifies the removed node Node *Node }
NodeRemoved discovery lifecycle event
func (NodeRemoved) IsEvent ¶
func (e NodeRemoved) IsEvent()