xchain

package
v0.0.0-...-ebe581b Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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) Close

func (x *XChain) Close()

Close closes client

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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