Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrStateKeyAlreadySet = errors.New("specified key is already taken") ErrNodeNotFound = errors.New("specified node not found in mesh") )
Functions ¶
func MockedMesh ¶
func MockedMesh() *mockedMesh
func NewServiceLayer ¶
func NewServiceLayer(name string, serviceConfig ServiceConfig, discovery Mesh) types.ServiceLayer
Types ¶
type Discoverer ¶
type Layer ¶
type Layer interface { AddState(key string, state types.State) (types.Channel, error) DiscoverPeers(discovery peers.PeerStore) Join(peers []string) Members() []*memberlist.Node Leave() }
Mesh represents the mesh state network, being able to broadcast state across the nodes.
type Mesh ¶
type Mesh interface { Join(hosts []string) Peers() peers.PeerStore DialService(name string) (*grpc.ClientConn, error) DialAddress(service, id string, f func(*grpc.ClientConn) error) error RegisterService(name, address string) error Leave() Health() string }
Mesh represents the mesh discovery network.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.