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) RegisterService(name, address string) error UnregisterService(name string) error AddServiceTag(service, key, value string) error RemoveServiceTag(name string, tag string) error Leave() Join(hosts []string) error Health() string ServiceName() 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 []byte)) OnNodeLeave(func(id string, meta []byte)) OnNodeUpdate(func(id string, meta []byte)) Leave() }
Mesh represents the mesh state network, being able to broadcast state across the nodes.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.