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)
Click to show internal directories.
Click to hide internal directories.