Documentation ¶
Index ¶
- Constants
- Variables
- func Cmp(m1, m2 proto.Message) (*pb.MessageDiff, error)
- func WithTx(ctx context.Context, db TxProvider, fn func(ctx context.Context, tx Tx) error, ...) error
- func WithTx2[R any](ctx context.Context, db TxProvider, ...) (R, error)
- type Client
- type Committer
- type DB
- type Event
- type EventType
- type Filter
- type FilterExpr
- type GetOption
- type Leader
- type Option
- type Paging
- type PagingInfo
- type Reader
- type Registerer
- type ReplicationMode
- type ReplicationOption
- type Resolverer
- type Server
- type SetOption
- type Tx
- type TxOption
- type TxProvider
- type Watcher
- type Writer
Constants ¶
View Source
const ( EventTypeEnter = pb.WatchEventEnter EventTypeLeave = pb.WatchEventLeave EventTypeUpdate = pb.WatchEventUpdate )
Variables ¶
View Source
var ( // ErrKeyNotFound is returned when key isn't found on a txn.Get. ErrKeyNotFound = badger.ErrKeyNotFound // ErrTxnTooBig is returned if too many writes are fit into a single transaction. ErrTxnTooBig = badger.ErrTxnTooBig // ErrConflict is returned when a transaction conflicts with another transaction. This can // happen if the read rows had been updated concurrently by another transaction. ErrConflict = badger.ErrConflict // ErrReadOnlyTxn is returned if an update function is called on a read-only transaction. ErrReadOnlyTxn = badger.ErrReadOnlyTxn // ErrEmptyKey is returned if an empty key is passed on an update function. ErrEmptyKey = badger.ErrEmptyKey // ErrInvalidKey is returned if the key has a special !badger! prefix, // reserved for internal usage. ErrInvalidKey = badger.ErrInvalidKey // ErrBannedKey is returned if the read/write key belongs to any banned namespace. ErrBannedKey = badger.ErrBannedKey // ErrInvalidRequest is returned if the user request is invalid. ErrInvalidRequest = badger.ErrInvalidRequest // ErrInvalidDump if a data dump made previously cannot be loaded into the database. ErrInvalidDump = badger.ErrInvalidDump // ErrWindowsNotSupported is returned when opt.ReadOnly is used on Windows ErrWindowsNotSupported = badger.ErrWindowsNotSupported // ErrPlan9NotSupported is returned when opt.ReadOnly is used on Plan 9 ErrPlan9NotSupported = badger.ErrPlan9NotSupported // ErrTruncateNeeded is returned when the value log gets corrupt, and requires truncation of // corrupt data to allow Badger to run properly. ErrTruncateNeeded = badger.ErrTruncateNeeded // ErrBlockedWrites is returned if the user called DropAll. During the process of dropping all // data from Badger, we stop accepting new writes, by returning this error. ErrBlockedWrites = badger.ErrBlockedWrites // ErrEncryptionKeyMismatch is returned when the storage key is not // matched with the key previously given. ErrEncryptionKeyMismatch = badger.ErrEncryptionKeyMismatch // ErrInvalidDataKeyID is returned if the datakey id is invalid. ErrInvalidDataKeyID = badger.ErrInvalidDataKeyID // ErrInvalidEncryptionKey is returned if length of encryption keys is invalid. ErrInvalidEncryptionKey = badger.ErrInvalidEncryptionKey // ErrDBClosed is returned when a get operation is performed after closing the DB. ErrDBClosed = badger.ErrDBClosed ErrNotLeader = protodb.ErrNotLeader ErrNoLeaderConn = protodb.ErrNoLeaderConn )
View Source
var ( WithPath = db.WithPath WithInMemory = db.WithInMemory WithBadgerOptionsFunc = db.WithBadgerOptionsFunc WithLogger = db.WithLogger WithApplyDefaults = db.WithApplyDefaults WithIgnoreProtoRegisterErrors = db.WithIgnoreProtoRegisterErrors WithProtoRegisterErrHandler = db.WithProtoRegisterErrHandler WithOnClose = db.WithOnClose WithReplication = db.WithReplication )
View Source
var ( WithPaging = protodb.WithPaging WithFilter = protodb.WithFilter WithReadFieldMaskPaths = protodb.WithReadFieldMaskPaths WithReadFieldMask = protodb.WithReadFieldMask WithReverse = protodb.WithReverse )
View Source
var ( WithTTL = protodb.WithTTL WithWriteFieldMaskPaths = protodb.WithWriteFieldMaskPaths WithWriteFieldMask = protodb.WithWriteFieldMask )
View Source
var ( ReplicationModeNone = replication.ModeNone ReplicationModeAsync = replication.ModeAsync ReplicationModeSync = replication.ModeSync )
View Source
var ( WithMode = replication.WithMode WithName = replication.WithName WithAddrs = replication.WithAddrs WithGossipPort = replication.WithGossipPort WithGRPCPort = replication.WithGRPCPort WithTick = replication.WithTick // WithEncryptionKey set a key to encrypt gossip messages WithEncryptionKey = replication.WithEncryptionKey // WithRaftStartOptions are Raft start options, e.g. join, new cluster ... WithRaftStartOptions = replication.WithRaftStartOptions WithServerCert = replication.WithServerCert WithServerKey = replication.WithServerKey WithClientCert = replication.WithClientCert WithClientKey = replication.WithClientKey WithClientCA = replication.WithClientCA WithTLSConfig = replication.WithTLSConfig )
View Source
var DefaultPath = db.DefaultPath
View Source
var NewClient = client.NewClient
View Source
var NewServer = server.NewServer
View Source
var Open = db.Open
View Source
var (
Where = filters.Where
)
View Source
var WithReadOnly = protodb.WithReadOnly
Functions ¶
Types ¶
type EventType ¶
type EventType = pb.WatchEventType
type Filter ¶
type Filter = filters.FieldFilterer
type FilterExpr ¶
type FilterExpr = filters.Expression
type PagingInfo ¶
type PagingInfo = pb.PagingInfo
type Registerer ¶
type Registerer = protodb.Registerer
type ReplicationMode ¶
type ReplicationMode = replication.Mode
type ReplicationOption ¶
type ReplicationOption = replication.Option
type Resolverer ¶
type Resolverer = protodb.Resolverer
type TxProvider ¶
type TxProvider = protodb.TxProvider
Click to show internal directories.
Click to hide internal directories.