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