executor

package
v0.0.0-...-3c905e5 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2023 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package executor 管理插件执行器

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetName

func GetName() string

GetName return manage name

func Init

func Init(name string, cfg *types.ChainConfig, sub []byte)

Init resister a dirver

func InitExecType

func InitExecType()

InitExecType initials coins functions.

func IsSuperManager

func IsSuperManager(cfg *types.ChainConfig, addr string) bool

IsSuperManager is supper manager or not

func NewConfigTable

func NewConfigTable(kvdb db.KV) *table.Table

NewConfigTable 新建表

Types

type ConfigRow

type ConfigRow struct {
	*mty.ConfigStatus
}

ConfigRow table meta 结构

func NewConfigRow

func NewConfigRow() *ConfigRow

NewConfigRow 新建一个meta 结构

func (*ConfigRow) CreateRow

func (r *ConfigRow) CreateRow() *table.Row

CreateRow 新建数据行(注意index 数据一定也要保存到数据中,不能就保存heightindex)

func (*ConfigRow) Get

func (r *ConfigRow) Get(key string) ([]byte, error)

Get 按照indexName 查询 indexValue

func (*ConfigRow) SetPayload

func (r *ConfigRow) SetPayload(data types.Message) error

SetPayload 设置数据

type Manage

type Manage struct {
	drivers.DriverBase
}

Manage defines Manage object

func (*Manage) CheckReceiptExecOk

func (c *Manage) CheckReceiptExecOk() bool

CheckReceiptExecOk return true to check if receipt ty is ok

func (*Manage) CheckTx

func (c *Manage) CheckTx(tx *types.Transaction, index int) error

CheckTx checkout transaction

func (*Manage) ExecDelLocal

func (c *Manage) ExecDelLocal(tx *types.Transaction, receipt *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecDelLocal 重写基类

func (*Manage) ExecLocal_Apply

func (c *Manage) ExecLocal_Apply(payload *mty.ApplyConfig, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecLocal_Apply local apply

func (*Manage) ExecLocal_Approve

func (c *Manage) ExecLocal_Approve(payload *mty.ApproveConfig, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecLocal_Approve local approve

func (*Manage) Exec_Apply

func (c *Manage) Exec_Apply(payload *mty.ApplyConfig, tx *types.Transaction, index int) (*types.Receipt, error)

Exec_Apply apply config

func (*Manage) Exec_Approve

func (c *Manage) Exec_Approve(payload *mty.ApproveConfig, tx *types.Transaction, index int) (*types.Receipt, error)

Exec_Approve approve config apply

func (*Manage) Exec_Modify

func (c *Manage) Exec_Modify(manageAction *types.ModifyConfig, tx *types.Transaction, index int) (*types.Receipt, error)

Exec_Modify modify exec

func (*Manage) GetDriverName

func (c *Manage) GetDriverName() string

GetDriverName return a drivername

func (*Manage) Query_GetConfigID

func (c *Manage) Query_GetConfigID(in *types.ReqString) (types.Message, error)

Query_GetConfigID get config item id

func (*Manage) Query_GetConfigItem

func (c *Manage) Query_GetConfigItem(in *types.ReqString) (types.Message, error)

Query_GetConfigItem get config item

func (*Manage) Query_ListConfigID

func (c *Manage) Query_ListConfigID(req *mty.ReqQueryConfigList) (types.Message, error)

Query_ListConfigID get config item id

Jump to

Keyboard shortcuts

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