Documentation ¶
Overview ¶
ForestDB bindings for go
Sample usage (without proper error handling):
// Open a database db, _ := Open("test", nil) // Close it properly when we're done defer db.Close() // Store the document doc, _ := NewDoc([]byte("key"), nil, []byte("value")) defer doc.Close() db.Set(doc) // Lookup the document doc2, _ := NewDoc([]byte("key"), nil, nil) defer doc2.Close() db.Get(doc2) // Delete the document doc3, _ := NewDoc([]byte("key"), nil, nil) defer doc3.Close() db.Delete(doc3)
Index ¶
- Constants
- Variables
- func CloseFileKVStore(kvs *KVStore) error
- func CompactionCallbackInternal(handle *C.fdb_file_handle, status C.int, kv_store *C.char, document *C.fdb_doc, ...) C.fdb_compact_decision
- func Destroy(filename string, config *Config) error
- func FatalErrorCallbackInternal()
- func Init(config *Config) error
- func LogCallbackInternal(errCode C.int, msg *C.char, ctx *C.char)
- func LoggingLogCallback(name string, errCode int, msg string, ctx interface{})
- func SetFatalErrorCallback(callback FatalErrorCallback)
- func Shutdown() error
- type CommitMarker
- type CommitOpt
- type CompactDecision
- type CompactOpt
- type CompactionCallback
- type CompactionStatus
- type Config
- func (c *Config) AutoCommit() bool
- func (c *Config) BlockSize() uint32
- func (c *Config) BufferCacheSize() uint64
- func (c *Config) ChunkSize() uint16
- func (c *Config) CleanupCacheOnClose() bool
- func (c *Config) CompactionBufferSizeMax() uint32
- func (c *Config) CompactionMinimumFilesize() uint64
- func (c *Config) CompactionMode() CompactOpt
- func (c *Config) CompactionThreshold() uint8
- func (c *Config) CompactorSleepDuration() uint64
- func (c *Config) CompressDocumentBody() bool
- func (c *Config) DurabilityOpt() DurabilityOpt
- func (c *Config) MaxWriterLockProb() uint8
- func (c *Config) MultiKVInstances() bool
- func (c *Config) NumBcachePartitions() uint16
- func (c *Config) NumBgflusherThreads() int
- func (c *Config) NumBlockReusingThreshold() int
- func (c *Config) NumCompactorThreads() int
- func (c *Config) NumKeepingHeaders() int
- func (c *Config) NumWalPartitions() uint16
- func (c *Config) OpenFlags() OpenFlags
- func (c *Config) PrefetchDuration() uint64
- func (c *Config) PurgingInterval() uint32
- func (c *Config) SeqTreeOpt() SeqTreeOpt
- func (c *Config) SetAutoCommit(b bool)
- func (c *Config) SetBlockSize(s uint32)
- func (c *Config) SetBufferCacheSize(s uint64)
- func (c *Config) SetChunkSize(s uint16)
- func (c *Config) SetCleanupCacheOnClose(b bool)
- func (c *Config) SetCompactionBufferSizeMax(s uint32)
- func (c *Config) SetCompactionCallback(callback CompactionCallback)
- func (c *Config) SetCompactionCallbackMask(s CompactionStatus)
- func (c *Config) SetCompactionMinimumFilesize(s uint64)
- func (c *Config) SetCompactionMode(o CompactOpt)
- func (c *Config) SetCompactionThreshold(s uint8)
- func (c *Config) SetCompactorSleepDuration(s uint64)
- func (c *Config) SetCompressDocumentBody(b bool)
- func (c *Config) SetDurabilityOpt(o DurabilityOpt)
- func (c *Config) SetMaxWriterLockProb(s uint8)
- func (c *Config) SetMultiKVInstances(multi bool)
- func (c *Config) SetNumBcachePartitions(s uint16)
- func (c *Config) SetNumBgflusherThreads(s int)
- func (c *Config) SetNumBlockReusingThreshold(s int)
- func (c *Config) SetNumCompactorThreads(s int)
- func (c *Config) SetNumKeepingHeaders(s int)
- func (c *Config) SetNumWalPartitions(s uint16)
- func (c *Config) SetOpenFlags(o OpenFlags)
- func (c *Config) SetPrefetchDuration(s uint64)
- func (c *Config) SetPurgingInterval(s uint32)
- func (c *Config) SetSeqTreeOpt(o SeqTreeOpt)
- func (c *Config) SetWalFlushBeforeCommit(b bool)
- func (c *Config) SetWalThreshold(s uint64)
- func (c *Config) WalFlushBeforeCommit() bool
- func (c *Config) WalThreshold() uint64
- type Doc
- type Dummy
- type DurabilityOpt
- type Error
- type FatalErrorCallback
- type File
- func (f *File) AbortTransaction() error
- func (f *File) BeginTransaction(level IsolationLevel) error
- func (f *File) Close() error
- func (f *File) Commit(opt CommitOpt) error
- func (f *File) Compact(newfilename string) error
- func (f *File) CompactUpto(newfilename string, sm *SnapMarker) error
- func (f *File) EndTransaction(opt CommitOpt) error
- func (f *File) EstimateSpaceUsed() int
- func (f *File) GetAllSnapMarkers() (*SnapInfos, error)
- func (f *File) GetKVStoreNames() ([]string, error)
- func (f *File) Info() (*FileInfo, error)
- func (f *File) OpenKVStore(name string, config *KVStoreConfig) (*KVStore, error)
- func (f *File) OpenKVStoreDefault(config *KVStoreConfig) (*KVStore, error)
- func (f *File) SwitchCompactionMode(mode CompactOpt, threshold int) error
- type FileInfo
- type IsolationLevel
- type Iterator
- func (i *Iterator) Close() error
- func (i *Iterator) Get() (*Doc, error)
- func (i *Iterator) GetMetaOnly() (*Doc, error)
- func (i *Iterator) GetPreAlloc(rv *Doc) error
- func (i *Iterator) Next() error
- func (i *Iterator) Prev() error
- func (i *Iterator) Seek(seekKey []byte, dir SeekOpt) error
- func (i *Iterator) SeekMax() error
- func (i *Iterator) SeekMin() error
- type IteratorOpt
- type KVBatch
- type KVPool
- type KVSOpsInfo
- type KVStore
- func (k *KVStore) Close() error
- func (k *KVStore) Delete(doc *Doc) error
- func (k *KVStore) DeleteKV(key []byte) error
- func (k *KVStore) ExecuteBatch(b *KVBatch, opt CommitOpt) (err error)
- func (k *KVStore) File() *File
- func (k *KVStore) Get(doc *Doc) error
- func (k *KVStore) GetByOffset(doc *Doc) error
- func (k *KVStore) GetBySeq(doc *Doc) error
- func (k *KVStore) GetKV(key []byte) ([]byte, error)
- func (k *KVStore) GetMetaOnly(doc *Doc) error
- func (k *KVStore) GetMetaOnlyBySeq(doc *Doc) error
- func (k *KVStore) Handle() *C.fdb_kvs_handle
- func (k *KVStore) Info() (*KVStoreInfo, error)
- func (k *KVStore) IteratorInit(startKey, endKey []byte, opt IteratorOpt) (*Iterator, error)
- func (k *KVStore) IteratorSequenceInit(startSeq, endSeq SeqNum, opt IteratorOpt) (*Iterator, error)
- func (k *KVStore) OpsInfo() (*KVSOpsInfo, error)
- func (k *KVStore) Rollback(sn SeqNum) error
- func (k *KVStore) Set(doc *Doc) error
- func (k *KVStore) SetKV(key, value []byte) error
- func (k *KVStore) SetLogCallback(l LogCallback, userCtx interface{})
- func (k *KVStore) SnapshotOpen(sn SeqNum) (*KVStore, error)
- type KVStoreConfig
- type KVStoreInfo
- type LeveledLog
- func (l *LeveledLog) Debugf(format string, a ...interface{})
- func (l *LeveledLog) Errorf(format string, a ...interface{})
- func (l *LeveledLog) Fatalf(format string, a ...interface{})
- func (l *LeveledLog) Infof(format string, a ...interface{})
- func (l *LeveledLog) Tracef(format string, a ...interface{})
- func (l *LeveledLog) Warnf(format string, a ...interface{})
- type LogCallback
- type LogLevel
- type Logger
- type OpenFlags
- type SeekOpt
- type SeqNum
- type SeqTreeOpt
- type SnapInfo
- type SnapInfos
- type SnapMarker
Constants ¶
const SnapshotInmem = 1<<64 - 1
SnapshotInmem is the magic sequence number to request an in-memory snapshot be created. We cannot reference C.FDB_SNAPSHOT_INMEM because Go compiler complains about overflowing int.
Variables ¶
var PoolClosed = fmt.Errorf("pool already closed")
Functions ¶
func CloseFileKVStore ¶
CloseFileKVStore closes the KVStore and its associated forestdb file db.
func FatalErrorCallbackInternal ¶
func FatalErrorCallbackInternal()
func LoggingLogCallback ¶
func SetFatalErrorCallback ¶
func SetFatalErrorCallback(callback FatalErrorCallback)
Types ¶
type CommitMarker ¶
type CommitMarker C.fdb_kvs_commit_marker_t
func (*CommitMarker) GetKvStoreName ¶
func (c *CommitMarker) GetKvStoreName() string
func (*CommitMarker) GetSeqNum ¶
func (c *CommitMarker) GetSeqNum() SeqNum
type CompactDecision ¶
type CompactDecision uint32
const ( COMPACT_DECISION_KEEP CompactDecision = 0x0 COMPACT_DECISION_DROP CompactDecision = 0x1 )
type CompactOpt ¶
type CompactOpt uint8
const ( COMPACT_MANUAL CompactOpt = 0 COMPACT_AUTO CompactOpt = 1 )
type CompactionCallback ¶
type CompactionCallback interface { Callback(db *File, status CompactionStatus, kv_store_name string, doc *Doc, last_oldfile_offset, last_newfile_offset uint64) CompactDecision Name() string }
type CompactionStatus ¶
type CompactionStatus uint32
const ( COMPACT_STATUS_BEGIN CompactionStatus = 0x1 COMPACT_STATUS_MOVE_DOC CompactionStatus = 0x2 COMPACT_STATUS_BATCH_MOVE CompactionStatus = 0x4 COMPACT_STATUS_FLUSH_WAL CompactionStatus = 0x8 COMPACT_STATUS_END CompactionStatus = 0x10 COMPACT_STATUS_COMPLETE CompactionStatus = 0x20 )
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
ForestDB config options
func (*Config) AutoCommit ¶
func (*Config) BufferCacheSize ¶
func (*Config) CleanupCacheOnClose ¶
func (*Config) CompactionBufferSizeMax ¶
func (*Config) CompactionMinimumFilesize ¶
func (*Config) CompactionMode ¶
func (c *Config) CompactionMode() CompactOpt
func (*Config) CompactionThreshold ¶
func (*Config) CompactorSleepDuration ¶
func (*Config) CompressDocumentBody ¶
func (*Config) DurabilityOpt ¶
func (c *Config) DurabilityOpt() DurabilityOpt
func (*Config) MaxWriterLockProb ¶
func (*Config) MultiKVInstances ¶
func (*Config) NumBcachePartitions ¶
func (*Config) NumBgflusherThreads ¶
func (*Config) NumBlockReusingThreshold ¶
func (*Config) NumCompactorThreads ¶
func (*Config) NumKeepingHeaders ¶
func (*Config) NumWalPartitions ¶
func (*Config) PrefetchDuration ¶
func (*Config) PurgingInterval ¶
func (*Config) SeqTreeOpt ¶
func (c *Config) SeqTreeOpt() SeqTreeOpt
func (*Config) SetAutoCommit ¶
func (*Config) SetBlockSize ¶
func (*Config) SetBufferCacheSize ¶
func (*Config) SetChunkSize ¶
func (*Config) SetCleanupCacheOnClose ¶
func (*Config) SetCompactionBufferSizeMax ¶
func (*Config) SetCompactionCallback ¶
func (c *Config) SetCompactionCallback(callback CompactionCallback)
func (*Config) SetCompactionCallbackMask ¶
func (c *Config) SetCompactionCallbackMask(s CompactionStatus)
func (*Config) SetCompactionMinimumFilesize ¶
func (*Config) SetCompactionMode ¶
func (c *Config) SetCompactionMode(o CompactOpt)
func (*Config) SetCompactionThreshold ¶
func (*Config) SetCompactorSleepDuration ¶
func (*Config) SetCompressDocumentBody ¶
func (*Config) SetDurabilityOpt ¶
func (c *Config) SetDurabilityOpt(o DurabilityOpt)
func (*Config) SetMaxWriterLockProb ¶
func (*Config) SetMultiKVInstances ¶
func (*Config) SetNumBcachePartitions ¶
func (*Config) SetNumBgflusherThreads ¶
func (*Config) SetNumBlockReusingThreshold ¶
func (*Config) SetNumCompactorThreads ¶
func (*Config) SetNumKeepingHeaders ¶
func (*Config) SetNumWalPartitions ¶
func (*Config) SetOpenFlags ¶
func (*Config) SetPrefetchDuration ¶
func (*Config) SetPurgingInterval ¶
func (*Config) SetSeqTreeOpt ¶
func (c *Config) SetSeqTreeOpt(o SeqTreeOpt)
func (*Config) SetWalFlushBeforeCommit ¶
func (*Config) SetWalThreshold ¶
func (*Config) WalFlushBeforeCommit ¶
func (*Config) WalThreshold ¶
type Doc ¶
type Doc struct {
// contains filtered or unexported fields
}
ForestDB doc structure definition
func NewDoc ¶
NewDoc creates a new FDB_DOC instance on heap with a given key, its metadata, and its doc body
type DurabilityOpt ¶
type DurabilityOpt uint8
const ( DRB_NONE DurabilityOpt = 0 DRB_ODIRECT DurabilityOpt = 0x1 DRB_ASYNC DurabilityOpt = 0x2 DRB_ODIRECT_ASYNC DurabilityOpt = 0x3 )
type Error ¶
type Error int
const ( RESULT_SUCCESS C.fdb_status = 0 RESULT_INVALID_ARGS Error = -1 RESULT_OPEN_FAIL Error = -2 RESULT_NO_SUCH_FILE Error = -3 RESULT_WRITE_FAIL Error = -4 RESULT_READ_FAIL Error = -5 RESULT_CLOSE_FAIL Error = -6 RESULT_COMMIT_FAIL Error = -7 RESULT_ALLOC_FAIL Error = -8 RESULT_KEY_NOT_FOUND Error = -9 RESULT_RONLY_VIOLATION Error = -10 RESULT_COMPACTION_FAIL Error = -11 RESULT_ITERATOR_FAIL Error = -12 RESULT_SEEK_FAIL Error = -13 RESULT_FSYNC_FAIL Error = -14 RESULT_CHECKSUM_ERROR Error = -15 RESULT_FILE_CORRUPTION Error = -16 RESULT_COMPRESSION_FAIL Error = -17 RESULT_NO_DB_INSTANCE Error = -18 RESULT_FAIL_BY_ROLLBACK Error = -19 RESULT_INVALID_CONFIG Error = -20 RESULT_MANUAL_COMPACTION_FAIL Error = -21 RESULT_INVALID_COMPACTION_MODE Error = -22 RESULT_FILE_IS_BUSY Error = -23 RESULT_FILE_REMOVE_FAIL Error = -24 RESULT_FILE_RENAME_FAIL Error = -25 RESULT_TRANSACTION_FAIL Error = -26 RESULT_FAIL_BY_TRANSACTION Error = -27 RESULT_FAIL_BY_COMPACTION Error = -28 RESULT_TOO_LONG_FILENAME Error = -29 RESULT_INVALID_HANDLE Error = -30 RESULT_KV_STORE_NOT_FOUND Error = -31 RESULT_KV_STORE_BUSY Error = -32 RESULT_INVALID_KV_INSTANCE_NAME Error = -33 RESULT_INVALID_CMP_FUNCTION Error = -34 RESULT_IN_USE_BY_COMPACTOR Error = -35 RESULT_FILE_NOT_OPEN Error = -36 RESULT_TOO_BIG_BUFFER_CACHE Error = -37 RESULT_NO_DB_HEADERS Error = -38 RESULT_HANDLE_BUSY Error = -39 RESULT_AIO_NOT_SUPPORTED Error = -40 RESULT_AIO_INIT_FAIL Error = -41 RESULT_AIO_SUBMIT_FAIL Error = -42 RESULT_AIO_GETEVENTS_FAIL Error = -43 RESULT_CRYPTO_ERROR Error = -44 RESULT_FAIL Error = -100 )
type FatalErrorCallback ¶
type FatalErrorCallback func()
type File ¶
type File struct {
// contains filtered or unexported fields
}
Database handle
func (*File) AbortTransaction ¶
func (*File) BeginTransaction ¶
func (f *File) BeginTransaction(level IsolationLevel) error
func (*File) CompactUpto ¶
func (f *File) CompactUpto(newfilename string, sm *SnapMarker) error
CompactUpto compacts the current database file upto given snapshot marker and creates a new compacted file
func (*File) EndTransaction ¶
func (*File) EstimateSpaceUsed ¶
EstimateSpaceUsed returns the overall disk space actively used by the current database file
func (*File) GetAllSnapMarkers ¶
func (*File) GetKVStoreNames ¶
func (*File) OpenKVStore ¶
func (f *File) OpenKVStore(name string, config *KVStoreConfig) (*KVStore, error)
OpenKVStore opens the named KVStore within the File using the provided KVStoreConfig. If config is nil the DefaultKVStoreConfig() will be used.
func (*File) OpenKVStoreDefault ¶
func (f *File) OpenKVStoreDefault(config *KVStoreConfig) (*KVStore, error)
OpenKVStore opens the default KVStore within the File using the provided KVStoreConfig. If config is nil the DefaultKVStoreConfig() will be used.
func (*File) SwitchCompactionMode ¶
func (f *File) SwitchCompactionMode(mode CompactOpt, threshold int) error
SwitchCompactionMode changes the compaction mode of a ForestDB file if the mode is changed to COMPACT_AUTO the compaction threshold is set to the threshold passed to this API
type FileInfo ¶
type FileInfo struct {
// contains filtered or unexported fields
}
FileInfo stores information about a given file
func (*FileInfo) NewFilename ¶
type IsolationLevel ¶
type IsolationLevel uint8
IsolationLevel is the Transaction Isolation Level
const ( //ISOLATION_SERIALIZABLE IsolationLevel = 0x00 //ISOLATION_REPEATABLE_READ IsolationLevel = 0x01 ISOLATION_READ_COMMITTED IsolationLevel = 0x02 ISOLATION_READ_UNCOMMITTED IsolationLevel = 0x03 )
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
Iterator handle
func (*Iterator) GetMetaOnly ¶
GetMetaOnly gets the current item (key, metadata, offset to doc body) from the iterator
func (*Iterator) GetPreAlloc ¶
GetPreAlloc gets the current item (key, metadata, doc body) from the iterator but uses the pre-allocated memory for the Doc
func (*Iterator) Seek ¶
Seek fast forward / backward an iterator to return documents starting from the given seek_key. If the seek key does not exist, the iterator is positioned based on the specified dir (either before or after).
type IteratorOpt ¶
type IteratorOpt uint16
ForestDB iterator options
const ( // Return both key and value through iterator ITR_NONE IteratorOpt = 0x00 // Return only non-deleted items through iterator ITR_NO_DELETES IteratorOpt = 0x02 // The lowest key specified will not be returned by the iterator FDB_ITR_SKIP_MIN_KEY IteratorOpt = 0x04 //The highest key specified will not be returned by the iterator FDB_ITR_SKIP_MAX_KEY IteratorOpt = 0x08 )
type KVBatch ¶
type KVBatch struct {
// contains filtered or unexported fields
}
func NewKVBatch ¶
func NewKVBatch() *KVBatch
type KVPool ¶
type KVPool struct {
// contains filtered or unexported fields
}
KVPool is a structure representing a pool of KVStores inside a file. Each has been opened with it's own File handle, so they can be used concurrently safely.
type KVSOpsInfo ¶
type KVSOpsInfo struct {
// contains filtered or unexported fields
}
func (*KVSOpsInfo) NumCommits ¶
func (i *KVSOpsInfo) NumCommits() uint64
func (*KVSOpsInfo) NumCompacts ¶
func (i *KVSOpsInfo) NumCompacts() uint64
func (*KVSOpsInfo) NumDels ¶
func (i *KVSOpsInfo) NumDels() uint64
func (*KVSOpsInfo) NumGets ¶
func (i *KVSOpsInfo) NumGets() uint64
func (*KVSOpsInfo) NumIteratorGets ¶
func (i *KVSOpsInfo) NumIteratorGets() uint64
func (*KVSOpsInfo) NumIteratorMoves ¶
func (i *KVSOpsInfo) NumIteratorMoves() uint64
func (*KVSOpsInfo) NumSets ¶
func (i *KVSOpsInfo) NumSets() uint64
type KVStore ¶
type KVStore struct {
// contains filtered or unexported fields
}
KVStore handle
func OpenFileKVStore ¶
func OpenFileKVStore(fileName string, config *Config, kvstoreName string, kvstoreConfig *KVStoreConfig) ( *KVStore, error)
OpenFileKVStore opens up a forestdb file db and a single KVStore inside that file/db.
func (*KVStore) ExecuteBatch ¶
func (*KVStore) GetByOffset ¶
GetByOffset retrieves a doc's metadata and body with a given doc offset in the database file
func (*KVStore) GetMetaOnly ¶
GetMetaOnly retrieves the metadata for a given key
func (*KVStore) GetMetaOnlyBySeq ¶
GetMetaOnlyBySeq retrieves the metadata for a given sequence number
func (*KVStore) Handle ¶
func (k *KVStore) Handle() *C.fdb_kvs_handle
Handle returns the underlying fdb_kvs_handle for advanced uses.
func (*KVStore) Info ¶
func (k *KVStore) Info() (*KVStoreInfo, error)
Info returns the information about a given kvstore
func (*KVStore) IteratorInit ¶
func (k *KVStore) IteratorInit(startKey, endKey []byte, opt IteratorOpt) (*Iterator, error)
IteratorInit creates an iterator to traverse a ForestDB snapshot by key range
func (*KVStore) IteratorSequenceInit ¶
func (k *KVStore) IteratorSequenceInit(startSeq, endSeq SeqNum, opt IteratorOpt) (*Iterator, error)
IteratorSequenceInit create an iterator to traverse a ForestDB snapshot by sequence number range
func (*KVStore) OpsInfo ¶
func (k *KVStore) OpsInfo() (*KVSOpsInfo, error)
OpsInfo returns the information about the ops on given kvstore
func (*KVStore) Rollback ¶
Rollback a database to a specified point represented by the sequence number
func (*KVStore) SetLogCallback ¶
func (k *KVStore) SetLogCallback(l LogCallback, userCtx interface{})
type KVStoreConfig ¶
type KVStoreConfig struct {
// contains filtered or unexported fields
}
ForestDB KVStore config options
func DefaultKVStoreConfig ¶
func DefaultKVStoreConfig() *KVStoreConfig
DefaultConfig gets the default ForestDB config
func (*KVStoreConfig) CreateIfMissing ¶
func (c *KVStoreConfig) CreateIfMissing() bool
func (*KVStoreConfig) SetCreateIfMissing ¶
func (c *KVStoreConfig) SetCreateIfMissing(b bool)
func (*KVStoreConfig) SetCustomCompare ¶
func (c *KVStoreConfig) SetCustomCompare(comparator unsafe.Pointer)
type KVStoreInfo ¶
type KVStoreInfo struct {
// contains filtered or unexported fields
}
KVStoreInfo stores information about a given kvstore
func (*KVStoreInfo) DocCount ¶
func (i *KVStoreInfo) DocCount() uint64
func (*KVStoreInfo) LastSeqNum ¶
func (i *KVStoreInfo) LastSeqNum() SeqNum
func (*KVStoreInfo) Name ¶
func (i *KVStoreInfo) Name() string
func (*KVStoreInfo) String ¶
func (i *KVStoreInfo) String() string
type LeveledLog ¶
type LeveledLog struct {
// contains filtered or unexported fields
}
func NewLeveledLog ¶
func NewLeveledLog(level LogLevel) *LeveledLog
func (*LeveledLog) Debugf ¶
func (l *LeveledLog) Debugf(format string, a ...interface{})
func (*LeveledLog) Errorf ¶
func (l *LeveledLog) Errorf(format string, a ...interface{})
func (*LeveledLog) Fatalf ¶
func (l *LeveledLog) Fatalf(format string, a ...interface{})
func (*LeveledLog) Infof ¶
func (l *LeveledLog) Infof(format string, a ...interface{})
func (*LeveledLog) Tracef ¶
func (l *LeveledLog) Tracef(format string, a ...interface{})
func (*LeveledLog) Warnf ¶
func (l *LeveledLog) Warnf(format string, a ...interface{})
type LogCallback ¶
type Logger ¶
type Logger interface { // Warnings, logged by default. Warnf(format string, v ...interface{}) // Errors, logged by default. Errorf(format string, v ...interface{}) // Fatal errors. Will not terminate execution. Fatalf(format string, v ...interface{}) // Informational messages. Infof(format string, v ...interface{}) // Timing utility Debugf(format string, v ...interface{}) // Program execution tracing. Not logged by default Tracef(format string, v ...interface{}) }
Logger interface
type SeqTreeOpt ¶
type SeqTreeOpt uint8
const ( SEQTREE_NOT_USE SeqTreeOpt = 0 SEQTREE_USE SeqTreeOpt = 1 )
type SnapInfo ¶
type SnapInfo C.fdb_snapshot_info_t
func (*SnapInfo) CommitMarkerForKvStore ¶
func (si *SnapInfo) CommitMarkerForKvStore(name string) (rv *CommitMarker)
CommitMarkerForKvStore returns a *CommitMarker corresponding to the named KV store which matches the provided argument. Returns nil if no CommitMarker with the specified name is a part of this SnapInfo.
func (*SnapInfo) GetKvsCommitMarkers ¶
func (si *SnapInfo) GetKvsCommitMarkers() []CommitMarker
func (*SnapInfo) GetNumKvsMarkers ¶
func (*SnapInfo) GetSnapMarker ¶
func (si *SnapInfo) GetSnapMarker() *SnapMarker
type SnapInfos ¶
type SnapInfos struct {
// contains filtered or unexported fields
}
func (*SnapInfos) FreeSnapMarkers ¶
func (*SnapInfos) SnapInfoList ¶
type SnapMarker ¶
type SnapMarker struct {
// contains filtered or unexported fields
}