Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GenesisAccId = "0x18b4bA4c118279b3eB60a2DB1E794Bc41AFC1D37" // GenesisAccId = "0x972AeD684D6f817e1b58AF70933dF1b4a75bfA51" GenesisNode = schema.Node{ AccId: GenesisAccId, Name: "TestGenesisNode", Role: schema.RoleMain, Desc: "Test network genesis node", URL: "https://hymatrix.ai", } NonExtractableTags = map[string]string{ "Data-Protocol": "Data-Protocol", "Variant": "Variant", "From-Process": "From-Process", "From-Module": "From-Module", "Type": "Type", "From": "From", "Owner": "Owner", "Anchor": "Anchor", "Target": "Target", "Data": "Data", "Tags": "Tags", "Read-Only": "Read-Only", } )
View Source
var ( ErrInvalidType = errors.New("err_invalid_type") ErrProcessIsRecovering = errors.New("err_process_is_recovering") ErrProcessAlreadyExists = errors.New("err_process_already_exist") ErrProcessNotFound = errors.New("err_process_not_found") ErrRedirect = errors.New("err_redirect") ErrDuplicateItem = errors.New("err_duplicate_item") ErrNotFoundNodes = errors.New("err_not_found_nodes") ErrNotFoundCkp = errors.New("err_not_found_ckp") ErrNotFoundMod = errors.New("err_not_found_mod") ErrUnrecognizedSignatureType = errors.New("err_unrecognized_signature_type") )
Functions ¶
This section is empty.
Types ¶
type AssignMessage ¶
type AssignMessage struct {
Pid string
AccId string
Message schema.Message
Item goarSchema.BundleItem
}
type AssignProcess ¶
type AssignProcess struct {
Pid string
AccId string
Process schema.Process
Item goarSchema.BundleItem
}
type AssignmentHandler ¶ added in v0.1.1
type AssignmentHandler func(AssignmentResult)
type AssignmentResult ¶ added in v0.1.1
type AssignmentResult struct {
Pid string
Item goarSchema.BundleItem
Assign hymxSchema.Assignment
AssignItem goarSchema.BundleItem
Error error
}
type IDB ¶
type IDB interface {
// result
SaveResult(result schema.Result) error
GetResult(msgid string) (result *schema.Result, err error)
GetResults(pid string, limit int64) (results []schema.Result, err error)
// assignment
IsExist(pid string) (ok bool, err error)
GetNonce(pid string) (nonce int64, err error)
Commit(pid string, nonce int64, msg, assign goarSchema.BundleItem) (err error)
// get
GetAllProcess() (pids []string, curNonces []int64, err error)
GetMessage(msgid string) (msg *goarSchema.BundleItem, err error)
GetMessageByNonce(pid string, nonce int64) (msg *goarSchema.BundleItem, err error)
GetAssignByNonce(pid string, nonce int64) (assign *goarSchema.BundleItem, err error)
// checkpoint
GetCheckpointIndex(pid string) (id string, err error)
SaveCheckpointIndex(pid, id string) (err error)
// cache
GetCache(pid, key string) (value string, err error)
SaveCache(pid, key, value string) (err error)
}
type IDBOutbox ¶
type IDBOutbox interface {
Push(pid, target string, message goarSchema.BundleItem) error
Peek(pid, target string) (int, *goarSchema.BundleItem, error)
Commit(pid, target string, assign goarSchema.BundleItem) error
Checkpoint(pid string) (string, error)
Restore(data string) error
}
type ResultHandler ¶
Click to show internal directories.
Click to hide internal directories.