types

package
v0.0.63-rc44 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2019 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel interface {
	Broadcast(b []byte)
}

Channel allows clients to send messages for a specific state type that will be broadcasted in a best-effort manner.

type ServiceLayer

type ServiceLayer interface {
	AddState(key string, state State) (Channel, error)
	OnNodeLeave(f func(id string, meta pb.NodeMeta))
}

type State

type State interface {
	Merge(inc []byte, full bool) error
	MarshalBinary() []byte
}

State represents a CRDT state store, that will be distributed over the mesh network.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL