Documentation ¶
Index ¶
- type XChain
- func (x *XChain) Close()
- func (x *XChain) ConfirmTask(opt *blockchain.FLTaskConfirmOptions) error
- func (x *XChain) ExecuteTask(opt *blockchain.FLTaskExeStatusOptions) error
- func (x *XChain) FinishTask(opt *blockchain.FLTaskExeStatusOptions) error
- func (x *XChain) GetExecutorNodeByID(id string) (node blockchain.ExecutorNode, err error)
- func (x *XChain) GetExecutorNodeByName(name string) (node blockchain.ExecutorNode, err error)
- func (x *XChain) GetTaskById(id string) (blockchain.FLTask, error)
- func (x *XChain) ListExecutorNodes() (blockchain.ExecutorNodes, error)
- func (x *XChain) ListTask(opt *blockchain.ListFLTaskOptions) (blockchain.FLTasks, error)
- func (x *XChain) PublishTask(opt *blockchain.PublishFLTaskOptions) error
- func (x *XChain) RegisterExecutorNode(opt *blockchain.AddNodeOptions) error
- func (x *XChain) RejectTask(opt *blockchain.FLTaskConfirmOptions) error
- func (x *XChain) StartTask(opt *blockchain.StartFLTaskOptions) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type XChain ¶
type XChain struct {
xchainblockchain.XChain
}
func New ¶
func New(conf *config.XchainConf) (*XChain, error)
New creates a XChain client used for connecting and requesting blockchain
func (*XChain) ConfirmTask ¶
func (x *XChain) ConfirmTask(opt *blockchain.FLTaskConfirmOptions) error
ConfirmTask is called when Executor confirms task
func (*XChain) ExecuteTask ¶
func (x *XChain) ExecuteTask(opt *blockchain.FLTaskExeStatusOptions) error
ExecuteTask is called when Executor run task
func (*XChain) FinishTask ¶
func (x *XChain) FinishTask(opt *blockchain.FLTaskExeStatusOptions) error
FinishTask is called when task execution finished
func (*XChain) GetExecutorNodeByID ¶
func (x *XChain) GetExecutorNodeByID(id string) (node blockchain.ExecutorNode, err error)
GetExecutorNodeByID gets Executor node by ID
func (*XChain) GetExecutorNodeByName ¶
func (x *XChain) GetExecutorNodeByName(name string) (node blockchain.ExecutorNode, err error)
GetExecutorNodeByName gets Executor node by name
func (*XChain) GetTaskById ¶
func (x *XChain) GetTaskById(id string) (blockchain.FLTask, error)
GetTaskById gets task by id
func (*XChain) ListExecutorNodes ¶
func (x *XChain) ListExecutorNodes() (blockchain.ExecutorNodes, error)
ListExecutorNodes gets all Executor nodes from xchain
func (*XChain) ListTask ¶
func (x *XChain) ListTask(opt *blockchain.ListFLTaskOptions) (blockchain.FLTasks, error)
ListTask lists tasks from xchain
func (*XChain) PublishTask ¶
func (x *XChain) PublishTask(opt *blockchain.PublishFLTaskOptions) error
PublishTask publishes task on xchain
func (*XChain) RegisterExecutorNode ¶
func (x *XChain) RegisterExecutorNode(opt *blockchain.AddNodeOptions) error
RegisterExecutorNode registers Executor node to xchain
func (*XChain) RejectTask ¶
func (x *XChain) RejectTask(opt *blockchain.FLTaskConfirmOptions) error
RejectTask is called when Executor rejects task
func (*XChain) StartTask ¶
func (x *XChain) StartTask(opt *blockchain.StartFLTaskOptions) error
StartTask is called when Requester starts task after all Executors confirmed