executor

package
v1.67.3 Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: BSD-3-Clause Imports: 13 Imported by: 4

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.Chain33Config, sub []byte)

Init resister a dirver

func InitExecType

func InitExecType()

InitExecType initials coins functions.

func IsSuperManager

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

IsSuperManager is supper manager or not

func NewConfigTable added in v1.66.1

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

NewConfigTable 新建表

Types

type ConfigRow added in v1.66.1

type ConfigRow struct {
	*mty.ConfigStatus
}

ConfigRow table meta 结构

func NewConfigRow added in v1.66.1

func NewConfigRow() *ConfigRow

NewConfigRow 新建一个meta 结构

func (*ConfigRow) CreateRow added in v1.66.1

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

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

func (*ConfigRow) Get added in v1.66.1

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

Get 按照indexName 查询 indexValue

func (*ConfigRow) SetPayload added in v1.66.1

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 added in v1.66.1

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

ExecDelLocal 重写基类

func (*Manage) ExecLocal_Apply added in v1.66.1

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 added in v1.66.1

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 added in v1.66.1

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

Exec_Apply apply config

func (*Manage) Exec_Approve added in v1.66.1

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 added in v1.66.1

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 added in v1.66.1

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