Documentation ¶
Index ¶
- Variables
- func MockedMesh() *mockedMesh
- func NewGossipServiceLayer(name string, logger *zap.Logger, serviceConfig ServiceConfig, ...) types.GossipServiceLayer
- func NewRaftServiceLayer(name string, logger *zap.Logger, serviceConfig ServiceConfig, ...) types.RaftServiceLayer
- func ServeRPC(port int, l pb.LayerServer) net.Listener
- type Discoverer
- type DiscoveryLayer
- type GossipLayer
- type Mesh
- type ServiceConfig
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 NewGossipServiceLayer ¶ added in v0.0.64
func NewGossipServiceLayer(name string, logger *zap.Logger, serviceConfig ServiceConfig, discovery DiscoveryLayer) types.GossipServiceLayer
func NewRaftServiceLayer ¶ added in v0.0.64
func NewRaftServiceLayer(name string, logger *zap.Logger, serviceConfig ServiceConfig, rpcConfig ServiceConfig, discovery DiscoveryLayer) types.RaftServiceLayer
Types ¶
type Discoverer ¶
type DiscoveryLayer ¶ added in v0.0.64
type DiscoveryLayer interface { 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() Join(hosts []string) error Health() string }
func NewDiscoveryLayer ¶ added in v0.0.64
func NewDiscoveryLayer(logger *zap.Logger, userConfig config.Config) DiscoveryLayer
type GossipLayer ¶ added in v0.0.64
type GossipLayer interface { AddState(key string, state types.GossipState) (types.Channel, error) DiscoverPeers(discovery peers.PeerStore) Join(peers []string) error Members() []*memberlist.Node OnNodeJoin(func(id string, meta pb.NodeMeta)) OnNodeLeave(func(id string, meta pb.NodeMeta)) Leave() }
Mesh represents the mesh state network, being able to broadcast state across the nodes.
type Mesh ¶
type Mesh interface { Join(hosts []string) error 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.