Documentation ¶
Index ¶
Constants ¶
View Source
const ModuleName = "worker/storage"
ModuleName is the storage worker module name.
Variables ¶
View Source
var ErrRuntimeNotFound = errors.New(ModuleName, 1, "worker/storage: runtime not found")
ErrRuntimeNotFound is the error returned when the called references an unknown runtime.
Functions ¶
func RegisterService ¶
func RegisterService(server *grpc.Server, service StorageWorker)
RegisterService registers a new storage worker service with the given gRPC server.
Types ¶
type ForceFinalizeRequest ¶
type ForceFinalizeRequest struct { RuntimeID common.Namespace `json:"runtime_id"` Round uint64 `json:"round"` }
ForceFinalizeRequest is a ForceFinalize request.
type GetLastSyncedRoundRequest ¶
GetLastSyncedRoundRequest is a GetLastSyncedRound request.
type GetLastSyncedRoundResponse ¶
type GetLastSyncedRoundResponse struct { Round uint64 `json:"round"` IORoot storage.Root `json:"io_root"` StateRoot storage.Root `json:"state_root"` }
GetLastSyncedRoundResponse is a GetLastSyncedRound response.
type StorageWorker ¶
type StorageWorker interface { // GetLastSyncedRound retrieves the last synced round for the storage worker. GetLastSyncedRound(ctx context.Context, request *GetLastSyncedRoundRequest) (*GetLastSyncedRoundResponse, error) // ForceFinalize forces finalization of a specific round. ForceFinalize(ctx context.Context, request *ForceFinalizeRequest) error }
StorageWorker is the storage worker control API interface.
func NewStorageWorkerClient ¶
func NewStorageWorkerClient(c *grpc.ClientConn) StorageWorker
NewStorageWorkerClient creates a new gRPC transaction scheduler client service.
Click to show internal directories.
Click to hide internal directories.