package types
import "github.com/Diarkis/diarkis/dgs/types"
Index
Variables
var ErrCodeInvalidDGSIdentifier = errors.New("invalid DGS identifier provided")
ErrCodeInvalidDGSIdentifier on dgs.InstanceRPC invalid DGS identifier provision.
var ErrCodeOnUnpackFailure = errors.New("failed to unpack RPC payload")
ErrCodeOnUnpackFailure on dgs.InstanceRPC payload unpack failure.
var ErrOnInstanceRPCCallbackFailure = errors.New("instance RPC callback failed")
ErrOnInstanceRPCCallbackFailure on dgs.InstanceRPC callback failure.
var ErrOnInstanceStartCallbackFailure = errors.New("instance create callback failed")
ErrOnInstanceStartCallbackFailure on dgs.CreateInstance callback failure.
var ErrTokenGenerationFailure = errors.New("failed to generate RPC token")
ErrTokenGenerationFailure on dgs.CreateInstance callback failure.
var ErrUnknownError = errors.New("unknown error")
ErrUnknownError on dgs.InstanceRPC callback failure.
Types
type AllocateResult
type AllocateResult struct { Address string Port int }
AllocateResult struct which encapsulates the endpoint information for Diarkis DGS allocations.
[IMPORTANT] The provided endpoint address MUST be the public endpoint of the selected node.
type DGSSDK
type DGSSDK interface { // Name return the name of the current backend. Name() string // Setup setup the backend with the corresponding backend config map. Setup(name string, config map[string]any) error // AllocateDGS specify (with context-timeout) the instansiation of the DGS server, and returns the public address as an types.AllocateResult struct. // [NOTE] AllocateDGS parameters 'param' and 'config' come directly from the call to dgs.CreateInterface without being altered. // These are meant to be utilized inside of the backend interface implementation of AllocateDGS. AllocateDGS(ctx context.Context, params map[string]string, config map[string]string) (AllocateResult, error) }
DGSSDK interface which implements the necessary functionality for a DGS API backend.