Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/danchia/ddb
/ functions
Functions
265 in github.com/danchia/ddb
⨍
Functions
265
◇
Types & classes
55
↓ 11 callers
Method
Len
()
server/merge.go:93
↓ 9 callers
Method
Close
Close closes the iterator.
server/iter.go:18
↓ 9 callers
Method
Insert
(key string, data []byte)
sst/cache.go:104
↓ 8 callers
Method
Add
Add adds `key` to the bloom filter.
sst/bloom.go:50
↓ 8 callers
Method
Get
Get retrieves k from cache. Returns nil if not found.
sst/cache.go:78
↓ 7 callers
Method
Append
Append writes a new row to the SSTable. Must be called in order, i.e. key asc, timestamp desc
sst/sstwriter.go:60
↓ 7 callers
Method
Bytes
Bytes() returns the bytes backing the bloom filter.
sst/bloom.go:45
↓ 7 callers
Method
Key
Key returns the key of the current row.
server/iter.go:9
↓ 6 callers
Method
Insert
Insert inserts (key, timestamp, value) into the memtable. Requires that (key, timestamp) does not already exist.
memtable/memtable.go:75
↓ 6 callers
Function
New
(seqNo int64)
memtable/memtable.go:60
↓ 6 callers
Method
Next
Next advances the iterator. Returns true if there is a next value.
server/iter.go:6
↓ 6 callers
Method
Test
Test returns whether `key` is found.
sst/bloom.go:62
↓ 6 callers
Method
Timestamp
Timestamp returns the timestamp of the current row.
server/iter.go:12
↓ 6 callers
Method
UnRef
UnRef decreases the refcount by 1.
sst/sstreader.go:79
↓ 6 callers
Function
prefixDecodeFrom
prefixDecodeFrom decodes a prefix coded key from r. lastKey is nil for restart points. scratch will be used to created the returned key.
sst/prefixcoding.go:91
↓ 6 callers
Function
writeUvarInt64
(w io.Writer, x uint64)
sst/util.go:40
↓ 5 callers
Method
Close
Close finalizes the SST being written.
sst/sstwriter.go:89
↓ 5 callers
Function
DefaultOptions
(baseDir string)
server/server.go:49
↓ 5 callers
Method
Get
(ctx context.Context, in *GetRequest, opts ...grpc.CallOption)
proto/ddb.pb.go:149
↓ 5 callers
Function
NewServer
(opts Options)
server/server.go:63
↓ 5 callers
Method
Set
(ctx context.Context, in *SetRequest, opts ...grpc.CallOption)
proto/ddb.pb.go:150
↓ 5 callers
Function
randomString
(minLength, maxLength int)
memtable/memtable_test.go:248
↓ 5 callers
Method
readRawBlock
(h blockHandle, fillCache bool)
sst/sstreader.go:148
↓ 4 callers
Method
Err
Err returns last error, if any.
wal/scanner.go:102
↓ 4 callers
Method
Filename
Filename returns the full file path of the SST.
sst/sstreader.go:94
↓ 4 callers
Method
Find
Find returns value of key at largest timestamp, which could be nil for a deletion marker.
memtable/memtable.go:148
↓ 4 callers
Method
Get
(ctx context.Context, req *pb.GetRequest)
server/server.go:74
↓ 4 callers
Method
Key
()
sst/sstreader.go:273
↓ 4 callers
Method
NewIter
NewIter returns a new SST iterator. Must close after use.
sst/sstreader.go:99
↓ 4 callers
Function
NewReader
NewReader returns a new SST reader for filename, already ref-ed once.
sst/sstreader.go:46
↓ 4 callers
Method
Reset
()
proto/ddb.pb.go:47
↓ 4 callers
Method
Reset
Reset resets the block. However, scratch memory may be retained.
sst/datablock.go:84
↓ 4 callers
Method
Timestamp
()
sst/sstreader.go:281
↓ 4 callers
Method
Value
()
sst/sstreader.go:277
↓ 4 callers
Method
atomicLoadNext
(l int)
memtable/memtable.go:56
↓ 4 callers
Function
newBlockHandle
(r io.ByteReader)
sst/common.go:53
↓ 4 callers
Function
randomBytes
(minLength, maxLength int)
memtable/memtable_test.go:252
↓ 4 callers
Function
writeUint32
(w io.Writer, x uint32)
sst/util.go:22
↓ 3 callers
Method
Append
Append appends a log record to the WAL. The log record is modified with the log sequence number. cb is invoked serially, in log sequence number order.
wal/writer.go:90
↓ 3 callers
Method
Close
()
wal/writer.go:253
↓ 3 callers
Method
EncodeTo
(w io.Writer)
sst/common.go:65
↓ 3 callers
Method
Find
Find returns the value of key in SST.
sst/sstreader.go:104
↓ 3 callers
Method
Finish
Finish finishes building the block and returns a slice to its contents. Returned slice is valid until Reset() is called.
sst/datablock.go:75
↓ 3 callers
Function
NewCache
NewCache returns a Cache.
sst/cache.go:42
↓ 3 callers
Function
NewIterFromRows
NewIterFromRows returns an Iter represents rows. rows must not be modified after.
server/iter.go:33
↓ 3 callers
Function
NewWriter
(nextSeq int64, opts Options)
wal/writer.go:64
↓ 3 callers
Function
NewWriter
(filename string)
sst/sstwriter.go:41
↓ 3 callers
Method
Set
(ctx context.Context, req *pb.SetRequest)
server/server.go:70
↓ 3 callers
Method
Value
Value returns the value of the current row.
server/iter.go:15
↓ 3 callers
Function
ensureDir
(dir string)
server/database.go:158
↓ 3 callers
Function
newBloom
()
sst/bloom.go:32
↓ 3 callers
Function
newMergingIter
(iters []Iter)
server/merge.go:32
↓ 3 callers
Function
parseEKey
(eKey string)
sst/datablock.go:179
↓ 3 callers
Method
writeChecksummedBlock
(d []byte)
sst/sstwriter.go:127
↓ 2 callers
Method
Close
()
sst/sstreader.go:285
↓ 2 callers
Method
Close
Close closes the iterator.
sst/iter.go:31
↓ 2 callers
Method
EncodeInto
EncodeInto encodes k into w, using shared prefix compression. Restarts are created every restartInterval, saving offset as the restart point.
sst/prefixcoding.go:28
↓ 2 callers
Method
GetKey
()
proto/ddb.pb.go:52
↓ 2 callers
Method
Key
Key returns the current key.
sst/iter.go:21
↓ 2 callers
Method
NewIterator
NewIterator creates an iterator for this memtable.
memtable/memtable.go:169
↓ 2 callers
Method
Next
Next advances the iterator. Returns true if there is a next value.
sst/sstreader.go:245
↓ 2 callers
Method
Next
Next advances the iterator. Returns whether there is another key/value.
sst/iter.go:28
↓ 2 callers
Method
Record
Record returns the current record. Only valid until the next Scan() call. Caller should not modify returned proto.
wal/scanner.go:97
↓ 2 callers
Method
Ref
Ref increases the refcount by 1.
sst/sstreader.go:74
↓ 2 callers
Method
Save
Save persists Descriptor to stable storage.
server/descriptor.go:146
↓ 2 callers
Method
Scan
Scan advances the fileScanner to the next log record, which will then be available through the Record method. It returns false when the scan stops, ei
wal/scanner.go:57
↓ 2 callers
Method
SequenceUpper
SequenceUpper returns the largest sequence number applied.
memtable/memtable.go:118
↓ 2 callers
Method
SizeBytes
SizeBytes returns the approximate memory used by this memtable.
memtable/memtable.go:111
↓ 2 callers
Method
Timestamp
Timestamp returns the current timestamp.
memtable/memtable.go:188
↓ 2 callers
Method
Value
Value returns the current value. Callers should not modify the returned value. Returned value is only valid until the next call to Next.
sst/iter.go:25
↓ 2 callers
Method
WriteRestarts
WriteRestarts writes out the restarts to w
sst/prefixcoding.go:77
↓ 2 callers
Method
apply
(l *pb.LogRecord)
server/database.go:209
↓ 2 callers
Method
atomicStoreNext
(l int, x *node)
memtable/memtable.go:52
↓ 2 callers
Method
filenameFor
(version int64)
server/descriptor.go:203
↓ 2 callers
Method
findGreaterOrEqual
findGreaterOrEqual retuns the first node that is greater than or equal to (key, timestamp). according to (key, timestamp) ordering. If prev is not nil
memtable/memtable.go:127
↓ 2 callers
Method
flushBlock
()
sst/sstwriter.go:71
↓ 2 callers
Function
listLogFiles
(dirname string)
wal/common.go:17
↓ 2 callers
Method
maybeTriggerFlush
()
server/database.go:221
↓ 2 callers
Function
newDataBlock
(d []byte)
sst/datablock.go:94
↓ 2 callers
Function
newIndexBlock
(d []byte)
sst/indexblock.go:67
↓ 2 callers
Function
newKeyGenerator
()
ddbc/cmd/loaddata.go:90
↓ 2 callers
Function
newPrefixEncoder
(restartInterval int32)
sst/prefixcoding.go:18
↓ 2 callers
Method
next
()
ddbc/cmd/loaddata.go:94
↓ 2 callers
Method
pickLevel
Level assigned to this node, zero indexed.
memtable/memtable.go:201
↓ 2 callers
Method
rollover
(seq int64)
wal/writer.go:142
↓ 2 callers
Method
runEviction
Requires c.mu be held.
sst/cache.go:121
↓ 2 callers
Function
validateKey
(k string)
server/database.go:528
↓ 2 callers
Function
verifyChecksum
(data []byte, sum []byte)
sst/sstreader.go:211
↓ 2 callers
Method
writeRawRecord
(r rawRecord)
wal/writer.go:220
↓ 1 callers
Method
Blocks
Blocks returns the list of data blocks in this index.
sst/indexblock.go:128
↓ 1 callers
Method
Close
Close closes the iterator by closing all the underlying iters.
server/merge.go:85
↓ 1 callers
Method
Close
Close closes the iterator.
memtable/memtable.go:198
↓ 1 callers
Method
EstimatedSizeBytes
EstimatedSizeBytes returns the estimated current size of the block.
sst/datablock.go:69
↓ 1 callers
Method
Find
(ctx context.Context, key string)
server/database.go:228
↓ 1 callers
Method
GetSstMeta
()
proto/internal.pb.go:116
↓ 1 callers
Method
GetValue
()
proto/ddb.pb.go:108
↓ 1 callers
Method
Key
Key returns the current key.
memtable/memtable.go:183
↓ 1 callers
Function
LoadDescriptor
LoadDescriptor loads the highest numbered descriptor found in dir.
server/descriptor.go:68
↓ 1 callers
Function
NewDescriptor
NewDescriptor returns a Descriptor for a brand new database. Most use cases should probably use LoadDescriptor instead.
server/descriptor.go:59
↓ 1 callers
Method
NewID
NewID returns a new unique ID, typically used by callers to partition to cache space by pre-pending the ID to all cache keys.
sst/cache.go:68
next →
1–100 of 265, ranked by callers