Documentation ¶
Index ¶
- func RelPathOfCWD(rootpath string) (string, error)
- type DockerProcess
- type GeneralSCFramework
- func (gscf *GeneralSCFramework) Deploy(desc *xpb.NativeCodeDesc, code []byte) error
- func (gscf *GeneralSCFramework) Finalize(blockid []byte) error
- func (gscf *GeneralSCFramework) NewInstance(ctx *bridge.Context) (bridge.Instance, error)
- func (gscf *GeneralSCFramework) ReadOutput(desc *contract.TxDesc) (contract.ContractOutputInterface, error)
- func (gscf *GeneralSCFramework) RegisterSyscallService(service *bridge.SyscallService)
- func (gscf *GeneralSCFramework) Rollback(desc *contract.TxDesc) error
- func (gscf *GeneralSCFramework) Run(desc *contract.TxDesc) error
- func (gscf *GeneralSCFramework) SetContext(context *contract.TxContext) error
- func (gscf *GeneralSCFramework) Status() []*xpb.NativeCodeStatus
- func (gscf *GeneralSCFramework) Stop()
- type HostProcess
- type Process
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DockerProcess ¶
DockerProcess is the process running as a docker container
func (*DockerProcess) Start ¶
func (d *DockerProcess) Start() error
Start implements process interface
type GeneralSCFramework ¶
GeneralSCFramework manage native contracts
func New ¶
func New(cfg *config.NativeConfig, rootpath string, xlog log.Logger, otherPaths []string, kvEngineType string) (*GeneralSCFramework, error)
New instances a new GeneralSCFramework
func (*GeneralSCFramework) Deploy ¶
func (gscf *GeneralSCFramework) Deploy(desc *xpb.NativeCodeDesc, code []byte) error
Deploy 部署新版本到当前节点,并且启动合约进程
func (*GeneralSCFramework) Finalize ¶
func (gscf *GeneralSCFramework) Finalize(blockid []byte) error
Finalize implements ContractInterface
func (*GeneralSCFramework) NewInstance ¶
NewInstance implements bridge.Executor
func (*GeneralSCFramework) ReadOutput ¶
func (gscf *GeneralSCFramework) ReadOutput(desc *contract.TxDesc) (contract.ContractOutputInterface, error)
ReadOutput implements ContractInterface
func (*GeneralSCFramework) RegisterSyscallService ¶
func (gscf *GeneralSCFramework) RegisterSyscallService(service *bridge.SyscallService)
RegisterSyscallService implements bridge.Executor
func (*GeneralSCFramework) Rollback ¶
func (gscf *GeneralSCFramework) Rollback(desc *contract.TxDesc) error
Rollback implements ContractInterface
func (*GeneralSCFramework) Run ¶
func (gscf *GeneralSCFramework) Run(desc *contract.TxDesc) error
Run implements ContractInterface 升级流程: 直接部署新版本,然后投票指定高度激活即可
func (*GeneralSCFramework) SetContext ¶
func (gscf *GeneralSCFramework) SetContext(context *contract.TxContext) error
SetContext implements ContractInterface
func (*GeneralSCFramework) Status ¶
func (gscf *GeneralSCFramework) Status() []*xpb.NativeCodeStatus
Status returns status of all the native contracts
func (*GeneralSCFramework) Stop ¶
func (gscf *GeneralSCFramework) Stop()
Stop stop all the native contracts process It blocks until all the process ends
type HostProcess ¶
HostProcess is the process running as a native process