Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DenzelPenzel/nyx
/ functions
Functions
397 in github.com/DenzelPenzel/nyx
⨍
Functions
397
◇
Types & classes
71
↓ 70 callers
Method
Error
(req common.Request, reqType common.RequestType, err error)
internal/nyx/nyx.go:119
↓ 66 callers
Method
String
()
cmd/client/rand/types.go:5
↓ 45 callers
Method
Close
()
internal/db/db.go:32
↓ 31 callers
Method
Get
(cmd common.GetRequest)
internal/db/db.go:27
↓ 30 callers
Method
Set
(cmd common.SetRequest)
internal/db/db.go:22
↓ 18 callers
Method
Add
(cmd common.SetRequest)
internal/db/db.go:23
↓ 18 callers
Method
resp
(s string)
internal/proto/textprot/respond.go:137
↓ 16 callers
Function
shutdown
(conn []io.Closer, err error)
internal/server/listen.go:73
↓ 14 callers
Method
Remove
Remove node from the cluster
internal/nyx/nyx.go:126
↓ 13 callers
Function
WithContext
WithContext ... Pass in a context containing values to add to each log message
internal/logging/logging.go:34
↓ 11 callers
Method
Join
Join connects the node, identified by the provided ID and reachable at the specified address, to the current node
internal/nyx/nyx.go:123
↓ 10 callers
Function
GetTCPAddr
(addr string)
internal/utils/utils.go:34
↓ 10 callers
Function
createTempShard
(t *testing.T)
internal/db/store/shard/shard_test.go:17
↓ 9 callers
Method
Get
Get retrieves the value for a given key
internal/db/store/store.go:239
↓ 8 callers
Function
Decode
Decode unpacks the encoded record meta into its components The expiration value is reconstructed by left-shifting the stored 24-bit value by 9 bits an
internal/db/store/record_meta/record_meta.go:24
↓ 8 callers
Method
Stop
()
internal/interval/interval.go:44
↓ 7 callers
Function
Join
(joinAddrs []string, id string, addr *net.TCPAddr, meta map[string]string)
internal/server/server.go:110
↓ 7 callers
Function
NewDataStore
(opts ...StoreOption)
internal/db/store/store.go:123
↓ 7 callers
Function
WithDirectory
WithDirectory sets the directory where shard files are stored
internal/db/store/store.go:42
↓ 6 callers
Method
Count
()
internal/db/db.go:33
↓ 6 callers
Method
Delete
(cmd common.DeleteRequest)
internal/db/db.go:30
↓ 6 callers
Method
Error
(opaque uint32, reqType common.RequestType, err error, quiet bool)
internal/proto/proto.go:28
↓ 6 callers
Method
Parse
()
internal/proto/proto.go:10
↓ 6 callers
Method
Shutdown
()
e2e/node.go:35
↓ 6 callers
Function
mockDB
()
internal/db/store/store_test.go:21
↓ 6 callers
Function
openDB
()
internal/db/db_test.go:18
↓ 6 callers
Method
shardIndex
shardIndex computes the primary shard index for a given key hash
internal/db/store/store.go:199
↓ 5 callers
Method
Backup
(name string)
internal/db/db.go:35
↓ 5 callers
Method
BucketPut
BucketPut stores a key/value pair under the given bucket.
internal/db/store/bucket.go:52
↓ 5 callers
Method
Close
Close shuts down background tasks and closes all shard files
internal/db/store/store.go:284
↓ 5 callers
Method
Counter
Counter updates a numeric counter stored as an 8-byte value
internal/db/store/shard/shard.go:454
↓ 5 callers
Function
Encode
Encode packs the given record pointer components into a single uint64 value The encoding layout is as follows: - Upper 32 bits: file address (addr) -
internal/db/store/record_meta/record_meta.go:17
↓ 5 callers
Function
NewNetwork
()
internal/network/network.go:12
↓ 5 callers
Function
NoContext
NoContext ... A log helper to log when there's no context. Rare case usage
internal/logging/logging.go:47
↓ 5 callers
Function
ReadFileVersion
ReadFileVersion reads the first two bytes from the given file to determine the shard file version. It returns 0 if the header indicates an old version
internal/db/store/record_meta/record_meta.go:37
↓ 5 callers
Method
Set
Set stores the key and value with an expiration time (in seconds), max packet size 2^19, 512kb (524288) packet size = len(key) + len(val) + 8
internal/db/store/store.go:205
↓ 5 callers
Method
Touch
(cmd common.TouchRequest)
internal/db/db.go:31
↓ 5 callers
Function
Unmarshal
(b []byte)
internal/db/store/record_header/record_header.go:105
↓ 5 callers
Method
WaitForLeader
()
e2e/node.go:53
↓ 5 callers
Function
percent
(data []int, p float64)
cmd/client/rand/stats.go:52
↓ 5 callers
Function
setRequest
(r *bufio.Reader, clParts []string, reqType common.RequestType, start int64)
internal/proto/textprot/parser.go:133
↓ 4 callers
Method
Accept
()
internal/server/listen.go:24
↓ 4 callers
Method
Bucket
Bucket returns (or creates) a bucket with the given name.
internal/db/store/bucket.go:31
↓ 4 callers
Method
Dial
Dial - makes outgoing connections to other servers in the Raft cluster When we connect to a server, we write the RaftRPC byte to identify the connecti
internal/nyx/raft_rpc.go:16
↓ 4 callers
Method
Open
(addr string)
internal/network/network.go:16
↓ 4 callers
Function
WriteRecordHeader
(b []byte, header *RecordHeader)
internal/db/store/record_header/record_header.go:84
↓ 4 callers
Function
createTempFileWithContent
(t *testing.T, content []byte)
internal/db/store/record_meta/record_meta_test.go:40
↓ 3 callers
Method
Append
(cmd common.SetRequest)
internal/db/db.go:25
↓ 3 callers
Method
Apply
(l *raft.Log)
internal/nyx/nyx.go:344
↓ 3 callers
Function
CreateNewNode
(enableSingle bool)
e2e/node.go:146
↓ 3 callers
Method
ExpireExpiredKeys
ExpireExpiredKeys scans for expired records and removes them from the index
internal/db/store/shard/shard.go:227
↓ 3 callers
Function
GenKeys
(totKeys int)
internal/utils/utils.go:60
↓ 3 callers
Method
ID
ID returns the raft ID
internal/nyx/nyx.go:558
↓ 3 callers
Method
Leader
()
e2e/cluster.go:22
↓ 3 callers
Method
ListenAndServeHTTP
()
internal/server/http.go:42
↓ 3 callers
Function
NewDB
(ctx context.Context, cfg *config.DBConfig)
internal/db/db.go:53
↓ 3 callers
Function
NewHTTPServer
(ctx context.Context, cfg *config.ServerConfig, storage nyx.DBHandler)
internal/server/http.go:31
↓ 3 callers
Function
RandData
(length int64)
internal/utils/utils.go:50
↓ 3 callers
Function
ReadRecordHeader
ReadRecordHeader reads a RecordHeader from the provided reader based on the version If the reader reaches EOF without any data, a nil header and nil e
internal/db/store/record_header/record_header.go:64
↓ 3 callers
Method
Replace
(cmd common.SetRequest)
internal/db/db.go:24
↓ 3 callers
Method
Sync
Sync persists pending changes if needed
internal/db/store/shard/shard.go:216
↓ 3 callers
Function
WithShardCollisionCount
WithShardCollisionCount sets the number of collision shards. The default is 4; if set to zero, a collision will result in an error
internal/db/store/store.go:65
↓ 3 callers
Function
WithTotalShards
WithTotalShards sets the total number of shards. Ensure that totalShards > shardCollisionCount.
internal/db/store/store.go:74
↓ 2 callers
Method
Add
(req common.SetRequest)
internal/nyx/nyx.go:93
↓ 2 callers
Method
Addr
Addr returns the address of the store
internal/nyx/nyx.go:563
↓ 2 callers
Method
Addr
()
internal/network/network.go:47
↓ 2 callers
Method
Append
(req common.SetRequest)
internal/nyx/nyx.go:97
↓ 2 callers
Method
Close
()
internal/network/network.go:43
↓ 2 callers
Method
Count
Count returns the total number of keys stored
internal/db/store/store.go:275
↓ 2 callers
Method
Decrement
(key []byte, v uint64)
internal/db/store/store.go:318
↓ 2 callers
Method
Delete
(req common.DeleteRequest)
internal/nyx/nyx.go:101
↓ 2 callers
Method
GAT
(cmd common.GATRequest)
internal/db/db.go:29
↓ 2 callers
Method
Get
(req common.GetRequest)
internal/nyx/nyx.go:105
↓ 2 callers
Method
Get
(rw *bufio.ReadWriter, key []byte)
cmd/client/textprot/textprot.go:94
↓ 2 callers
Method
GetE
(req common.GetRequest)
internal/nyx/nyx.go:107
↓ 2 callers
Method
GetEnd
(opaque uint32, noopEnd bool)
internal/proto/proto.go:20
↓ 2 callers
Method
Increment
(key []byte, v uint64)
internal/db/store/store.go:312
↓ 2 callers
Function
IsMiss
(err error)
internal/common/common.go:76
↓ 2 callers
Method
LeaderAddr
()
internal/nyx/nyx.go:548
↓ 2 callers
Method
LeaderID
LeaderID ... Returns the raft leader
internal/nyx/nyx.go:129
↓ 2 callers
Method
Loop
()
internal/server/server.go:28
↓ 2 callers
Function
Marshal
Marshal builds a complete binary record for the given key, value, and expiration The resulting record consists of the fixed header, followed by the va
internal/db/store/record_header/record_header.go:94
↓ 2 callers
Function
New
(ctx context.Context, cfg *config.Config, raftLayer Listener, res proto.Responder)
internal/nyx/nyx.go:192
↓ 2 callers
Function
NewIntervalRunner
NewIntervalRunner creates and starts an IntervalRunner that calls fn at each tick of the ticker. The function fn receives the tick time as its argumen
internal/interval/interval.go:18
↓ 2 callers
Method
NewRequestParser
(r *bufio.Reader)
internal/proto/proto.go:41
↓ 2 callers
Method
NewResponder
(w *bufio.Writer)
internal/proto/proto.go:42
↓ 2 callers
Function
NewServer
(conns []io.Closer, rp proto.RequestParser, storage nyx.DBHandler)
internal/server/server.go:37
↓ 2 callers
Function
NextPowerOf2
NextPowerOf2 ... Return next power of 2 for v
internal/utils/utils.go:16
↓ 2 callers
Method
Open
(allowSingle bool)
internal/nyx/nyx.go:212
↓ 2 callers
Method
OpenShard
OpenShard opens (or creates) the shard file and initializes the in-memory index
internal/db/store/shard/shard.go:151
↓ 2 callers
Function
ParseRecordHeader
(b []byte)
internal/db/store/record_header/record_header.go:52
↓ 2 callers
Method
Prepend
(req common.SetRequest)
internal/nyx/nyx.go:99
↓ 2 callers
Method
Prepend
(cmd common.SetRequest)
internal/db/db.go:26
↓ 2 callers
Function
RandomString
(n int)
internal/utils/utils.go:117
↓ 2 callers
Method
Replace
(req common.SetRequest)
internal/nyx/nyx.go:95
↓ 2 callers
Method
Set
(req common.SetRequest)
internal/nyx/nyx.go:91
↓ 2 callers
Method
ShutDown
()
internal/server/http.go:89
↓ 2 callers
Function
TempDir
(name string)
internal/utils/utils.go:42
↓ 2 callers
Method
Touch
(req common.TouchRequest)
internal/nyx/nyx.go:103
↓ 2 callers
Method
findNode
(addr string)
e2e/cluster.go:13
next →
1–100 of 397, ranked by callers