Versions in this module Expand all Collapse all v1 v1.6.4 Feb 24, 2021 Changes in this version + const EnvVaultRaftNodeID + const EnvVaultRaftPath + var File_physical_raft_types_proto protoreflect.FileDescriptor + func EnsurePath(path string, dir bool) error + func NewRaftBackend(conf map[string]string, logger log.Logger) (physical.Backend, error) + func NewRaftLayer(logger log.Logger, raftTLSKeyring *TLSKeyring, ...) (*raftLayer, error) + type BoltSnapshotSink struct + func (s *BoltSnapshotSink) Cancel() error + func (s *BoltSnapshotSink) Close() error + func (s *BoltSnapshotSink) ID() string + func (s *BoltSnapshotSink) Write(b []byte) (int, error) + type BoltSnapshotStore struct + func NewBoltSnapshotStore(base string, logger log.Logger, fsm *FSM) (*BoltSnapshotStore, error) + func (f *BoltSnapshotStore) Create(version raft.SnapshotVersion, index, term uint64, ...) (raft.SnapshotSink, error) + func (f *BoltSnapshotStore) List() ([]*raft.SnapshotMeta, error) + func (f *BoltSnapshotStore) Open(id string) (*raft.SnapshotMeta, io.ReadCloser, error) + func (f *BoltSnapshotStore) ReapSnapshots() error + type ConfigurationValue struct + Index uint64 + Servers []*Server + func (*ConfigurationValue) Descriptor() ([]byte, []int) + func (*ConfigurationValue) ProtoMessage() + func (x *ConfigurationValue) GetIndex() uint64 + func (x *ConfigurationValue) GetServers() []*Server + func (x *ConfigurationValue) ProtoReflect() protoreflect.Message + func (x *ConfigurationValue) Reset() + func (x *ConfigurationValue) String() string + type FSM struct + func NewFSM(path string, logger log.Logger) (*FSM, error) + func (f *FSM) Apply(log *raft.Log) interface{} + func (f *FSM) ApplyBatch(logs []*raft.Log) []interface{} + func (f *FSM) Close() error + func (f *FSM) Delete(ctx context.Context, path string) error + func (f *FSM) DeletePrefix(ctx context.Context, prefix string) error + func (f *FSM) Get(ctx context.Context, path string) (*physical.Entry, error) + func (f *FSM) LatestState() (*IndexValue, *ConfigurationValue) + func (f *FSM) List(ctx context.Context, prefix string) ([]string, error) + func (f *FSM) Put(ctx context.Context, entry *physical.Entry) error + func (f *FSM) Restore(r io.ReadCloser) error + func (f *FSM) SetNoopRestore(enabled bool) + func (f *FSM) Snapshot() (raft.FSMSnapshot, error) + func (f *FSM) Transaction(ctx context.Context, txns []*physical.TxnEntry) error + type FSMApplyResponse struct + Success bool + type FSMChunkStorage struct + func (f *FSMChunkStorage) FinalizeOp(opNum uint64) ([]*raftchunking.ChunkInfo, error) + func (f *FSMChunkStorage) GetChunks() (raftchunking.ChunkMap, error) + func (f *FSMChunkStorage) RestoreChunks(chunks raftchunking.ChunkMap) error + func (f *FSMChunkStorage) StoreChunk(chunk *raftchunking.ChunkInfo) (bool, error) + type IndexValue struct + Index uint64 + Term uint64 + func (*IndexValue) Descriptor() ([]byte, []int) + func (*IndexValue) ProtoMessage() + func (x *IndexValue) GetIndex() uint64 + func (x *IndexValue) GetTerm() uint64 + func (x *IndexValue) ProtoReflect() protoreflect.Message + func (x *IndexValue) Reset() + func (x *IndexValue) String() string + type LeaderJoinInfo struct + AutoJoin string + AutoJoinPort uint + AutoJoinScheme string + LeaderAPIAddr string + LeaderCACert string + LeaderCACertFile string + LeaderClientCert string + LeaderClientCertFile string + LeaderClientKey string + LeaderClientKeyFile string + LeaderTLSServerName string + Retry bool + TLSConfig *tls.Config + type LogData struct + Operations []*LogOperation + func (*LogData) Descriptor() ([]byte, []int) + func (*LogData) ProtoMessage() + func (x *LogData) GetOperations() []*LogOperation + func (x *LogData) ProtoReflect() protoreflect.Message + func (x *LogData) Reset() + func (x *LogData) String() string + type LogOperation struct + Flags uint64 + Key string + OpType uint32 + Value []byte + func (*LogOperation) Descriptor() ([]byte, []int) + func (*LogOperation) ProtoMessage() + func (x *LogOperation) GetFlags() uint64 + func (x *LogOperation) GetKey() string + func (x *LogOperation) GetOpType() uint32 + func (x *LogOperation) GetValue() []byte + func (x *LogOperation) ProtoReflect() protoreflect.Message + func (x *LogOperation) Reset() + func (x *LogOperation) String() string + type Peer struct + Address string + ID string + type RaftBackend struct + func (b *RaftBackend) AddNonVotingPeer(ctx context.Context, peerID, clusterAddr string) error + func (b *RaftBackend) AddPeer(ctx context.Context, peerID, clusterAddr string) error + func (b *RaftBackend) AppliedIndex() uint64 + func (b *RaftBackend) Bootstrap(peers []Peer) error + func (b *RaftBackend) Close() error + func (b *RaftBackend) CommittedIndex() uint64 + func (b *RaftBackend) Delete(ctx context.Context, path string) error + func (b *RaftBackend) Get(ctx context.Context, path string) (*physical.Entry, error) + func (b *RaftBackend) GetConfiguration(ctx context.Context) (*RaftConfigurationResponse, error) + func (b *RaftBackend) HAEnabled() bool + func (b *RaftBackend) HasState() (bool, error) + func (b *RaftBackend) Initialized() bool + func (b *RaftBackend) JoinConfig() ([]*LeaderJoinInfo, error) + func (b *RaftBackend) List(ctx context.Context, prefix string) ([]string, error) + func (b *RaftBackend) LockWith(key, value string) (physical.Lock, error) + func (b *RaftBackend) NodeID() string + func (b *RaftBackend) Peers(ctx context.Context) ([]Peer, error) + func (b *RaftBackend) Put(ctx context.Context, entry *physical.Entry) error + func (b *RaftBackend) RemovePeer(ctx context.Context, peerID string) error + func (b *RaftBackend) RestoreSnapshot(ctx context.Context, metadata raft.SnapshotMeta, snap io.Reader) error + func (b *RaftBackend) SetRestoreCallback(restoreCb restoreCallback) + func (b *RaftBackend) SetServerAddressProvider(provider raft.ServerAddressProvider) + func (b *RaftBackend) SetTLSKeyring(keyring *TLSKeyring) error + func (b *RaftBackend) SetupCluster(ctx context.Context, opts SetupOpts) error + func (b *RaftBackend) Snapshot(out io.Writer, access *seal.Access) error + func (b *RaftBackend) SnapshotHTTP(out *logical.HTTPResponseWriter, access *seal.Access) error + func (b *RaftBackend) StartRecoveryCluster(ctx context.Context, peer Peer) error + func (b *RaftBackend) TeardownCluster(clusterListener cluster.ClusterHook) error + func (b *RaftBackend) Transaction(ctx context.Context, txns []*physical.TxnEntry) error + func (b *RaftBackend) WriteSnapshotToTemp(in io.ReadCloser, access *seal.Access) (*os.File, func(), raft.SnapshotMeta, error) + func (r *RaftBackend) SetFSMDelay(delay time.Duration) + type RaftConfigurationResponse struct + Index uint64 + Servers []*RaftServer + type RaftLock struct + func (l *RaftLock) Lock(stopCh <-chan struct{}) (<-chan struct{}, error) + func (l *RaftLock) Unlock() error + func (l *RaftLock) Value() (bool, string, error) + type RaftServer struct + Address string + Leader bool + NodeID string + ProtocolVersion string + Voter bool + type ReadCloser interface + func NewDelimitedReader(r io.Reader, maxSize int) ReadCloser + type Reader interface + ReadMsg func(msg proto.Message) error + type Server struct + Address string + Id string + Suffrage int32 + func (*Server) Descriptor() ([]byte, []int) + func (*Server) ProtoMessage() + func (x *Server) GetAddress() string + func (x *Server) GetId() string + func (x *Server) GetSuffrage() int32 + func (x *Server) ProtoReflect() protoreflect.Message + func (x *Server) Reset() + func (x *Server) String() string + type SetupOpts struct + ClusterListener cluster.ClusterHook + RecoveryModeConfig *raft.Configuration + StartAsLeader bool + TLSKeyring *TLSKeyring + type TLSKey struct + AppliedIndex uint64 + CertBytes []byte + CreatedTime time.Time + ID string + KeyParams *certutil.ClusterKeyParams + KeyType string + func GenerateTLSKey(reader io.Reader) (*TLSKey, error) + type TLSKeyring struct + ActiveKeyID string + AppliedIndex uint64 + Keys []*TLSKey + Term uint64 + func (k *TLSKeyring) GetActive() *TLSKey + type WriteCloser interface + func NewDelimitedWriter(w io.Writer) WriteCloser + type Writer interface + WriteMsg func(proto.Message) error