Documentation ¶
Index ¶
- type StateCtx
- func (t *StateCtx) IsInit() bool
- func (t *StateCtx) SetAclMG(aclMgr aclBase.AclManager)
- func (t *StateCtx) SetContractMG(contractMgr contract.Manager)
- func (t *StateCtx) SetGovernTokenMG(governTokenMgr governToken.GovManager)
- func (t *StateCtx) SetProposalMG(proposalMgr propose.ProposeManager)
- func (t *StateCtx) SetTimerTaskMG(timerTaskMgr timerTask.TimerManager)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StateCtx ¶
type StateCtx struct { // 基础上下文 xctx.BaseCtx // 运行环境配置 EnvCfg *xconf.EnvConf // 账本配置 LedgerCfg *lconf.XLedgerConf // 链名 BCName string // ledger handle Ledger *ledger.Ledger // crypto client Crypt cryptoBase.CryptoClient // acl manager // 注意:注入后才可以使用 AclMgr aclBase.AclManager // contract Manager // 注意:依赖注入后才可以使用 ContractMgr contract.Manager // 注意:注入后才可以使用 GovernTokenMgr governToken.GovManager // 注意:注入后才可以使用 ProposalMgr propose.ProposeManager // 注意:注入后才可以使用 TimerTaskMgr timerTask.TimerManager }
状态机运行上下文环境
func NewStateCtx ¶
func NewStateCtx(envCfg *xconf.EnvConf, bcName string, leg *ledger.Ledger, crypt cryptoBase.CryptoClient) (*StateCtx, error)
func (*StateCtx) SetAclMG ¶
func (t *StateCtx) SetAclMG(aclMgr aclBase.AclManager)
func (*StateCtx) SetContractMG ¶
func (*StateCtx) SetGovernTokenMG ¶
func (t *StateCtx) SetGovernTokenMG(governTokenMgr governToken.GovManager)
func (*StateCtx) SetProposalMG ¶
func (t *StateCtx) SetProposalMG(proposalMgr propose.ProposeManager)
func (*StateCtx) SetTimerTaskMG ¶
func (t *StateCtx) SetTimerTaskMG(timerTaskMgr timerTask.TimerManager)
Click to show internal directories.
Click to hide internal directories.