shardnode

package
v0.0.0-...-3a65784 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Read = iota
	Write
)

Variables

This section is empty.

Functions

func StartOramNodeRPCClients

func StartOramNodeRPCClients(endpoints []config.OramNodeEndpoint) (map[int]ReplicaRPCClientMap, error)

func StartServer

func StartServer(shardNodeServerID int, bindIp string, advertiseIp string, rpcPort int, replicaID int, raftPort int, joinAddr string, oramNodeRPCClients map[int]ReplicaRPCClientMap, parameters config.Parameters, storages []config.RedisEndpoint, configsPath string)

Types

type BatchReplicateRequestAndPathAndStoragePayload

type BatchReplicateRequestAndPathAndStoragePayload struct {
	Requests []ReplicateRequestAndPathAndStoragePayload
	LeaderID int
}

type Command

type Command struct {
	Type    CommandType
	Payload []byte
}

type CommandType

type CommandType int
const (
	BatchReplicateRequestAndPathAndStorageCommand CommandType = iota
	ReplicateResponseCommand
	ReplicateSentBlocksCommand
	ReplicateAcksNacksCommand
)

type OperationType

type OperationType int

type RPCClientMap

type RPCClientMap map[int]ReplicaRPCClientMap

type ReplicaRPCClientMap

type ReplicaRPCClientMap map[int]oramNodeRPCClient

type ReplicateAcksNacksPayload

type ReplicateAcksNacksPayload struct {
	AckedBlocks  []string
	NackedBlocks []string
}

type ReplicateRequestAndPathAndStoragePayload

type ReplicateRequestAndPathAndStoragePayload struct {
	RequestedBlock string
	Path           int
	StorageID      int
	RequestID      string
}

type ReplicateResponsePayload

type ReplicateResponsePayload struct {
	RequestedBlock string
	Response       string
	NewValue       string
	OpType         OperationType
	RequestID      string
	LeaderID       int
}

type ReplicateSentBlocksPayload

type ReplicateSentBlocksPayload struct {
	SentBlocks []string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL