Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ankur-anand/unisondb
/ functions
Functions
3,181 in github.com/ankur-anand/unisondb
⨍
Functions
3,181
◇
Types & classes
414
↓ 458 callers
Method
Run
(ctx context.Context)
cmd/unisondb/cliapp/service.go:17
↓ 366 callers
Method
Error
()
pkg/walfs/walog.go:44
↓ 289 callers
Method
Close
()
pkg/notifier/factory.go:21
↓ 218 callers
Method
Add
Add marks a reader ID as active.
pkg/walfs/util.go:46
↓ 202 callers
Method
Join
Join attempts to join an existing membership cluster using the provided addresses.
pkg/raftcluster/membership.go:93
↓ 186 callers
Function
NewStorageEngine
NewStorageEngine initializes WAL, MemTable, and BtreeStore and returns an initialized Engine for a namespace.
dbkernel/engine.go:176
↓ 186 callers
Function
NewWALog
NewWALog returns an initialized WALog that manages the segments in the provided dir with the given ext.
pkg/walfs/walog.go:216
↓ 176 callers
Function
NewDefaultEngineConfig
NewDefaultEngineConfig returns an initialized default config for engine.
dbkernel/common.go:67
↓ 159 callers
Method
Contains
Contains returns true if the given reader ID is currently tracked.
pkg/walfs/util.go:81
↓ 156 callers
Method
Len
Len returns the total number of entries across all shards.
pkg/walfs/sharded_index.go:206
↓ 150 callers
Function
OpenSegmentFile
OpenSegmentFile opens an existing segment file or create a new one if not present. If SegmentFile is sealed it doesn't scan its content while opening.
pkg/walfs/segment.go:313
↓ 143 callers
Method
Write
(data *v1.WALRecord)
internal/services/streamer/grpc_streamer_client.go:30
↓ 141 callers
Method
String
String returns a string representation of the counter state.
cmd/examples/crdt-multi-dc/golang-crdt-client/crdt/g_counter.go:60
↓ 133 callers
Method
Close
Close gracefully shuts down all segments managed by the WALog.
pkg/walfs/walog.go:406
↓ 130 callers
Method
PutKV
(key, value []byte)
internal/services/fuzzer/fuzz_engine.go:17
↓ 125 callers
Method
Write
Write appends the given data as a new record to the active segment. It returns RecordPosition indicating where the data was written.
pkg/walfs/walog.go:427
↓ 119 callers
Method
Close
()
dbkernel/internal/common.go:62
↓ 119 callers
Method
String
()
pkg/raftcluster/membership.go:34
↓ 114 callers
Function
WithMaxSegmentSize
WithMaxSegmentSize options sets the MaxSize of the Segment file.
pkg/walfs/walog.go:67
↓ 110 callers
Method
Get
()
internal/benchtests/cmd/genclient/gen/gen.go:14
↓ 104 callers
Method
Decode
Decode deserializes a byte slice into a raft.Log. The input buffer may be retained by the returned Log (zero-copy), so callers must not modify the buf
pkg/raftwalfs/codec.go:24
↓ 101 callers
Method
Current
Current returns a pointer to the currently active WAL segment.
pkg/walfs/walog.go:628
↓ 100 callers
Method
Inc
(namespace, op string)
internal/services/fuzzer/stats.go:51
↓ 96 callers
Method
String
()
pkg/kvdrivers/util.go:47
↓ 96 callers
Method
String
()
internal/grpcutils/stats_handler_test.go:24
↓ 96 callers
Function
makeRequest
(t *testing.T, router *mux.Router, method, url string, body interface{})
internal/services/httpapi/service_test.go:80
↓ 93 callers
Method
GetKV
(key []byte)
dbkernel/internal/common.go:45
↓ 89 callers
Function
makeLog
(idx, term uint64, data string)
pkg/raftwalfs/log_store_test.go:14
↓ 89 callers
Function
respondError
(w http.ResponseWriter, statusCode int, message string)
internal/services/httpapi/service.go:197
↓ 75 callers
Method
NewReader
NewReader returns a new Reader that sequentially reads all segments in the WALog, starting from the beginning (lowest SegmentID).
pkg/walfs/walog.go:1280
↓ 74 callers
Method
Next
Next returns the next available WAL record data and its current position. IMPORTANT: The returned `[]byte` is a slice of a memory-mapped file, so data
pkg/walfs/walog.go:1310
↓ 69 callers
Method
Read
Read returns the data from the provided record position if found. IMPORTANT: The returned `[]byte` is a slice of a memory-mapped file, so data must no
pkg/walfs/walog.go:590
↓ 68 callers
Method
Close
()
internal/benchtests/cmd/redis-server/main.go:29
↓ 68 callers
Method
FBEncode
FBEncode encodes the provided record into flat-buffer format.
internal/logcodec/record.go:39
↓ 68 callers
Method
ID
ID returns a unique identifier for this codec version.
pkg/raftwalfs/codec.go:16
↓ 65 callers
Method
Set
Set stores the position for an index.
pkg/walfs/sharded_index.go:50
↓ 62 callers
Function
setupTestServer
(t *testing.T)
internal/services/httpapi/service_test.go:33
↓ 61 callers
Function
NewShardedIndex
NewShardedIndex creates a sharded index with the specified number of shards.
pkg/walfs/sharded_index.go:27
↓ 60 callers
Method
Append
Append writes the provided data as a new record to the active WAL segment.
dbkernel/internal/wal/wal.go:222
↓ 59 callers
Method
GetRowColumns
(rowKey string, predicate func(columnKey string) bool)
internal/services/fuzzer/fuzz_engine.go:25
↓ 58 callers
Method
close
func (e *Engine) resumeFlush() { e.flushPaused.Store(false) }
dbkernel/engine.go:1062
↓ 55 callers
Method
Stop
()
cmd/examples/crdt-multi-dc/golang-crdt-client/client/zmq_listener.go:134
↓ 54 callers
Method
Segments
Segments returns a snapshot (shallow) copy of all active segments managed by the WAL.
pkg/walfs/walog.go:616
↓ 53 callers
Method
Update
Update updates the register if the new timestamp is greater. Returns true if the register was updated, false if the update was stale.
cmd/examples/crdt-multi-dc/golang-crdt-client/crdt/lww_register.go:30
↓ 52 callers
Method
Next
Next returns the next chunk data and its position in the WAL. If there is no data, io. EOF will be returned. The position can be used to read the data
dbkernel/internal/wal/wal.go:330
↓ 51 callers
Method
Encode
Encode serializes a raft.Log into a byte slice.
pkg/raftwalfs/codec.go:19
↓ 51 callers
Method
String
()
internal/services/relayer/relayer_test.go:35
↓ 50 callers
Method
Name
()
cmd/unisondb/cliapp/service.go:15
↓ 50 callers
Method
OpsReceivedCount
OpsReceivedCount returns the total number of Put and Delete operations received.
dbkernel/engine_public.go:205
↓ 50 callers
Method
RotateSegment
RotateSegment rotates the current segment and create a new active segment.
pkg/walfs/walog.go:721
↓ 49 callers
Function
GetRootAsLogRecord
(buf []byte, offset flatbuffers.UOffsetT)
schemas/logrecord/LogRecord.go:13
↓ 48 callers
Method
Close
Close closes all segment readers to release their references. IMPORTANT: This method MUST be called after the Reader is no longer needed.
pkg/walfs/walog.go:1299
↓ 47 callers
Method
Start
()
pkg/raftmux/manager.go:97
↓ 46 callers
Method
GetLog
GetLog returns the *raft.Log at the given Index.
pkg/raftwalfs/log_store.go:118
↓ 45 callers
Method
Put
(ctx context.Context, in *PutRequest, opts ...grpc.CallOption)
schemas/proto/gen/go/unisondb/replicator/v1/service_grpc.pb.go:33
↓ 43 callers
Function
KeyKV
KeyKV returns the storage key for a key-value pair.
internal/keycodec/keycodec.go:62
↓ 43 callers
Method
Remove
Remove closes the segment and removes its underlying files (segment and index).
pkg/walfs/segment.go:1413
↓ 41 callers
Method
Error
()
pkg/raftcluster/cluster.go:25
↓ 41 callers
Function
HLCNow
HLCNow returns the current time in milliseconds since the Unix epoch.
dbkernel/hlc.go:60
↓ 40 callers
Method
NewTxn
NewTxn returns a new initialized batch Txn. Transactions are not allowed in RaftMode.
dbkernel/txn.go:93
↓ 40 callers
Function
encodeBase64
(data []byte)
internal/services/httpapi/service_test.go:101
↓ 40 callers
Function
newTestStore
(t *testing.T, opts ...walfs.WALogOptions)
pkg/raftwalfs/log_store_test.go:24
↓ 39 callers
Method
Context
()
internal/grpcutils/stream_interceptor.go:18
↓ 38 callers
Method
Get
Get retrieves the position for an index. Returns the position and true if found, zero value and false otherwise.
pkg/walfs/sharded_index.go:64
↓ 38 callers
Method
SetRaftMode
SetRaftMode enables or disables Raft mode on the Engine. When in Raft mode, the Raft log IS the WAL.
dbkernel/engine_raft.go:417
↓ 37 callers
Method
GetEntryCount
GetEntryCount returns the total entry count in segment.
pkg/walfs/segment.go:1123
↓ 37 callers
Method
WriteBatch
(records []*v1.WALRecord)
internal/services/streamer/grpc_streamer_client.go:31
↓ 36 callers
Method
RegisterNamespace
(namespace string)
pkg/raftmux/manager.go:149
↓ 36 callers
Method
Truncate
Truncate truncates the WAL to the specified log index. All entries after the given log index will be discarded. If logIndex is 0, all segments are del
pkg/walfs/walog.go:766
↓ 35 callers
Function
IsSealed
IsSealed returns if teh provided flag has sealed bit set.
pkg/walfs/segment.go:594
↓ 35 callers
Function
NewRaftTransportManager
NewRaftTransportManager creates a new RaftTransportManager.
pkg/raftmux/manager.go:74
↓ 35 callers
Function
SerializeKVEntry
SerializeKVEntry encodes a single KeyValueEntry into FlatBuffers.
internal/logcodec/kv_codec.go:9
↓ 35 callers
Method
Sync
()
dbkernel/common.go:90
↓ 34 callers
Method
Close
()
pkg/raftmux/manager.go:120
↓ 34 callers
Method
StoreLogs
StoreLogs stores multiple log entries. The logs must be contiguous with each other. They may overwrite existing entries if there's a gap or conflict (
pkg/raftwalfs/log_store.go:176
↓ 33 callers
Method
GetFlags
GetFlags returns the flags stored in segment header.
pkg/walfs/segment.go:1140
↓ 32 callers
Method
Commit
Commit the Txn.
dbkernel/txn.go:269
↓ 32 callers
Method
Lsn
()
schemas/logrecord/LogRecord.go:44
↓ 32 callers
Method
Set
()
internal/benchtests/cmd/genclient/gen/gen.go:10
↓ 31 callers
Method
Close
(ctx context.Context)
cmd/unisondb/cliapp/service.go:18
↓ 31 callers
Method
CurrentOffset
CurrentOffset returns the current offset that it has seen.
dbkernel/engine_public.go:223
↓ 30 callers
Function
DeserializeFBRootLogRecord
DeserializeFBRootLogRecord converts the FlatBuffer WAL Log Record to Go Struct LogRecord.
internal/logcodec/codec.go:77
↓ 30 callers
Function
KeyBlobChunk
[type][blobIDLenBE(4)][blobID][chunkBE(4)].
pkg/kvdrivers/util.go:131
↓ 30 callers
Method
Shutdown
Shutdown finalizes shutdown, optionally waiting for removal from the Raft config.
pkg/raftcluster/cluster.go:176
↓ 29 callers
Method
SetRaftApplier
SetRaftApplier sets the RaftApplier used to propose commands to Raft.
dbkernel/engine_raft.go:63
↓ 28 callers
Method
RaftConfiguration
()
pkg/raftcluster/cluster.go:291
↓ 27 callers
Method
SetPositionLookup
SetPositionLookup sets the function used to look up WAL positions from Raft log indices.
dbkernel/engine_raft.go:58
↓ 26 callers
Method
StoreLog
StoreLog stores a single log entry.
pkg/raftwalfs/log_store.go:169
↓ 26 callers
Function
respondJSON
(w http.ResponseWriter, statusCode int, data interface{})
internal/services/httpapi/service.go:186
↓ 25 callers
Method
AppendKVTxn
AppendKVTxn append a key, value to the WAL as part of a Txn.
dbkernel/txn.go:138
↓ 25 callers
Method
Close
()
pkg/kvdrivers/api.go:11
↓ 25 callers
Method
FirstLogIndex
()
pkg/walfs/segment.go:1133
↓ 25 callers
Method
NewReader
NewReader return a reader that reads from the beginning, until EOF is encountered. It returns io.EOF when it reaches end of file. In Raft mode, reads
dbkernel/engine_public.go:700
↓ 25 callers
Method
Open
Open opens a snapshot for reading.
dbkernel/fsm_snapshot_store.go:107
↓ 24 callers
Function
DeserializeKVEntry
(data []byte)
internal/logcodec/kv_codec.go:23
↓ 24 callers
Method
ScanRowCells
(rowKey []byte, filter func(columnKey []byte) bool)
pkg/kvdrivers/suite_test.go:50
↓ 24 callers
Method
State
()
pkg/raftcluster/cluster.go:99
↓ 23 callers
Method
GetKV
(key []byte)
pkg/kvdrivers/suite_test.go:48
↓ 23 callers
Function
NewReplicaWALHandler
(engine *Engine)
dbkernel/replica.go:61
↓ 23 callers
Method
PutColumnsForRow
(rowKey []byte, columnEntries map[string][]byte)
internal/services/fuzzer/fuzz_engine.go:21
next →
1–100 of 3,181, ranked by callers