Documentation ¶
Overview ¶
Package commands is a set of libraries for cassini commands.
help: show help for cassini
$ cassini help [commands] [flags] $ cassini -h $ cassini --hrlp
start: start the relay serivce
$ cassini start
version: show version info
$ cassini version
dev mock: start mocking relay service
$ cassini dev mock -h
dev events: subscribe and show the events
$ cassini dev events -h
dev tx: query tx
$ cassini dev tx -h
!!!WARN It's DANGER!!!
dev reset: reset(cleaning up) data for cssini
$ cassini dev reset -h
Index ¶
- Constants
- func NewEventsCommand(run Runner, isKeepRunning bool) *cobra.Command
- func NewMockCommand(run Runner, isKeepRunning bool) *cobra.Command
- func NewResetCommand(run Runner, isKeepRunning bool) *cobra.Command
- func NewRootCommand(versioner Runner) *cobra.Command
- func NewStartCommand(run Runner, isKeepRunning bool) *cobra.Command
- func NewTxCommand(run Runner, isKeepRunning bool) *cobra.Command
- func NewVersionCommand(run Runner, isKeepRunning bool) *cobra.Command
- type Runner
Constants ¶
View Source
const ( CmdCassini = "cassini" CmdVersion = "version" CmdStart = "start" CmdMock = "mock" CmdEvents = "events" CmdTx = "tx" CmdReset = "reset" CmdHelp = "help" ShortDescription = "The relay of cross-chain" )
nolint
View Source
const ( FlagHome = "home" FlagConfig = "config" FlagLog = "log" FlagQueue = "queue" )
nolint
View Source
const ( // DefaultEventSubscribe events 默认订阅条件 DefaultEventSubscribe string = "tm.event='Tx' AND qcp.to='qos'" )
Variables ¶
This section is empty.
Functions ¶
func NewEventsCommand ¶
NewEventsCommand 创建 events 命令
func NewMockCommand ¶
NewMockCommand 创建 mock/模拟服务 命令
func NewResetCommand ¶ added in v0.1.0
NewResetCommand 创建 reset/重置(清理) 命令
func NewStartCommand ¶
NewStartCommand 创建 start/服务启动 命令
func NewTxCommand ¶
NewTxCommand 创建 tx 命令
Types ¶
type Runner ¶
type Runner func() (context.CancelFunc, error)
Runner 通过配置数据执行方法,返回运行过程中出现的错误,如果返回空则代表运行成功。
Click to show internal directories.
Click to hide internal directories.