spacekeeper

package
v0.0.0-...-163fc3c Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidSKType = errors.New("invalid SpaceKeeper type")
	ErrInvalidSKArgs = errors.New("invalid SpaceKeeper args")
	ErrUnimplemented = errors.New("unimplemented SpaceKeeper interface")
)
View Source
var (
	KeeperBackendList []SKBackend
)

Functions

func AddSpaceKeeperBackend

func AddSpaceKeeperBackend(ins SKBackend)

Types

type SKBackend

type SKBackend struct {
	Typ            string
	NewSpaceKeeper func(args ...interface{}) (SpaceKeeper, error)
}

type SpaceKeeper

type SpaceKeeper interface {
	Start() error
	Stop() error
	Started() bool
	Type() string
	WorkSpaceIDs(flags engine.WorkSpaceStateFlags) ([]string, error)
	WorkSpaceInfos(flags engine.WorkSpaceStateFlags) ([]engine.WorkSpaceInfo, error)
	GetProof(ctx context.Context, sid string, challenge pocutil.Hash) (*engine.WorkSpaceProof, error)
	GetProofs(ctx context.Context, flags engine.WorkSpaceStateFlags, challenge pocutil.Hash) ([]*engine.WorkSpaceProof, error)
	GetProofReader(ctx context.Context, sid string, challenge pocutil.Hash) (engine.ProofReader, error)
	GetProofsReader(ctx context.Context, flags engine.WorkSpaceStateFlags, challenge pocutil.Hash) (engine.ProofReader, error)
	ActOnWorkSpace(sid string, action engine.ActionType) error
	ActOnWorkSpaces(flags engine.WorkSpaceStateFlags, action engine.ActionType) (map[string]error, error)
	SignHash(sid string, hash [32]byte) (*pocec.Signature, error)
}

func NewSpaceKeeper

func NewSpaceKeeper(kbType string, args ...interface{}) (SpaceKeeper, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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