Documentation
¶
Index ¶
- Constants
- type DB
- type Maybe
- func (s *Maybe) Close(ctx context.Context) error
- func (s *Maybe) CommitAt(ctx context.Context, at uint64) error
- func (s *Maybe) Delete(ctx context.Context, key []byte) error
- func (s *Maybe) Get(ctx context.Context, key []byte) (pending.Item, error)
- func (s *Maybe) Iterator(opt badger.IteratorOptions) pending.Iterator
- func (s *Maybe) New(ctx context.Context, tx *badger.Txn) 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 WithExtraServices(services ...func(registrar grpc.ServiceRegistrar)) Option
- func WithGRPCPort(port int) Option
- func WithGossipPort(port int) Option
- func WithMode(mode Mode) Option
- func WithName(name string) 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
- type WriteBatch
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 {
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
NewWriteBatchAt(readTs uint64) 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 WithExtraServices ¶
func WithExtraServices(services ...func(registrar grpc.ServiceRegistrar)) Option
func WithGRPCPort ¶
func WithGossipPort ¶
func WithServerCert ¶
func WithServerKey ¶
func WithTLSConfig ¶
type Options ¶
type Replication ¶
type Tx ¶
type Tx interface {
New(ctx context.Context, tx *badger.Txn) error
Get(ctx context.Context, key []byte) (pending.Item, error)
Set(ctx context.Context, key []byte, val []byte, expires uint64) error
Delete(ctx context.Context, key []byte) error
Commit(ctx context.Context, at uint64) error
Iterator(opt badger.IteratorOptions) pending.Iterator
Close(ctx context.Context) error
}
Click to show internal directories.
Click to hide internal directories.