fabric

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: 6 Imported by: 0

Documentation

Index

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

func (f *Fabric) Close()

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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