Versions in this module Expand all Collapse all v0 v0.2.0 Jun 29, 2020 Changes in this version + const LevelNotSet + var Error = func(n1, n2 *Node) bool + var File_message_encoding_message_encoding_proto protoreflect.FileDescriptor + var ID = func(n1, n2 *Node) bool + var Latency = func(n1, n2 *Node) bool + var Port = func(n1, n2 *Node) bool + func Equal(a, b *Configuration) bool + func ManagerCreationError(err error) error + type ConfigNotFoundError uint32 + func (e ConfigNotFoundError) Error() string + type Configuration struct + func NewConfig(addrs []string, qspec QuorumSpec, opts ...ManagerOption) (*Configuration, func(), error) + func (c *Configuration) ID() uint32 + func (c *Configuration) NodeIDs() []uint32 + func (c *Configuration) Nodes() []*Node + func (c *Configuration) Size() int + func (c *Configuration) String() string + func (c *Configuration) SubError() <-chan GRPCError + func (c *Configuration) Test(in *Message) error + type EncodingTest interface + Test func(*Message) + type GRPCError struct + Cause error + NodeID uint32 + func (e GRPCError) Error() string + type GorumsServer struct + func NewGorumsServer(opts ...ServerOption) *GorumsServer + func (s *GorumsServer) GracefulStop() + func (s *GorumsServer) RegisterEncodingTestServer(srv EncodingTest) + func (s *GorumsServer) Serve(listener net.Listener) error + func (s *GorumsServer) Stop() + type IllegalConfigError string + func (e IllegalConfigError) Error() string + type Manager struct + func NewManager(nodeAddrs []string, opts ...ManagerOption) (*Manager, error) + func (m *Manager) AddNode(addr string) error + func (m *Manager) Close() + func (m *Manager) Configuration(id uint32) (config *Configuration, found bool) + func (m *Manager) ConfigurationIDs() []uint32 + func (m *Manager) Configurations() []*Configuration + func (m *Manager) NewConfiguration(ids []uint32, qspec QuorumSpec) (*Configuration, error) + func (m *Manager) Node(id uint32) (node *Node, found bool) + func (m *Manager) NodeIDs() []uint32 + func (m *Manager) Nodes() []*Node + func (m *Manager) Size() (nodes, configs int) + type ManagerOption func(*managerOptions) + func WithBackoff(backoff backoff.Config) ManagerOption + func WithDialTimeout(timeout time.Duration) ManagerOption + func WithGrpcDialOptions(opts ...grpc.DialOption) ManagerOption + func WithLogger(logger *log.Logger) ManagerOption + func WithNoConnect() ManagerOption + func WithSendBufferSize(size uint) ManagerOption + func WithTracing() ManagerOption + type Message struct + Data string + Payload []byte + func (*Message) Descriptor() ([]byte, []int) + func (*Message) ProtoMessage() + func (x *Message) GetData() string + func (x *Message) GetPayload() []byte + func (x *Message) ProtoReflect() protoreflect.Message + func (x *Message) Reset() + func (x *Message) String() string + type Metadata struct + Embed isMetadata_Embed + ID uint64 + func (*Metadata) Descriptor() ([]byte, []int) + func (*Metadata) ProtoMessage() + func (m *Metadata) GetEmbed() isMetadata_Embed + func (x *Metadata) GetData() []byte + func (x *Metadata) GetID() uint64 + func (x *Metadata) GetMessage() *Message + func (x *Metadata) ProtoReflect() protoreflect.Message + func (x *Metadata) Reset() + func (x *Metadata) String() string + type Metadata_Data struct + Data []byte + type Metadata_Message struct + Message *Message + type MultiSorter struct + func OrderedBy(less ...lessFunc) *MultiSorter + func (ms *MultiSorter) Len() int + func (ms *MultiSorter) Less(i, j int) bool + func (ms *MultiSorter) Sort(nodes []*Node) + func (ms *MultiSorter) Swap(i, j int) + type Node struct + func (n *Node) Address() string + func (n *Node) FullString() string + func (n *Node) ID() uint32 + func (n *Node) LastErr() error + func (n *Node) Latency() time.Duration + func (n *Node) Port() string + func (n *Node) String() string + type NodeNotFoundError uint32 + func (e NodeNotFoundError) Error() string + type QuorumCallError struct + Errors []GRPCError + Reason string + ReplyCount int + func (e QuorumCallError) Error() string + type QuorumSpec interface + type ServerOption func(*serverOptions) + func WithGRPCServerOptions(opts ...grpc.ServerOption) ServerOption + func WithServerBufferSize(size uint) ServerOption