storage

package
v0.9.20 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: Apache-2.0 Imports: 24 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthProtocol        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowProtocol          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupProtocol = fmt.Errorf("proto: unexpected end of group")
)
View Source
var EventType_name = map[int32]string{
	0: "UNKNOWN",
	1: "SNAPSHOT_RECEIVED",
	2: "SNAPSHOT_RECOVERED",
	3: "SNAPSHOT_CREATED",
	4: "SNAPSHOT_COMPACTED",
	5: "LOG_COMPACTED",
	6: "LOGDB_COMPACTED",
}
View Source
var EventType_value = map[string]int32{
	"UNKNOWN":            0,
	"SNAPSHOT_RECEIVED":  1,
	"SNAPSHOT_RECOVERED": 2,
	"SNAPSHOT_CREATED":   3,
	"SNAPSHOT_COMPACTED": 4,
	"LOG_COMPACTED":      5,
	"LOGDB_COMPACTED":    6,
}

Functions

func RegisterRaftEventsServer added in v0.8.0

func RegisterRaftEventsServer(s *grpc.Server, srv RaftEventsServer)

Types

type ConnectionEstablishedEvent added in v0.8.0

type ConnectionEstablishedEvent struct {
	ConnectionEvent `protobuf:"bytes,1,opt,name=connection,proto3,embedded=connection" json:"connection"`
}

func (*ConnectionEstablishedEvent) Descriptor added in v0.8.0

func (*ConnectionEstablishedEvent) Descriptor() ([]byte, []int)

func (*ConnectionEstablishedEvent) Marshal added in v0.8.0

func (m *ConnectionEstablishedEvent) Marshal() (dAtA []byte, err error)

func (*ConnectionEstablishedEvent) MarshalTo added in v0.8.0

func (m *ConnectionEstablishedEvent) MarshalTo(dAtA []byte) (int, error)

func (*ConnectionEstablishedEvent) MarshalToSizedBuffer added in v0.8.0

func (m *ConnectionEstablishedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ConnectionEstablishedEvent) ProtoMessage added in v0.8.0

func (*ConnectionEstablishedEvent) ProtoMessage()

func (*ConnectionEstablishedEvent) Reset added in v0.8.0

func (m *ConnectionEstablishedEvent) Reset()

func (*ConnectionEstablishedEvent) Size added in v0.8.0

func (m *ConnectionEstablishedEvent) Size() (n int)

func (*ConnectionEstablishedEvent) String added in v0.8.0

func (m *ConnectionEstablishedEvent) String() string

func (*ConnectionEstablishedEvent) Unmarshal added in v0.8.0

func (m *ConnectionEstablishedEvent) Unmarshal(dAtA []byte) error

func (*ConnectionEstablishedEvent) XXX_DiscardUnknown added in v0.8.0

func (m *ConnectionEstablishedEvent) XXX_DiscardUnknown()

func (*ConnectionEstablishedEvent) XXX_Marshal added in v0.8.0

func (m *ConnectionEstablishedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConnectionEstablishedEvent) XXX_Merge added in v0.8.0

func (m *ConnectionEstablishedEvent) XXX_Merge(src proto.Message)

func (*ConnectionEstablishedEvent) XXX_Size added in v0.8.0

func (m *ConnectionEstablishedEvent) XXX_Size() int

func (*ConnectionEstablishedEvent) XXX_Unmarshal added in v0.8.0

func (m *ConnectionEstablishedEvent) XXX_Unmarshal(b []byte) error

type ConnectionEvent added in v0.8.0

type ConnectionEvent struct {
	Address  string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Snapshot bool   `protobuf:"varint,2,opt,name=snapshot,proto3" json:"snapshot,omitempty"`
}

func (*ConnectionEvent) Descriptor added in v0.8.0

func (*ConnectionEvent) Descriptor() ([]byte, []int)

func (*ConnectionEvent) GetAddress added in v0.8.0

func (m *ConnectionEvent) GetAddress() string

func (*ConnectionEvent) GetSnapshot added in v0.8.0

func (m *ConnectionEvent) GetSnapshot() bool

func (*ConnectionEvent) Marshal added in v0.8.0

func (m *ConnectionEvent) Marshal() (dAtA []byte, err error)

func (*ConnectionEvent) MarshalTo added in v0.8.0

func (m *ConnectionEvent) MarshalTo(dAtA []byte) (int, error)

func (*ConnectionEvent) MarshalToSizedBuffer added in v0.8.0

func (m *ConnectionEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ConnectionEvent) ProtoMessage added in v0.8.0

func (*ConnectionEvent) ProtoMessage()

func (*ConnectionEvent) Reset added in v0.8.0

func (m *ConnectionEvent) Reset()

func (*ConnectionEvent) Size added in v0.8.0

func (m *ConnectionEvent) Size() (n int)

func (*ConnectionEvent) String added in v0.8.0

func (m *ConnectionEvent) String() string

func (*ConnectionEvent) Unmarshal added in v0.8.0

func (m *ConnectionEvent) Unmarshal(dAtA []byte) error

func (*ConnectionEvent) XXX_DiscardUnknown added in v0.8.0

func (m *ConnectionEvent) XXX_DiscardUnknown()

func (*ConnectionEvent) XXX_Marshal added in v0.8.0

func (m *ConnectionEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConnectionEvent) XXX_Merge added in v0.8.0

func (m *ConnectionEvent) XXX_Merge(src proto.Message)

func (*ConnectionEvent) XXX_Size added in v0.8.0

func (m *ConnectionEvent) XXX_Size() int

func (*ConnectionEvent) XXX_Unmarshal added in v0.8.0

func (m *ConnectionEvent) XXX_Unmarshal(b []byte) error

type ConnectionFailedEvent added in v0.8.0

type ConnectionFailedEvent struct {
	ConnectionEvent `protobuf:"bytes,1,opt,name=connection,proto3,embedded=connection" json:"connection"`
}

func (*ConnectionFailedEvent) Descriptor added in v0.8.0

func (*ConnectionFailedEvent) Descriptor() ([]byte, []int)

func (*ConnectionFailedEvent) Marshal added in v0.8.0

func (m *ConnectionFailedEvent) Marshal() (dAtA []byte, err error)

func (*ConnectionFailedEvent) MarshalTo added in v0.8.0

func (m *ConnectionFailedEvent) MarshalTo(dAtA []byte) (int, error)

func (*ConnectionFailedEvent) MarshalToSizedBuffer added in v0.8.0

func (m *ConnectionFailedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ConnectionFailedEvent) ProtoMessage added in v0.8.0

func (*ConnectionFailedEvent) ProtoMessage()

func (*ConnectionFailedEvent) Reset added in v0.8.0

func (m *ConnectionFailedEvent) Reset()

func (*ConnectionFailedEvent) Size added in v0.8.0

func (m *ConnectionFailedEvent) Size() (n int)

func (*ConnectionFailedEvent) String added in v0.8.0

func (m *ConnectionFailedEvent) String() string

func (*ConnectionFailedEvent) Unmarshal added in v0.8.0

func (m *ConnectionFailedEvent) Unmarshal(dAtA []byte) error

func (*ConnectionFailedEvent) XXX_DiscardUnknown added in v0.8.0

func (m *ConnectionFailedEvent) XXX_DiscardUnknown()

func (*ConnectionFailedEvent) XXX_Marshal added in v0.8.0

func (m *ConnectionFailedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConnectionFailedEvent) XXX_Merge added in v0.8.0

func (m *ConnectionFailedEvent) XXX_Merge(src proto.Message)

func (*ConnectionFailedEvent) XXX_Size added in v0.8.0

func (m *ConnectionFailedEvent) XXX_Size() int

func (*ConnectionFailedEvent) XXX_Unmarshal added in v0.8.0

func (m *ConnectionFailedEvent) XXX_Unmarshal(b []byte) error

type Entry

type Entry struct {
	// value is the value of the entry
	Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// stream_id is the entry stream identifier
	StreamID streamID `protobuf:"varint,2,opt,name=stream_id,json=streamId,proto3,casttype=streamID" json:"stream_id,omitempty"`
}

Entry is a Raft log entry

func (*Entry) Descriptor

func (*Entry) Descriptor() ([]byte, []int)

func (*Entry) GetStreamID

func (m *Entry) GetStreamID() streamID

func (*Entry) GetValue

func (m *Entry) GetValue() []byte

func (*Entry) Marshal

func (m *Entry) Marshal() (dAtA []byte, err error)

func (*Entry) MarshalTo

func (m *Entry) MarshalTo(dAtA []byte) (int, error)

func (*Entry) MarshalToSizedBuffer

func (m *Entry) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Entry) ProtoMessage

func (*Entry) ProtoMessage()

func (*Entry) Reset

func (m *Entry) Reset()

func (*Entry) Size

func (m *Entry) Size() (n int)

func (*Entry) String

func (m *Entry) String() string

func (*Entry) Unmarshal

func (m *Entry) Unmarshal(dAtA []byte) error

func (*Entry) XXX_DiscardUnknown

func (m *Entry) XXX_DiscardUnknown()

func (*Entry) XXX_Marshal

func (m *Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Entry) XXX_Merge

func (m *Entry) XXX_Merge(src proto.Message)

func (*Entry) XXX_Size

func (m *Entry) XXX_Size() int

func (*Entry) XXX_Unmarshal

func (m *Entry) XXX_Unmarshal(b []byte) error

type EventServer added in v0.8.0

type EventServer struct {
	// contains filtered or unexported fields
}

EventServer is a server for monitoring Raft cluster events

func NewEventServer added in v0.8.0

func NewEventServer(protocol *Protocol) *EventServer

NewEventServer creates a new EventServer instance

func (*EventServer) Subscribe added in v0.8.0

func (e *EventServer) Subscribe(request *SubscribeRequest, stream RaftEvents_SubscribeServer) error

Subscribe subscribes to receive events from a partition

type EventType added in v0.8.0

type EventType int32
const (
	EventType_UNKNOWN            EventType = 0
	EventType_SNAPSHOT_RECEIVED  EventType = 1
	EventType_SNAPSHOT_RECOVERED EventType = 2
	EventType_SNAPSHOT_CREATED   EventType = 3
	EventType_SNAPSHOT_COMPACTED EventType = 4
	EventType_LOG_COMPACTED      EventType = 5
	EventType_LOGDB_COMPACTED    EventType = 6
)

func (EventType) EnumDescriptor added in v0.8.0

func (EventType) EnumDescriptor() ([]byte, []int)

func (EventType) String added in v0.8.0

func (x EventType) String() string

type LeaderEvent added in v0.8.0

type LeaderEvent struct {
	PartitionEvent `protobuf:"bytes,1,opt,name=partition,proto3,embedded=partition" json:"partition"`
	Term           uint64 `protobuf:"varint,2,opt,name=term,proto3" json:"term,omitempty"`
	Leader         string `protobuf:"bytes,3,opt,name=leader,proto3" json:"leader,omitempty"`
}

func (*LeaderEvent) Descriptor added in v0.8.0

func (*LeaderEvent) Descriptor() ([]byte, []int)

func (*LeaderEvent) GetLeader added in v0.8.0

func (m *LeaderEvent) GetLeader() string

func (*LeaderEvent) GetTerm added in v0.8.0

func (m *LeaderEvent) GetTerm() uint64

func (*LeaderEvent) Marshal added in v0.8.0

func (m *LeaderEvent) Marshal() (dAtA []byte, err error)

func (*LeaderEvent) MarshalTo added in v0.8.0

func (m *LeaderEvent) MarshalTo(dAtA []byte) (int, error)

func (*LeaderEvent) MarshalToSizedBuffer added in v0.8.0

func (m *LeaderEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LeaderEvent) ProtoMessage added in v0.8.0

func (*LeaderEvent) ProtoMessage()

func (*LeaderEvent) Reset added in v0.8.0

func (m *LeaderEvent) Reset()

func (*LeaderEvent) Size added in v0.8.0

func (m *LeaderEvent) Size() (n int)

func (*LeaderEvent) String added in v0.8.0

func (m *LeaderEvent) String() string

func (*LeaderEvent) Unmarshal added in v0.8.0

func (m *LeaderEvent) Unmarshal(dAtA []byte) error

func (*LeaderEvent) XXX_DiscardUnknown added in v0.8.0

func (m *LeaderEvent) XXX_DiscardUnknown()

func (*LeaderEvent) XXX_Marshal added in v0.8.0

func (m *LeaderEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LeaderEvent) XXX_Merge added in v0.8.0

func (m *LeaderEvent) XXX_Merge(src proto.Message)

func (*LeaderEvent) XXX_Size added in v0.8.0

func (m *LeaderEvent) XXX_Size() int

func (*LeaderEvent) XXX_Unmarshal added in v0.8.0

func (m *LeaderEvent) XXX_Unmarshal(b []byte) error

type LeaderUpdatedEvent added in v0.8.0

type LeaderUpdatedEvent struct {
	LeaderEvent `protobuf:"bytes,1,opt,name=leader,proto3,embedded=leader" json:"leader"`
}

func (*LeaderUpdatedEvent) Descriptor added in v0.8.0

func (*LeaderUpdatedEvent) Descriptor() ([]byte, []int)

func (*LeaderUpdatedEvent) Marshal added in v0.8.0

func (m *LeaderUpdatedEvent) Marshal() (dAtA []byte, err error)

func (*LeaderUpdatedEvent) MarshalTo added in v0.8.0

func (m *LeaderUpdatedEvent) MarshalTo(dAtA []byte) (int, error)

func (*LeaderUpdatedEvent) MarshalToSizedBuffer added in v0.8.0

func (m *LeaderUpdatedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LeaderUpdatedEvent) ProtoMessage added in v0.8.0

func (*LeaderUpdatedEvent) ProtoMessage()

func (*LeaderUpdatedEvent) Reset added in v0.8.0

func (m *LeaderUpdatedEvent) Reset()

func (*LeaderUpdatedEvent) Size added in v0.8.0

func (m *LeaderUpdatedEvent) Size() (n int)

func (*LeaderUpdatedEvent) String added in v0.8.0

func (m *LeaderUpdatedEvent) String() string

func (*LeaderUpdatedEvent) Unmarshal added in v0.8.0

func (m *LeaderUpdatedEvent) Unmarshal(dAtA []byte) error

func (*LeaderUpdatedEvent) XXX_DiscardUnknown added in v0.8.0

func (m *LeaderUpdatedEvent) XXX_DiscardUnknown()

func (*LeaderUpdatedEvent) XXX_Marshal added in v0.8.0

func (m *LeaderUpdatedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LeaderUpdatedEvent) XXX_Merge added in v0.8.0

func (m *LeaderUpdatedEvent) XXX_Merge(src proto.Message)

func (*LeaderUpdatedEvent) XXX_Size added in v0.8.0

func (m *LeaderUpdatedEvent) XXX_Size() int

func (*LeaderUpdatedEvent) XXX_Unmarshal added in v0.8.0

func (m *LeaderUpdatedEvent) XXX_Unmarshal(b []byte) error

type LogCompactedEvent added in v0.8.0

type LogCompactedEvent struct {
	LogEvent `protobuf:"bytes,1,opt,name=log,proto3,embedded=log" json:"log"`
}

func (*LogCompactedEvent) Descriptor added in v0.8.0

func (*LogCompactedEvent) Descriptor() ([]byte, []int)

func (*LogCompactedEvent) Marshal added in v0.8.0

func (m *LogCompactedEvent) Marshal() (dAtA []byte, err error)

func (*LogCompactedEvent) MarshalTo added in v0.8.0

func (m *LogCompactedEvent) MarshalTo(dAtA []byte) (int, error)

func (*LogCompactedEvent) MarshalToSizedBuffer added in v0.8.0

func (m *LogCompactedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogCompactedEvent) ProtoMessage added in v0.8.0

func (*LogCompactedEvent) ProtoMessage()

func (*LogCompactedEvent) Reset added in v0.8.0

func (m *LogCompactedEvent) Reset()

func (*LogCompactedEvent) Size added in v0.8.0

func (m *LogCompactedEvent) Size() (n int)

func (*LogCompactedEvent) String added in v0.8.0

func (m *LogCompactedEvent) String() string

func (*LogCompactedEvent) Unmarshal added in v0.8.0

func (m *LogCompactedEvent) Unmarshal(dAtA []byte) error

func (*LogCompactedEvent) XXX_DiscardUnknown added in v0.8.0

func (m *LogCompactedEvent) XXX_DiscardUnknown()

func (*LogCompactedEvent) XXX_Marshal added in v0.8.0

func (m *LogCompactedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogCompactedEvent) XXX_Merge added in v0.8.0

func (m *LogCompactedEvent) XXX_Merge(src proto.Message)

func (*LogCompactedEvent) XXX_Size added in v0.8.0

func (m *LogCompactedEvent) XXX_Size() int

func (*LogCompactedEvent) XXX_Unmarshal added in v0.8.0

func (m *LogCompactedEvent) XXX_Unmarshal(b []byte) error

type LogDBCompactedEvent added in v0.8.0

type LogDBCompactedEvent struct {
	LogEvent `protobuf:"bytes,1,opt,name=log,proto3,embedded=log" json:"log"`
}

func (*LogDBCompactedEvent) Descriptor added in v0.8.0

func (*LogDBCompactedEvent) Descriptor() ([]byte, []int)

func (*LogDBCompactedEvent) Marshal added in v0.8.0

func (m *LogDBCompactedEvent) Marshal() (dAtA []byte, err error)

func (*LogDBCompactedEvent) MarshalTo added in v0.8.0

func (m *LogDBCompactedEvent) MarshalTo(dAtA []byte) (int, error)

func (*LogDBCompactedEvent) MarshalToSizedBuffer added in v0.8.0

func (m *LogDBCompactedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogDBCompactedEvent) ProtoMessage added in v0.8.0

func (*LogDBCompactedEvent) ProtoMessage()

func (*LogDBCompactedEvent) Reset added in v0.8.0

func (m *LogDBCompactedEvent) Reset()

func (*LogDBCompactedEvent) Size added in v0.8.0

func (m *LogDBCompactedEvent) Size() (n int)

func (*LogDBCompactedEvent) String added in v0.8.0

func (m *LogDBCompactedEvent) String() string

func (*LogDBCompactedEvent) Unmarshal added in v0.8.0

func (m *LogDBCompactedEvent) Unmarshal(dAtA []byte) error

func (*LogDBCompactedEvent) XXX_DiscardUnknown added in v0.8.0

func (m *LogDBCompactedEvent) XXX_DiscardUnknown()

func (*LogDBCompactedEvent) XXX_Marshal added in v0.8.0

func (m *LogDBCompactedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogDBCompactedEvent) XXX_Merge added in v0.8.0

func (m *LogDBCompactedEvent) XXX_Merge(src proto.Message)

func (*LogDBCompactedEvent) XXX_Size added in v0.8.0

func (m *LogDBCompactedEvent) XXX_Size() int

func (*LogDBCompactedEvent) XXX_Unmarshal added in v0.8.0

func (m *LogDBCompactedEvent) XXX_Unmarshal(b []byte) error

type LogEvent added in v0.8.0

type LogEvent struct {
	PartitionEvent `protobuf:"bytes,1,opt,name=partition,proto3,embedded=partition" json:"partition"`
	Index          uint64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
}

func (*LogEvent) Descriptor added in v0.8.0

func (*LogEvent) Descriptor() ([]byte, []int)

func (*LogEvent) GetIndex added in v0.8.0

func (m *LogEvent) GetIndex() uint64

func (*LogEvent) Marshal added in v0.8.0

func (m *LogEvent) Marshal() (dAtA []byte, err error)

func (*LogEvent) MarshalTo added in v0.8.0

func (m *LogEvent) MarshalTo(dAtA []byte) (int, error)

func (*LogEvent) MarshalToSizedBuffer added in v0.8.0

func (m *LogEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogEvent) ProtoMessage added in v0.8.0

func (*LogEvent) ProtoMessage()

func (*LogEvent) Reset added in v0.8.0

func (m *LogEvent) Reset()

func (*LogEvent) Size added in v0.8.0

func (m *LogEvent) Size() (n int)

func (*LogEvent) String added in v0.8.0

func (m *LogEvent) String() string

func (*LogEvent) Unmarshal added in v0.8.0

func (m *LogEvent) Unmarshal(dAtA []byte) error

func (*LogEvent) XXX_DiscardUnknown added in v0.8.0

func (m *LogEvent) XXX_DiscardUnknown()

func (*LogEvent) XXX_Marshal added in v0.8.0

func (m *LogEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogEvent) XXX_Merge added in v0.8.0

func (m *LogEvent) XXX_Merge(src proto.Message)

func (*LogEvent) XXX_Size added in v0.8.0

func (m *LogEvent) XXX_Size() int

func (*LogEvent) XXX_Unmarshal added in v0.8.0

func (m *LogEvent) XXX_Unmarshal(b []byte) error

type MemberReadyEvent added in v0.8.1

type MemberReadyEvent struct {
	PartitionEvent `protobuf:"bytes,1,opt,name=partition,proto3,embedded=partition" json:"partition"`
}

func (*MemberReadyEvent) Descriptor added in v0.8.1

func (*MemberReadyEvent) Descriptor() ([]byte, []int)

func (*MemberReadyEvent) Marshal added in v0.8.1

func (m *MemberReadyEvent) Marshal() (dAtA []byte, err error)

func (*MemberReadyEvent) MarshalTo added in v0.8.1

func (m *MemberReadyEvent) MarshalTo(dAtA []byte) (int, error)

func (*MemberReadyEvent) MarshalToSizedBuffer added in v0.8.1

func (m *MemberReadyEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MemberReadyEvent) ProtoMessage added in v0.8.1

func (*MemberReadyEvent) ProtoMessage()

func (*MemberReadyEvent) Reset added in v0.8.1

func (m *MemberReadyEvent) Reset()

func (*MemberReadyEvent) Size added in v0.8.1

func (m *MemberReadyEvent) Size() (n int)

func (*MemberReadyEvent) String added in v0.8.1

func (m *MemberReadyEvent) String() string

func (*MemberReadyEvent) Unmarshal added in v0.8.1

func (m *MemberReadyEvent) Unmarshal(dAtA []byte) error

func (*MemberReadyEvent) XXX_DiscardUnknown added in v0.8.1

func (m *MemberReadyEvent) XXX_DiscardUnknown()

func (*MemberReadyEvent) XXX_Marshal added in v0.8.1

func (m *MemberReadyEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MemberReadyEvent) XXX_Merge added in v0.8.1

func (m *MemberReadyEvent) XXX_Merge(src proto.Message)

func (*MemberReadyEvent) XXX_Size added in v0.8.1

func (m *MemberReadyEvent) XXX_Size() int

func (*MemberReadyEvent) XXX_Unmarshal added in v0.8.1

func (m *MemberReadyEvent) XXX_Unmarshal(b []byte) error

type MembershipChangedEvent added in v0.8.0

type MembershipChangedEvent struct {
	PartitionEvent `protobuf:"bytes,1,opt,name=partition,proto3,embedded=partition" json:"partition"`
}

func (*MembershipChangedEvent) Descriptor added in v0.8.0

func (*MembershipChangedEvent) Descriptor() ([]byte, []int)

func (*MembershipChangedEvent) Marshal added in v0.8.0

func (m *MembershipChangedEvent) Marshal() (dAtA []byte, err error)

func (*MembershipChangedEvent) MarshalTo added in v0.8.0

func (m *MembershipChangedEvent) MarshalTo(dAtA []byte) (int, error)

func (*MembershipChangedEvent) MarshalToSizedBuffer added in v0.8.0

func (m *MembershipChangedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MembershipChangedEvent) ProtoMessage added in v0.8.0

func (*MembershipChangedEvent) ProtoMessage()

func (*MembershipChangedEvent) Reset added in v0.8.0

func (m *MembershipChangedEvent) Reset()

func (*MembershipChangedEvent) Size added in v0.8.0

func (m *MembershipChangedEvent) Size() (n int)

func (*MembershipChangedEvent) String added in v0.8.0

func (m *MembershipChangedEvent) String() string

func (*MembershipChangedEvent) Unmarshal added in v0.8.0

func (m *MembershipChangedEvent) Unmarshal(dAtA []byte) error

func (*MembershipChangedEvent) XXX_DiscardUnknown added in v0.8.0

func (m *MembershipChangedEvent) XXX_DiscardUnknown()

func (*MembershipChangedEvent) XXX_Marshal added in v0.8.0

func (m *MembershipChangedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MembershipChangedEvent) XXX_Merge added in v0.8.0

func (m *MembershipChangedEvent) XXX_Merge(src proto.Message)

func (*MembershipChangedEvent) XXX_Size added in v0.8.0

func (m *MembershipChangedEvent) XXX_Size() int

func (*MembershipChangedEvent) XXX_Unmarshal added in v0.8.0

func (m *MembershipChangedEvent) XXX_Unmarshal(b []byte) error

type Partition

type Partition struct {
	// contains filtered or unexported fields
}

Partition is a Raft partition

func (*Partition) Followers added in v0.9.0

func (c *Partition) Followers() []string

Followers returns the current set of followers' addresses for this partition

func (*Partition) IsLeader

func (c *Partition) IsLeader() bool

IsLeader returns whether the local node is the leader for this partition

func (*Partition) Leader

func (c *Partition) Leader() string

Leader returns the leader address for this partition

func (*Partition) MustLeader

func (c *Partition) MustLeader() bool

MustLeader returns whether the Raft partition requires a leader

func (*Partition) StaleQuery added in v0.8.0

func (c *Partition) StaleQuery(ctx context.Context, input []byte, stream streams.WriteStream) error

StaleQuery executes a state machine query on the partition

func (*Partition) SyncCommand added in v0.8.0

func (c *Partition) SyncCommand(ctx context.Context, input []byte, stream streams.WriteStream) error

SyncCommand executes a state machine command on the partition

func (*Partition) SyncQuery added in v0.8.0

func (c *Partition) SyncQuery(ctx context.Context, input []byte, stream streams.WriteStream) error

SyncQuery executes a state machine query on the partition

func (*Partition) WatchConfig added in v0.9.0

func (c *Partition) WatchConfig(ctx context.Context, ch chan<- rsm.PartitionConfig) error

WatchConfig watches the partition configuration for changes

type PartitionEvent added in v0.8.0

type PartitionEvent struct {
	Partition uint32 `protobuf:"varint,1,opt,name=partition,proto3" json:"partition,omitempty"`
}

func (*PartitionEvent) Descriptor added in v0.8.0

func (*PartitionEvent) Descriptor() ([]byte, []int)

func (*PartitionEvent) GetPartition added in v0.8.0

func (m *PartitionEvent) GetPartition() uint32

func (*PartitionEvent) Marshal added in v0.8.0

func (m *PartitionEvent) Marshal() (dAtA []byte, err error)

func (*PartitionEvent) MarshalTo added in v0.8.0

func (m *PartitionEvent) MarshalTo(dAtA []byte) (int, error)

func (*PartitionEvent) MarshalToSizedBuffer added in v0.8.0

func (m *PartitionEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PartitionEvent) ProtoMessage added in v0.8.0

func (*PartitionEvent) ProtoMessage()

func (*PartitionEvent) Reset added in v0.8.0

func (m *PartitionEvent) Reset()

func (*PartitionEvent) Size added in v0.8.0

func (m *PartitionEvent) Size() (n int)

func (*PartitionEvent) String added in v0.8.0

func (m *PartitionEvent) String() string

func (*PartitionEvent) Unmarshal added in v0.8.0

func (m *PartitionEvent) Unmarshal(dAtA []byte) error

func (*PartitionEvent) XXX_DiscardUnknown added in v0.8.0

func (m *PartitionEvent) XXX_DiscardUnknown()

func (*PartitionEvent) XXX_Marshal added in v0.8.0

func (m *PartitionEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PartitionEvent) XXX_Merge added in v0.8.0

func (m *PartitionEvent) XXX_Merge(src proto.Message)

func (*PartitionEvent) XXX_Size added in v0.8.0

func (m *PartitionEvent) XXX_Size() int

func (*PartitionEvent) XXX_Unmarshal added in v0.8.0

func (m *PartitionEvent) XXX_Unmarshal(b []byte) error

type Protocol

type Protocol struct {
	protocol.Protocol
	// contains filtered or unexported fields
}

Protocol is an implementation of the Client interface providing the Raft consensus protocol

func NewProtocol

func NewProtocol(config config.ProtocolConfig) *Protocol

NewProtocol returns a new Raft Protocol instance

func (*Protocol) Partition

func (p *Protocol) Partition(partitionID protocol.PartitionID) protocol.Partition

Partition returns the given partition client

func (*Protocol) Partitions

func (p *Protocol) Partitions() []protocol.Partition

Partitions returns all partition clients

func (*Protocol) Start

func (p *Protocol) Start(c cluster.Cluster, registry *protocol.Registry) error

Start starts the Raft protocol

func (*Protocol) Stop

func (p *Protocol) Stop() error

Stop stops the Raft protocol

type RaftEvent added in v0.8.0

type RaftEvent struct {
	Timestamp time.Time `protobuf:"bytes,1,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
	// Types that are valid to be assigned to Event:
	//	*RaftEvent_MemberReady
	//	*RaftEvent_LeaderUpdated
	//	*RaftEvent_MembershipChanged
	//	*RaftEvent_SendSnapshotStarted
	//	*RaftEvent_SendSnapshotCompleted
	//	*RaftEvent_SendSnapshotAborted
	//	*RaftEvent_SnapshotReceived
	//	*RaftEvent_SnapshotRecovered
	//	*RaftEvent_SnapshotCreated
	//	*RaftEvent_SnapshotCompacted
	//	*RaftEvent_LogCompacted
	//	*RaftEvent_LogdbCompacted
	//	*RaftEvent_ConnectionEstablished
	//	*RaftEvent_ConnectionFailed
	Event isRaftEvent_Event `protobuf_oneof:"event"`
}

func (*RaftEvent) Descriptor added in v0.8.0

func (*RaftEvent) Descriptor() ([]byte, []int)

func (*RaftEvent) GetConnectionEstablished added in v0.8.0

func (m *RaftEvent) GetConnectionEstablished() *ConnectionEstablishedEvent

func (*RaftEvent) GetConnectionFailed added in v0.8.0

func (m *RaftEvent) GetConnectionFailed() *ConnectionFailedEvent

func (*RaftEvent) GetEvent added in v0.8.0

func (m *RaftEvent) GetEvent() isRaftEvent_Event

func (*RaftEvent) GetLeaderUpdated added in v0.8.0

func (m *RaftEvent) GetLeaderUpdated() *LeaderUpdatedEvent

func (*RaftEvent) GetLogCompacted added in v0.8.0

func (m *RaftEvent) GetLogCompacted() *LogCompactedEvent

func (*RaftEvent) GetLogdbCompacted added in v0.8.0

func (m *RaftEvent) GetLogdbCompacted() *LogDBCompactedEvent

func (*RaftEvent) GetMemberReady added in v0.8.1

func (m *RaftEvent) GetMemberReady() *MemberReadyEvent

func (*RaftEvent) GetMembershipChanged added in v0.8.0

func (m *RaftEvent) GetMembershipChanged() *MembershipChangedEvent

func (*RaftEvent) GetSendSnapshotAborted added in v0.8.0

func (m *RaftEvent) GetSendSnapshotAborted() *SendSnapshotAbortedEvent

func (*RaftEvent) GetSendSnapshotCompleted added in v0.8.0

func (m *RaftEvent) GetSendSnapshotCompleted() *SendSnapshotCompletedEvent

func (*RaftEvent) GetSendSnapshotStarted added in v0.8.0

func (m *RaftEvent) GetSendSnapshotStarted() *SendSnapshotStartedEvent

func (*RaftEvent) GetSnapshotCompacted added in v0.8.0

func (m *RaftEvent) GetSnapshotCompacted() *SnapshotCompactedEvent

func (*RaftEvent) GetSnapshotCreated added in v0.8.0

func (m *RaftEvent) GetSnapshotCreated() *SnapshotCreatedEvent

func (*RaftEvent) GetSnapshotReceived added in v0.8.0

func (m *RaftEvent) GetSnapshotReceived() *SnapshotReceivedEvent

func (*RaftEvent) GetSnapshotRecovered added in v0.8.0

func (m *RaftEvent) GetSnapshotRecovered() *SnapshotRecoveredEvent

func (*RaftEvent) GetTimestamp added in v0.8.0

func (m *RaftEvent) GetTimestamp() time.Time

func (*RaftEvent) Marshal added in v0.8.0

func (m *RaftEvent) Marshal() (dAtA []byte, err error)

func (*RaftEvent) MarshalTo added in v0.8.0

func (m *RaftEvent) MarshalTo(dAtA []byte) (int, error)

func (*RaftEvent) MarshalToSizedBuffer added in v0.8.0

func (m *RaftEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RaftEvent) ProtoMessage added in v0.8.0

func (*RaftEvent) ProtoMessage()

func (*RaftEvent) Reset added in v0.8.0

func (m *RaftEvent) Reset()

func (*RaftEvent) Size added in v0.8.0

func (m *RaftEvent) Size() (n int)

func (*RaftEvent) String added in v0.8.0

func (m *RaftEvent) String() string

func (*RaftEvent) Unmarshal added in v0.8.0

func (m *RaftEvent) Unmarshal(dAtA []byte) error

func (*RaftEvent) XXX_DiscardUnknown added in v0.8.0

func (m *RaftEvent) XXX_DiscardUnknown()

func (*RaftEvent) XXX_Marshal added in v0.8.0

func (m *RaftEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RaftEvent) XXX_Merge added in v0.8.0

func (m *RaftEvent) XXX_Merge(src proto.Message)

func (*RaftEvent) XXX_OneofWrappers added in v0.8.0

func (*RaftEvent) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*RaftEvent) XXX_Size added in v0.8.0

func (m *RaftEvent) XXX_Size() int

func (*RaftEvent) XXX_Unmarshal added in v0.8.0

func (m *RaftEvent) XXX_Unmarshal(b []byte) error

type RaftEvent_ConnectionEstablished added in v0.8.0

type RaftEvent_ConnectionEstablished struct {
	ConnectionEstablished *ConnectionEstablishedEvent `` /* 131-byte string literal not displayed */
}

func (*RaftEvent_ConnectionEstablished) MarshalTo added in v0.8.0

func (m *RaftEvent_ConnectionEstablished) MarshalTo(dAtA []byte) (int, error)

func (*RaftEvent_ConnectionEstablished) MarshalToSizedBuffer added in v0.8.0

func (m *RaftEvent_ConnectionEstablished) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RaftEvent_ConnectionEstablished) Size added in v0.8.0

func (m *RaftEvent_ConnectionEstablished) Size() (n int)

type RaftEvent_ConnectionFailed added in v0.8.0

type RaftEvent_ConnectionFailed struct {
	ConnectionFailed *ConnectionFailedEvent `protobuf:"bytes,15,opt,name=connection_failed,json=connectionFailed,proto3,oneof" json:"connection_failed,omitempty"`
}

func (*RaftEvent_ConnectionFailed) MarshalTo added in v0.8.0

func (m *RaftEvent_ConnectionFailed) MarshalTo(dAtA []byte) (int, error)

func (*RaftEvent_ConnectionFailed) MarshalToSizedBuffer added in v0.8.0

func (m *RaftEvent_ConnectionFailed) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RaftEvent_ConnectionFailed) Size added in v0.8.0

func (m *RaftEvent_ConnectionFailed) Size() (n int)

type RaftEvent_LeaderUpdated added in v0.8.0

type RaftEvent_LeaderUpdated struct {
	LeaderUpdated *LeaderUpdatedEvent `protobuf:"bytes,3,opt,name=leader_updated,json=leaderUpdated,proto3,oneof" json:"leader_updated,omitempty"`
}

func (*RaftEvent_LeaderUpdated) MarshalTo added in v0.8.0

func (m *RaftEvent_LeaderUpdated) MarshalTo(dAtA []byte) (int, error)

func (*RaftEvent_LeaderUpdated) MarshalToSizedBuffer added in v0.8.0

func (m *RaftEvent_LeaderUpdated) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RaftEvent_LeaderUpdated) Size added in v0.8.0

func (m *RaftEvent_LeaderUpdated) Size() (n int)

type RaftEvent_LogCompacted added in v0.8.0

type RaftEvent_LogCompacted struct {
	LogCompacted *LogCompactedEvent `protobuf:"bytes,12,opt,name=log_compacted,json=logCompacted,proto3,oneof" json:"log_compacted,omitempty"`
}

func (*RaftEvent_LogCompacted) MarshalTo added in v0.8.0

func (m *RaftEvent_LogCompacted) MarshalTo(dAtA []byte) (int, error)

func (*RaftEvent_LogCompacted) MarshalToSizedBuffer added in v0.8.0

func (m *RaftEvent_LogCompacted) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RaftEvent_LogCompacted) Size added in v0.8.0

func (m *RaftEvent_LogCompacted) Size() (n int)

type RaftEvent_LogdbCompacted added in v0.8.0

type RaftEvent_LogdbCompacted struct {
	LogdbCompacted *LogDBCompactedEvent `protobuf:"bytes,13,opt,name=logdb_compacted,json=logdbCompacted,proto3,oneof" json:"logdb_compacted,omitempty"`
}

func (*RaftEvent_LogdbCompacted) MarshalTo added in v0.8.0

func (m *RaftEvent_LogdbCompacted) MarshalTo(dAtA []byte) (int, error)

func (*RaftEvent_LogdbCompacted) MarshalToSizedBuffer added in v0.8.0

func (m *RaftEvent_LogdbCompacted) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RaftEvent_LogdbCompacted) Size added in v0.8.0

func (m *RaftEvent_LogdbCompacted) Size() (n int)

type RaftEvent_MemberReady added in v0.8.1

type RaftEvent_MemberReady struct {
	MemberReady *MemberReadyEvent `protobuf:"bytes,2,opt,name=member_ready,json=memberReady,proto3,oneof" json:"member_ready,omitempty"`
}

func (*RaftEvent_MemberReady) MarshalTo added in v0.8.1

func (m *RaftEvent_MemberReady) MarshalTo(dAtA []byte) (int, error)

func (*RaftEvent_MemberReady) MarshalToSizedBuffer added in v0.8.1

func (m *RaftEvent_MemberReady) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RaftEvent_MemberReady) Size added in v0.8.1

func (m *RaftEvent_MemberReady) Size() (n int)

type RaftEvent_MembershipChanged added in v0.8.0

type RaftEvent_MembershipChanged struct {
	MembershipChanged *MembershipChangedEvent `protobuf:"bytes,4,opt,name=membership_changed,json=membershipChanged,proto3,oneof" json:"membership_changed,omitempty"`
}

func (*RaftEvent_MembershipChanged) MarshalTo added in v0.8.0

func (m *RaftEvent_MembershipChanged) MarshalTo(dAtA []byte) (int, error)

func (*RaftEvent_MembershipChanged) MarshalToSizedBuffer added in v0.8.0

func (m *RaftEvent_MembershipChanged) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RaftEvent_MembershipChanged) Size added in v0.8.0

func (m *RaftEvent_MembershipChanged) Size() (n int)

type RaftEvent_SendSnapshotAborted added in v0.8.0

type RaftEvent_SendSnapshotAborted struct {
	SendSnapshotAborted *SendSnapshotAbortedEvent `` /* 126-byte string literal not displayed */
}

func (*RaftEvent_SendSnapshotAborted) MarshalTo added in v0.8.0

func (m *RaftEvent_SendSnapshotAborted) MarshalTo(dAtA []byte) (int, error)

func (*RaftEvent_SendSnapshotAborted) MarshalToSizedBuffer added in v0.8.0

func (m *RaftEvent_SendSnapshotAborted) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RaftEvent_SendSnapshotAborted) Size added in v0.8.0

func (m *RaftEvent_SendSnapshotAborted) Size() (n int)

type RaftEvent_SendSnapshotCompleted added in v0.8.0

type RaftEvent_SendSnapshotCompleted struct {
	SendSnapshotCompleted *SendSnapshotCompletedEvent `` /* 132-byte string literal not displayed */
}

func (*RaftEvent_SendSnapshotCompleted) MarshalTo added in v0.8.0

func (m *RaftEvent_SendSnapshotCompleted) MarshalTo(dAtA []byte) (int, error)

func (*RaftEvent_SendSnapshotCompleted) MarshalToSizedBuffer added in v0.8.0

func (m *RaftEvent_SendSnapshotCompleted) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RaftEvent_SendSnapshotCompleted) Size added in v0.8.0

func (m *RaftEvent_SendSnapshotCompleted) Size() (n int)

type RaftEvent_SendSnapshotStarted added in v0.8.0

type RaftEvent_SendSnapshotStarted struct {
	SendSnapshotStarted *SendSnapshotStartedEvent `` /* 126-byte string literal not displayed */
}

func (*RaftEvent_SendSnapshotStarted) MarshalTo added in v0.8.0

func (m *RaftEvent_SendSnapshotStarted) MarshalTo(dAtA []byte) (int, error)

func (*RaftEvent_SendSnapshotStarted) MarshalToSizedBuffer added in v0.8.0

func (m *RaftEvent_SendSnapshotStarted) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RaftEvent_SendSnapshotStarted) Size added in v0.8.0

func (m *RaftEvent_SendSnapshotStarted) Size() (n int)

type RaftEvent_SnapshotCompacted added in v0.8.0

type RaftEvent_SnapshotCompacted struct {
	SnapshotCompacted *SnapshotCompactedEvent `protobuf:"bytes,11,opt,name=snapshot_compacted,json=snapshotCompacted,proto3,oneof" json:"snapshot_compacted,omitempty"`
}

func (*RaftEvent_SnapshotCompacted) MarshalTo added in v0.8.0

func (m *RaftEvent_SnapshotCompacted) MarshalTo(dAtA []byte) (int, error)

func (*RaftEvent_SnapshotCompacted) MarshalToSizedBuffer added in v0.8.0

func (m *RaftEvent_SnapshotCompacted) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RaftEvent_SnapshotCompacted) Size added in v0.8.0

func (m *RaftEvent_SnapshotCompacted) Size() (n int)

type RaftEvent_SnapshotCreated added in v0.8.0

type RaftEvent_SnapshotCreated struct {
	SnapshotCreated *SnapshotCreatedEvent `protobuf:"bytes,10,opt,name=snapshot_created,json=snapshotCreated,proto3,oneof" json:"snapshot_created,omitempty"`
}

func (*RaftEvent_SnapshotCreated) MarshalTo added in v0.8.0

func (m *RaftEvent_SnapshotCreated) MarshalTo(dAtA []byte) (int, error)

func (*RaftEvent_SnapshotCreated) MarshalToSizedBuffer added in v0.8.0

func (m *RaftEvent_SnapshotCreated) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RaftEvent_SnapshotCreated) Size added in v0.8.0

func (m *RaftEvent_SnapshotCreated) Size() (n int)

type RaftEvent_SnapshotReceived added in v0.8.0

type RaftEvent_SnapshotReceived struct {
	SnapshotReceived *SnapshotReceivedEvent `protobuf:"bytes,8,opt,name=snapshot_received,json=snapshotReceived,proto3,oneof" json:"snapshot_received,omitempty"`
}

func (*RaftEvent_SnapshotReceived) MarshalTo added in v0.8.0

func (m *RaftEvent_SnapshotReceived) MarshalTo(dAtA []byte) (int, error)

func (*RaftEvent_SnapshotReceived) MarshalToSizedBuffer added in v0.8.0

func (m *RaftEvent_SnapshotReceived) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RaftEvent_SnapshotReceived) Size added in v0.8.0

func (m *RaftEvent_SnapshotReceived) Size() (n int)

type RaftEvent_SnapshotRecovered added in v0.8.0

type RaftEvent_SnapshotRecovered struct {
	SnapshotRecovered *SnapshotRecoveredEvent `protobuf:"bytes,9,opt,name=snapshot_recovered,json=snapshotRecovered,proto3,oneof" json:"snapshot_recovered,omitempty"`
}

func (*RaftEvent_SnapshotRecovered) MarshalTo added in v0.8.0

func (m *RaftEvent_SnapshotRecovered) MarshalTo(dAtA []byte) (int, error)

func (*RaftEvent_SnapshotRecovered) MarshalToSizedBuffer added in v0.8.0

func (m *RaftEvent_SnapshotRecovered) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RaftEvent_SnapshotRecovered) Size added in v0.8.0

func (m *RaftEvent_SnapshotRecovered) Size() (n int)

type RaftEventsClient added in v0.8.0

type RaftEventsClient interface {
	Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (RaftEvents_SubscribeClient, error)
}

RaftEventsClient is the client API for RaftEvents service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewRaftEventsClient added in v0.8.0

func NewRaftEventsClient(cc *grpc.ClientConn) RaftEventsClient

type RaftEventsServer added in v0.8.0

type RaftEventsServer interface {
	Subscribe(*SubscribeRequest, RaftEvents_SubscribeServer) error
}

RaftEventsServer is the server API for RaftEvents service.

type RaftEvents_SubscribeClient added in v0.8.0

type RaftEvents_SubscribeClient interface {
	Recv() (*RaftEvent, error)
	grpc.ClientStream
}

type RaftEvents_SubscribeServer added in v0.8.0

type RaftEvents_SubscribeServer interface {
	Send(*RaftEvent) error
	grpc.ServerStream
}

type SendSnapshotAbortedEvent added in v0.8.0

type SendSnapshotAbortedEvent struct {
	SnapshotEvent `protobuf:"bytes,1,opt,name=snapshot,proto3,embedded=snapshot" json:"snapshot"`
	To            string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
}

func (*SendSnapshotAbortedEvent) Descriptor added in v0.8.0

func (*SendSnapshotAbortedEvent) Descriptor() ([]byte, []int)

func (*SendSnapshotAbortedEvent) GetTo added in v0.8.0

func (m *SendSnapshotAbortedEvent) GetTo() string

func (*SendSnapshotAbortedEvent) Marshal added in v0.8.0

func (m *SendSnapshotAbortedEvent) Marshal() (dAtA []byte, err error)

func (*SendSnapshotAbortedEvent) MarshalTo added in v0.8.0

func (m *SendSnapshotAbortedEvent) MarshalTo(dAtA []byte) (int, error)

func (*SendSnapshotAbortedEvent) MarshalToSizedBuffer added in v0.8.0

func (m *SendSnapshotAbortedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SendSnapshotAbortedEvent) ProtoMessage added in v0.8.0

func (*SendSnapshotAbortedEvent) ProtoMessage()

func (*SendSnapshotAbortedEvent) Reset added in v0.8.0

func (m *SendSnapshotAbortedEvent) Reset()

func (*SendSnapshotAbortedEvent) Size added in v0.8.0

func (m *SendSnapshotAbortedEvent) Size() (n int)

func (*SendSnapshotAbortedEvent) String added in v0.8.0

func (m *SendSnapshotAbortedEvent) String() string

func (*SendSnapshotAbortedEvent) Unmarshal added in v0.8.0

func (m *SendSnapshotAbortedEvent) Unmarshal(dAtA []byte) error

func (*SendSnapshotAbortedEvent) XXX_DiscardUnknown added in v0.8.0

func (m *SendSnapshotAbortedEvent) XXX_DiscardUnknown()

func (*SendSnapshotAbortedEvent) XXX_Marshal added in v0.8.0

func (m *SendSnapshotAbortedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SendSnapshotAbortedEvent) XXX_Merge added in v0.8.0

func (m *SendSnapshotAbortedEvent) XXX_Merge(src proto.Message)

func (*SendSnapshotAbortedEvent) XXX_Size added in v0.8.0

func (m *SendSnapshotAbortedEvent) XXX_Size() int

func (*SendSnapshotAbortedEvent) XXX_Unmarshal added in v0.8.0

func (m *SendSnapshotAbortedEvent) XXX_Unmarshal(b []byte) error

type SendSnapshotCompletedEvent added in v0.8.0

type SendSnapshotCompletedEvent struct {
	SnapshotEvent `protobuf:"bytes,1,opt,name=snapshot,proto3,embedded=snapshot" json:"snapshot"`
	To            string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
}

func (*SendSnapshotCompletedEvent) Descriptor added in v0.8.0

func (*SendSnapshotCompletedEvent) Descriptor() ([]byte, []int)

func (*SendSnapshotCompletedEvent) GetTo added in v0.8.0

func (*SendSnapshotCompletedEvent) Marshal added in v0.8.0

func (m *SendSnapshotCompletedEvent) Marshal() (dAtA []byte, err error)

func (*SendSnapshotCompletedEvent) MarshalTo added in v0.8.0

func (m *SendSnapshotCompletedEvent) MarshalTo(dAtA []byte) (int, error)

func (*SendSnapshotCompletedEvent) MarshalToSizedBuffer added in v0.8.0

func (m *SendSnapshotCompletedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SendSnapshotCompletedEvent) ProtoMessage added in v0.8.0

func (*SendSnapshotCompletedEvent) ProtoMessage()

func (*SendSnapshotCompletedEvent) Reset added in v0.8.0

func (m *SendSnapshotCompletedEvent) Reset()

func (*SendSnapshotCompletedEvent) Size added in v0.8.0

func (m *SendSnapshotCompletedEvent) Size() (n int)

func (*SendSnapshotCompletedEvent) String added in v0.8.0

func (m *SendSnapshotCompletedEvent) String() string

func (*SendSnapshotCompletedEvent) Unmarshal added in v0.8.0

func (m *SendSnapshotCompletedEvent) Unmarshal(dAtA []byte) error

func (*SendSnapshotCompletedEvent) XXX_DiscardUnknown added in v0.8.0

func (m *SendSnapshotCompletedEvent) XXX_DiscardUnknown()

func (*SendSnapshotCompletedEvent) XXX_Marshal added in v0.8.0

func (m *SendSnapshotCompletedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SendSnapshotCompletedEvent) XXX_Merge added in v0.8.0

func (m *SendSnapshotCompletedEvent) XXX_Merge(src proto.Message)

func (*SendSnapshotCompletedEvent) XXX_Size added in v0.8.0

func (m *SendSnapshotCompletedEvent) XXX_Size() int

func (*SendSnapshotCompletedEvent) XXX_Unmarshal added in v0.8.0

func (m *SendSnapshotCompletedEvent) XXX_Unmarshal(b []byte) error

type SendSnapshotStartedEvent added in v0.8.0

type SendSnapshotStartedEvent struct {
	SnapshotEvent `protobuf:"bytes,1,opt,name=snapshot,proto3,embedded=snapshot" json:"snapshot"`
	To            string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
}

func (*SendSnapshotStartedEvent) Descriptor added in v0.8.0

func (*SendSnapshotStartedEvent) Descriptor() ([]byte, []int)

func (*SendSnapshotStartedEvent) GetTo added in v0.8.0

func (m *SendSnapshotStartedEvent) GetTo() string

func (*SendSnapshotStartedEvent) Marshal added in v0.8.0

func (m *SendSnapshotStartedEvent) Marshal() (dAtA []byte, err error)

func (*SendSnapshotStartedEvent) MarshalTo added in v0.8.0

func (m *SendSnapshotStartedEvent) MarshalTo(dAtA []byte) (int, error)

func (*SendSnapshotStartedEvent) MarshalToSizedBuffer added in v0.8.0

func (m *SendSnapshotStartedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SendSnapshotStartedEvent) ProtoMessage added in v0.8.0

func (*SendSnapshotStartedEvent) ProtoMessage()

func (*SendSnapshotStartedEvent) Reset added in v0.8.0

func (m *SendSnapshotStartedEvent) Reset()

func (*SendSnapshotStartedEvent) Size added in v0.8.0

func (m *SendSnapshotStartedEvent) Size() (n int)

func (*SendSnapshotStartedEvent) String added in v0.8.0

func (m *SendSnapshotStartedEvent) String() string

func (*SendSnapshotStartedEvent) Unmarshal added in v0.8.0

func (m *SendSnapshotStartedEvent) Unmarshal(dAtA []byte) error

func (*SendSnapshotStartedEvent) XXX_DiscardUnknown added in v0.8.0

func (m *SendSnapshotStartedEvent) XXX_DiscardUnknown()

func (*SendSnapshotStartedEvent) XXX_Marshal added in v0.8.0

func (m *SendSnapshotStartedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SendSnapshotStartedEvent) XXX_Merge added in v0.8.0

func (m *SendSnapshotStartedEvent) XXX_Merge(src proto.Message)

func (*SendSnapshotStartedEvent) XXX_Size added in v0.8.0

func (m *SendSnapshotStartedEvent) XXX_Size() int

func (*SendSnapshotStartedEvent) XXX_Unmarshal added in v0.8.0

func (m *SendSnapshotStartedEvent) XXX_Unmarshal(b []byte) error

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is a Raft server

func (*Server) Start

func (s *Server) Start() error

Start starts the server

func (*Server) Stop

func (s *Server) Stop() error

Stop stops the server

type SnapshotCompactedEvent added in v0.8.0

type SnapshotCompactedEvent struct {
	SnapshotEvent `protobuf:"bytes,1,opt,name=snapshot,proto3,embedded=snapshot" json:"snapshot"`
}

func (*SnapshotCompactedEvent) Descriptor added in v0.8.0

func (*SnapshotCompactedEvent) Descriptor() ([]byte, []int)

func (*SnapshotCompactedEvent) Marshal added in v0.8.0

func (m *SnapshotCompactedEvent) Marshal() (dAtA []byte, err error)

func (*SnapshotCompactedEvent) MarshalTo added in v0.8.0

func (m *SnapshotCompactedEvent) MarshalTo(dAtA []byte) (int, error)

func (*SnapshotCompactedEvent) MarshalToSizedBuffer added in v0.8.0

func (m *SnapshotCompactedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SnapshotCompactedEvent) ProtoMessage added in v0.8.0

func (*SnapshotCompactedEvent) ProtoMessage()

func (*SnapshotCompactedEvent) Reset added in v0.8.0

func (m *SnapshotCompactedEvent) Reset()

func (*SnapshotCompactedEvent) Size added in v0.8.0

func (m *SnapshotCompactedEvent) Size() (n int)

func (*SnapshotCompactedEvent) String added in v0.8.0

func (m *SnapshotCompactedEvent) String() string

func (*SnapshotCompactedEvent) Unmarshal added in v0.8.0

func (m *SnapshotCompactedEvent) Unmarshal(dAtA []byte) error

func (*SnapshotCompactedEvent) XXX_DiscardUnknown added in v0.8.0

func (m *SnapshotCompactedEvent) XXX_DiscardUnknown()

func (*SnapshotCompactedEvent) XXX_Marshal added in v0.8.0

func (m *SnapshotCompactedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SnapshotCompactedEvent) XXX_Merge added in v0.8.0

func (m *SnapshotCompactedEvent) XXX_Merge(src proto.Message)

func (*SnapshotCompactedEvent) XXX_Size added in v0.8.0

func (m *SnapshotCompactedEvent) XXX_Size() int

func (*SnapshotCompactedEvent) XXX_Unmarshal added in v0.8.0

func (m *SnapshotCompactedEvent) XXX_Unmarshal(b []byte) error

type SnapshotCreatedEvent added in v0.8.0

type SnapshotCreatedEvent struct {
	SnapshotEvent `protobuf:"bytes,1,opt,name=snapshot,proto3,embedded=snapshot" json:"snapshot"`
}

func (*SnapshotCreatedEvent) Descriptor added in v0.8.0

func (*SnapshotCreatedEvent) Descriptor() ([]byte, []int)

func (*SnapshotCreatedEvent) Marshal added in v0.8.0

func (m *SnapshotCreatedEvent) Marshal() (dAtA []byte, err error)

func (*SnapshotCreatedEvent) MarshalTo added in v0.8.0

func (m *SnapshotCreatedEvent) MarshalTo(dAtA []byte) (int, error)

func (*SnapshotCreatedEvent) MarshalToSizedBuffer added in v0.8.0

func (m *SnapshotCreatedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SnapshotCreatedEvent) ProtoMessage added in v0.8.0

func (*SnapshotCreatedEvent) ProtoMessage()

func (*SnapshotCreatedEvent) Reset added in v0.8.0

func (m *SnapshotCreatedEvent) Reset()

func (*SnapshotCreatedEvent) Size added in v0.8.0

func (m *SnapshotCreatedEvent) Size() (n int)

func (*SnapshotCreatedEvent) String added in v0.8.0

func (m *SnapshotCreatedEvent) String() string

func (*SnapshotCreatedEvent) Unmarshal added in v0.8.0

func (m *SnapshotCreatedEvent) Unmarshal(dAtA []byte) error

func (*SnapshotCreatedEvent) XXX_DiscardUnknown added in v0.8.0

func (m *SnapshotCreatedEvent) XXX_DiscardUnknown()

func (*SnapshotCreatedEvent) XXX_Marshal added in v0.8.0

func (m *SnapshotCreatedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SnapshotCreatedEvent) XXX_Merge added in v0.8.0

func (m *SnapshotCreatedEvent) XXX_Merge(src proto.Message)

func (*SnapshotCreatedEvent) XXX_Size added in v0.8.0

func (m *SnapshotCreatedEvent) XXX_Size() int

func (*SnapshotCreatedEvent) XXX_Unmarshal added in v0.8.0

func (m *SnapshotCreatedEvent) XXX_Unmarshal(b []byte) error

type SnapshotEvent added in v0.8.0

type SnapshotEvent struct {
	PartitionEvent `protobuf:"bytes,1,opt,name=partition,proto3,embedded=partition" json:"partition"`
	Index          uint64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
}

func (*SnapshotEvent) Descriptor added in v0.8.0

func (*SnapshotEvent) Descriptor() ([]byte, []int)

func (*SnapshotEvent) GetIndex added in v0.8.0

func (m *SnapshotEvent) GetIndex() uint64

func (*SnapshotEvent) Marshal added in v0.8.0

func (m *SnapshotEvent) Marshal() (dAtA []byte, err error)

func (*SnapshotEvent) MarshalTo added in v0.8.0

func (m *SnapshotEvent) MarshalTo(dAtA []byte) (int, error)

func (*SnapshotEvent) MarshalToSizedBuffer added in v0.8.0

func (m *SnapshotEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SnapshotEvent) ProtoMessage added in v0.8.0

func (*SnapshotEvent) ProtoMessage()

func (*SnapshotEvent) Reset added in v0.8.0

func (m *SnapshotEvent) Reset()

func (*SnapshotEvent) Size added in v0.8.0

func (m *SnapshotEvent) Size() (n int)

func (*SnapshotEvent) String added in v0.8.0

func (m *SnapshotEvent) String() string

func (*SnapshotEvent) Unmarshal added in v0.8.0

func (m *SnapshotEvent) Unmarshal(dAtA []byte) error

func (*SnapshotEvent) XXX_DiscardUnknown added in v0.8.0

func (m *SnapshotEvent) XXX_DiscardUnknown()

func (*SnapshotEvent) XXX_Marshal added in v0.8.0

func (m *SnapshotEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SnapshotEvent) XXX_Merge added in v0.8.0

func (m *SnapshotEvent) XXX_Merge(src proto.Message)

func (*SnapshotEvent) XXX_Size added in v0.8.0

func (m *SnapshotEvent) XXX_Size() int

func (*SnapshotEvent) XXX_Unmarshal added in v0.8.0

func (m *SnapshotEvent) XXX_Unmarshal(b []byte) error

type SnapshotReceivedEvent added in v0.8.0

type SnapshotReceivedEvent struct {
	SnapshotEvent `protobuf:"bytes,1,opt,name=snapshot,proto3,embedded=snapshot" json:"snapshot"`
	From          string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
}

func (*SnapshotReceivedEvent) Descriptor added in v0.8.0

func (*SnapshotReceivedEvent) Descriptor() ([]byte, []int)

func (*SnapshotReceivedEvent) GetFrom added in v0.8.0

func (m *SnapshotReceivedEvent) GetFrom() string

func (*SnapshotReceivedEvent) Marshal added in v0.8.0

func (m *SnapshotReceivedEvent) Marshal() (dAtA []byte, err error)

func (*SnapshotReceivedEvent) MarshalTo added in v0.8.0

func (m *SnapshotReceivedEvent) MarshalTo(dAtA []byte) (int, error)

func (*SnapshotReceivedEvent) MarshalToSizedBuffer added in v0.8.0

func (m *SnapshotReceivedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SnapshotReceivedEvent) ProtoMessage added in v0.8.0

func (*SnapshotReceivedEvent) ProtoMessage()

func (*SnapshotReceivedEvent) Reset added in v0.8.0

func (m *SnapshotReceivedEvent) Reset()

func (*SnapshotReceivedEvent) Size added in v0.8.0

func (m *SnapshotReceivedEvent) Size() (n int)

func (*SnapshotReceivedEvent) String added in v0.8.0

func (m *SnapshotReceivedEvent) String() string

func (*SnapshotReceivedEvent) Unmarshal added in v0.8.0

func (m *SnapshotReceivedEvent) Unmarshal(dAtA []byte) error

func (*SnapshotReceivedEvent) XXX_DiscardUnknown added in v0.8.0

func (m *SnapshotReceivedEvent) XXX_DiscardUnknown()

func (*SnapshotReceivedEvent) XXX_Marshal added in v0.8.0

func (m *SnapshotReceivedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SnapshotReceivedEvent) XXX_Merge added in v0.8.0

func (m *SnapshotReceivedEvent) XXX_Merge(src proto.Message)

func (*SnapshotReceivedEvent) XXX_Size added in v0.8.0

func (m *SnapshotReceivedEvent) XXX_Size() int

func (*SnapshotReceivedEvent) XXX_Unmarshal added in v0.8.0

func (m *SnapshotReceivedEvent) XXX_Unmarshal(b []byte) error

type SnapshotRecoveredEvent added in v0.8.0

type SnapshotRecoveredEvent struct {
	SnapshotEvent `protobuf:"bytes,1,opt,name=snapshot,proto3,embedded=snapshot" json:"snapshot"`
}

func (*SnapshotRecoveredEvent) Descriptor added in v0.8.0

func (*SnapshotRecoveredEvent) Descriptor() ([]byte, []int)

func (*SnapshotRecoveredEvent) Marshal added in v0.8.0

func (m *SnapshotRecoveredEvent) Marshal() (dAtA []byte, err error)

func (*SnapshotRecoveredEvent) MarshalTo added in v0.8.0

func (m *SnapshotRecoveredEvent) MarshalTo(dAtA []byte) (int, error)

func (*SnapshotRecoveredEvent) MarshalToSizedBuffer added in v0.8.0

func (m *SnapshotRecoveredEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SnapshotRecoveredEvent) ProtoMessage added in v0.8.0

func (*SnapshotRecoveredEvent) ProtoMessage()

func (*SnapshotRecoveredEvent) Reset added in v0.8.0

func (m *SnapshotRecoveredEvent) Reset()

func (*SnapshotRecoveredEvent) Size added in v0.8.0

func (m *SnapshotRecoveredEvent) Size() (n int)

func (*SnapshotRecoveredEvent) String added in v0.8.0

func (m *SnapshotRecoveredEvent) String() string

func (*SnapshotRecoveredEvent) Unmarshal added in v0.8.0

func (m *SnapshotRecoveredEvent) Unmarshal(dAtA []byte) error

func (*SnapshotRecoveredEvent) XXX_DiscardUnknown added in v0.8.0

func (m *SnapshotRecoveredEvent) XXX_DiscardUnknown()

func (*SnapshotRecoveredEvent) XXX_Marshal added in v0.8.0

func (m *SnapshotRecoveredEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SnapshotRecoveredEvent) XXX_Merge added in v0.8.0

func (m *SnapshotRecoveredEvent) XXX_Merge(src proto.Message)

func (*SnapshotRecoveredEvent) XXX_Size added in v0.8.0

func (m *SnapshotRecoveredEvent) XXX_Size() int

func (*SnapshotRecoveredEvent) XXX_Unmarshal added in v0.8.0

func (m *SnapshotRecoveredEvent) XXX_Unmarshal(b []byte) error

type StateMachine

type StateMachine struct {
	// contains filtered or unexported fields
}

StateMachine is a Raft state machine

func (*StateMachine) Close

func (s *StateMachine) Close() error

Close closes the state machine

func (*StateMachine) Lookup

func (s *StateMachine) Lookup(value interface{}) (interface{}, error)

Lookup queries the state machine state

func (*StateMachine) RecoverFromSnapshot

func (s *StateMachine) RecoverFromSnapshot(reader io.Reader, files []statemachine.SnapshotFile, done <-chan struct{}) error

RecoverFromSnapshot recovers the state machine state from a snapshot

func (*StateMachine) SaveSnapshot

func (s *StateMachine) SaveSnapshot(writer io.Writer, files statemachine.ISnapshotFileCollection, done <-chan struct{}) error

SaveSnapshot saves a snapshot of the state machine state

func (*StateMachine) Update

func (s *StateMachine) Update(bytes []byte) (statemachine.Result, error)

Update updates the state machine state

type SubscribeRequest added in v0.8.0

type SubscribeRequest struct {
}

func (*SubscribeRequest) Descriptor added in v0.8.0

func (*SubscribeRequest) Descriptor() ([]byte, []int)

func (*SubscribeRequest) Marshal added in v0.8.0

func (m *SubscribeRequest) Marshal() (dAtA []byte, err error)

func (*SubscribeRequest) MarshalTo added in v0.8.0

func (m *SubscribeRequest) MarshalTo(dAtA []byte) (int, error)

func (*SubscribeRequest) MarshalToSizedBuffer added in v0.8.0

func (m *SubscribeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SubscribeRequest) ProtoMessage added in v0.8.0

func (*SubscribeRequest) ProtoMessage()

func (*SubscribeRequest) Reset added in v0.8.0

func (m *SubscribeRequest) Reset()

func (*SubscribeRequest) Size added in v0.8.0

func (m *SubscribeRequest) Size() (n int)

func (*SubscribeRequest) String added in v0.8.0

func (m *SubscribeRequest) String() string

func (*SubscribeRequest) Unmarshal added in v0.8.0

func (m *SubscribeRequest) Unmarshal(dAtA []byte) error

func (*SubscribeRequest) XXX_DiscardUnknown added in v0.8.0

func (m *SubscribeRequest) XXX_DiscardUnknown()

func (*SubscribeRequest) XXX_Marshal added in v0.8.0

func (m *SubscribeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SubscribeRequest) XXX_Merge added in v0.8.0

func (m *SubscribeRequest) XXX_Merge(src proto.Message)

func (*SubscribeRequest) XXX_Size added in v0.8.0

func (m *SubscribeRequest) XXX_Size() int

func (*SubscribeRequest) XXX_Unmarshal added in v0.8.0

func (m *SubscribeRequest) XXX_Unmarshal(b []byte) error

type UnimplementedRaftEventsServer added in v0.8.0

type UnimplementedRaftEventsServer struct {
}

UnimplementedRaftEventsServer can be embedded to have forward compatible implementations.

func (*UnimplementedRaftEventsServer) Subscribe added in v0.8.0

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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