Documentation ¶
Index ¶
- Variables
- type Descriptor
- func (*Descriptor) Descriptor() ([]byte, []int)
- func (this *Descriptor) Equal(that interface{}) bool
- func (m *Descriptor) GetIndex() github_com_atomix_atomix_raft_node_pkg_atomix_raft_protocol.Index
- func (m *Descriptor) GetTimestamp() *time.Time
- func (m *Descriptor) Marshal() (dAtA []byte, err error)
- func (m *Descriptor) MarshalTo(dAtA []byte) (int, error)
- func (m *Descriptor) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Descriptor) ProtoMessage()
- func (m *Descriptor) Reset()
- func (m *Descriptor) Size() (n int)
- func (m *Descriptor) String() string
- func (m *Descriptor) Unmarshal(dAtA []byte) error
- func (m *Descriptor) XXX_DiscardUnknown()
- func (m *Descriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Descriptor) XXX_Merge(src proto.Message)
- func (m *Descriptor) XXX_Size() int
- func (m *Descriptor) XXX_Unmarshal(b []byte) error
- type Snapshot
- type Store
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthSnapshot = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowSnapshot = fmt.Errorf("proto: integer overflow") )
Functions ¶
This section is empty.
Types ¶
type Descriptor ¶
type Descriptor struct { Index github_com_atomix_atomix_raft_node_pkg_atomix_raft_protocol.Index `` /* 135-byte string literal not displayed */ Timestamp *time.Time `protobuf:"bytes,2,opt,name=timestamp,proto3,stdtime" json:"timestamp,omitempty"` }
Snapshot descriptor
func NewPopulatedDescriptor ¶
func NewPopulatedDescriptor(r randySnapshot, easy bool) *Descriptor
func (*Descriptor) Descriptor ¶
func (*Descriptor) Descriptor() ([]byte, []int)
func (*Descriptor) Equal ¶
func (this *Descriptor) Equal(that interface{}) bool
func (*Descriptor) GetIndex ¶
func (m *Descriptor) GetIndex() github_com_atomix_atomix_raft_node_pkg_atomix_raft_protocol.Index
func (*Descriptor) GetTimestamp ¶
func (m *Descriptor) GetTimestamp() *time.Time
func (*Descriptor) Marshal ¶
func (m *Descriptor) Marshal() (dAtA []byte, err error)
func (*Descriptor) MarshalToSizedBuffer ¶
func (m *Descriptor) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Descriptor) ProtoMessage ¶
func (*Descriptor) ProtoMessage()
func (*Descriptor) Reset ¶
func (m *Descriptor) Reset()
func (*Descriptor) Size ¶
func (m *Descriptor) Size() (n int)
func (*Descriptor) String ¶
func (m *Descriptor) String() string
func (*Descriptor) Unmarshal ¶
func (m *Descriptor) Unmarshal(dAtA []byte) error
func (*Descriptor) XXX_DiscardUnknown ¶
func (m *Descriptor) XXX_DiscardUnknown()
func (*Descriptor) XXX_Marshal ¶
func (m *Descriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Descriptor) XXX_Merge ¶
func (m *Descriptor) XXX_Merge(src proto.Message)
func (*Descriptor) XXX_Size ¶
func (m *Descriptor) XXX_Size() int
func (*Descriptor) XXX_Unmarshal ¶
func (m *Descriptor) XXX_Unmarshal(b []byte) error
type Snapshot ¶
type Snapshot interface { // Index is the index at which the snapshot was taken Index() raft.Index // Timestamp is the time at which the snapshot was taken Timestamp() time.Time // Reader returns a new snapshot reader Reader() io.ReadCloser // Writer returns a new snapshot writer Writer() io.WriteCloser }
Snapshot is a single state machine snapshot
type Store ¶
type Store interface { // NewSnapshot creates a new snapshot NewSnapshot(index raft.Index, timestamp time.Time) Snapshot // CurrentSnapshot returns the current snapshot CurrentSnapshot() Snapshot // Close closes the store Close() error }
Store is an interface for managing snapshots
func NewMemoryStore ¶
func NewMemoryStore() Store
NewMemoryStore creates a new in-memory snapshot store
Click to show internal directories.
Click to hide internal directories.