Documentation ¶
Index ¶
- Constants
- type DB
- type Maybe
- func (s *Maybe) Close(ctx context.Context) error
- func (s *Maybe) Commit(ctx context.Context, at uint64) error
- func (s *Maybe) Delete(ctx context.Context, key []byte) error
- func (s *Maybe) Iterator(tx *badger.Txn, readTs uint64, opt badger.IteratorOptions) pending.Iterator
- func (s *Maybe) New(ctx context.Context, readTs uint64) error
- func (s *Maybe) Set(ctx context.Context, key, value []byte, expiresAt uint64) error
- type Mode
- type Option
- func WithAddrs(addrs ...string) Option
- func WithClientCA(ca []byte) Option
- func WithClientCert(cert []byte) Option
- func WithClientKey(key []byte) Option
- func WithEncryptionKey(key string) Option
- func WithGRPCPort(port int) Option
- func WithGossipPort(port int) Option
- func WithMode(mode Mode) Option
- func WithName(name string) Option
- func WithRaftStartOptions(opts ...raft.StartOption) Option
- func WithServerCert(cert []byte) Option
- func WithServerKey(key []byte) Option
- func WithTLSConfig(config *tls.Config) Option
- func WithTick(ms int) Option
- type Options
- type Replication
- type Tx
Constants ¶
View Source
const MaxMsgSize = 4 * 1000 * 1000
MaxMsgSize is the maximum message size accepted by the gRPC server. It should be 4MiB, but we set it to 4MB to avoid exceeding the allowed size
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface { protodb.DB Path() string InMemory() bool MaxVersion() uint64 SetVersion(v uint64) Drop() error Load(ctx context.Context, r io.Reader) (uint64, error) Stream(ctx context.Context, at, since uint64, w io.Writer) error LoadDescriptors(ctx context.Context) error NewWriteBatchAt(readTs uint64) *badger.WriteBatch ValueThreshold() int64 MaxBatchCount() int64 MaxBatchSize() int64 Close() error }
type Option ¶
type Option func(o *Options)
func WithClientCA ¶
func WithClientCert ¶
func WithClientKey ¶
func WithEncryptionKey ¶
func WithGRPCPort ¶
func WithGossipPort ¶
func WithRaftStartOptions ¶
func WithRaftStartOptions(opts ...raft.StartOption) Option
func WithServerCert ¶
func WithServerKey ¶
func WithTLSConfig ¶
type Options ¶
type Replication ¶
type Tx ¶
type Tx interface { Iterator(tx *badger.Txn, readTs uint64, opt badger.IteratorOptions) pending.Iterator New(ctx context.Context, readTs uint64) error Set(ctx context.Context, key, value []byte, expiresAt uint64) error Delete(ctx context.Context, key []byte) error Commit(ctx context.Context, at uint64) error Close(ctx context.Context) error }
Click to show internal directories.
Click to hide internal directories.