Documentation
¶
Index ¶
- Constants
- Variables
- func GetRapidRelayerVersion() string
- func NonDetachStart(s Service, optionalArgs ...string) error
- type CommandName
- type Docker
- func (d *Docker) Create(version, appHome string) error
- func (d *Docker) GetServiceBinaryAndHome() (string, string, error)
- func (d *Docker) GetServiceFile() (string, error)
- func (d *Docker) GetServiceName() (string, error)
- func (d *Docker) Log(n int) error
- func (d *Docker) PruneLogs() error
- func (d *Docker) RemoveVolume() error
- func (d *Docker) Restart() error
- func (d *Docker) Start(optionalArgs ...string) error
- func (d *Docker) Stop() error
- type Launchd
- func (j *Launchd) Create(binaryVersion, appHome string) error
- func (j *Launchd) GetCommandName() string
- func (j *Launchd) GetServiceBinaryAndHome() (string, string, error)
- func (j *Launchd) GetServiceFile() (string, error)
- func (j *Launchd) GetServiceName() (string, error)
- func (j *Launchd) Log(n int) error
- func (j *Launchd) PruneLogs() error
- func (j *Launchd) Restart() error
- func (j *Launchd) Start(optionalArgs ...string) error
- func (j *Launchd) Stop() error
- type Plist
- type Service
- type Systemd
- func (j *Systemd) Create(binaryVersion, appHome string) error
- func (j *Systemd) GetCommandName() string
- func (j *Systemd) GetServiceBinaryAndHome() (string, string, error)
- func (j *Systemd) GetServiceFile() (string, error)
- func (j *Systemd) GetServiceName() (string, error)
- func (j *Systemd) Log(n int) error
- func (j *Systemd) PruneLogs() error
- func (j *Systemd) Restart() error
- func (j *Systemd) Start(optionalArgs ...string) error
- func (j *Systemd) Stop() error
- type Template
Constants ¶
const RapidRelayerVersionFallback = "v1.0.7"
RapidRelayerVersionFallback is the fallback docker image tag used for the rapid relayer when fetching the latest version from GitHub fails.
Variables ¶
var ( LinuxTemplateMap = map[CommandName]Template{ UpgradableInitia: LinuxRunUpgradableCosmovisorTemplate, NonUpgradableInitia: LinuxRunNonUpgradableCosmovisorTemplate, Minitia: LinuxRunMinitiaBinaryTemplate, OPinitExecutor: LinuxOPinitBotTemplate, OPinitChallenger: LinuxOPinitBotTemplate, Relayer: LinuxRelayerTemplate, } DarwinTemplateMap = map[CommandName]Template{ UpgradableInitia: DarwinRunUpgradableCosmovisorTemplate, NonUpgradableInitia: DarwinRunNonUpgradableCosmovisorTemplate, Minitia: DarwinRunBinaryTemplate, OPinitExecutor: DarwinOPinitBotTemplate, OPinitChallenger: DarwinOPinitBotTemplate, Relayer: DarwinRelayerTemplate, } )
Functions ¶
func GetRapidRelayerVersion ¶ added in v0.3.4
func GetRapidRelayerVersion() string
GetRapidRelayerVersion fetches the latest rapid relayer version from GitHub. Falls back to RapidRelayerVersionFallback if the fetch fails.
func NonDetachStart ¶
Types ¶
type CommandName ¶
type CommandName string
const ( UpgradableInitia CommandName = "upgradable_initia" NonUpgradableInitia CommandName = "non_upgradable_initia" Minitia CommandName = "minitia" OPinitExecutor CommandName = "executor" OPinitChallenger CommandName = "challenger" Relayer CommandName = "relayer" Rollytics CommandName = "rollytics" )
func (CommandName) GetBinaryName ¶
func (cmd CommandName) GetBinaryName() (string, error)
func (CommandName) GetInitCommand ¶ added in v0.1.2
func (cmd CommandName) GetInitCommand() (string, error)
func (CommandName) GetPrettyName ¶ added in v0.1.2
func (cmd CommandName) GetPrettyName() (string, error)
func (CommandName) GetServiceSlug ¶
func (cmd CommandName) GetServiceSlug() (string, error)
type Docker ¶ added in v0.3.4
type Docker struct {
// contains filtered or unexported fields
}
func NewDocker ¶ added in v0.3.4
func NewDocker(commandName CommandName, vmType string) *Docker
func (*Docker) GetServiceBinaryAndHome ¶ added in v0.3.4
func (*Docker) GetServiceFile ¶ added in v0.3.4
func (*Docker) GetServiceName ¶ added in v0.3.4
func (*Docker) RemoveVolume ¶ added in v0.3.4
RemoveVolume removes the Docker volume associated with this service This is useful for complete cleanup and should be called separately from Stop
type Launchd ¶
type Launchd struct {
// contains filtered or unexported fields
}
func NewLaunchd ¶
func NewLaunchd(commandName CommandName) *Launchd
func (*Launchd) GetCommandName ¶
func (*Launchd) GetServiceBinaryAndHome ¶ added in v0.1.2
func (*Launchd) GetServiceFile ¶ added in v0.1.2
func (*Launchd) GetServiceName ¶
type Service ¶
type Service interface {
Create(binaryVersion, appHome string) error
Log(n int) error
Start(optionalArgs ...string) error
Stop() error
Restart() error
PruneLogs() error
GetServiceFile() (string, error)
GetServiceBinaryAndHome() (string, string, error)
}
func NewService ¶
func NewService(commandName CommandName, vmType string) (Service, error)
type Systemd ¶
type Systemd struct {
// contains filtered or unexported fields
}
func NewSystemd ¶
func NewSystemd(commandName CommandName) *Systemd
func (*Systemd) GetCommandName ¶
func (*Systemd) GetServiceBinaryAndHome ¶ added in v0.1.2
func (*Systemd) GetServiceFile ¶ added in v0.1.2
func (*Systemd) GetServiceName ¶
type Template ¶
type Template string
const DarwinOPinitBotTemplate Template = `` /* 958-byte string literal not displayed */
DarwinOPinitBotTemplate should inject the arguments as follows: [binaryName, binaryPath, appHome, userHome, weaveLogPath, serviceName]
const DarwinRelayerTemplate Template = `` /* 883-byte string literal not displayed */
DarwinRelayerTemplate should inject the arguments as follows: [binaryName, binaryPath, appHome, userHome, weaveLogPath, serviceName]
const DarwinRunBinaryTemplate Template = `` /* 989-byte string literal not displayed */
DarwinRunBinaryTemplate should inject the arguments as follows: [1:binaryName, 2:binaryPath, 3:appHome, 4:userHome, 5:weaveLogPath, 6:serviceName]
const DarwinRunNonUpgradableCosmovisorTemplate Template = `` /* 1286-byte string literal not displayed */
DarwinRunNonUpgradableCosmovisorTemplate should inject the arguments as follows: [1:binaryName, 2:binaryPath, 3:appHome, 4:userHome, 5:weaveLogPath, 6:serviceName]
const DarwinRunUpgradableCosmovisorTemplate Template = `` /* 1284-byte string literal not displayed */
DarwinRunUpgradableCosmovisorTemplate should inject the arguments as follows: [1:binaryName, 2:binaryPath, 3:appHome, 4:userHome, 5:weaveLogPath, 6:serviceName]
const LinuxOPinitBotTemplate Template = `` /* 236-byte string literal not displayed */
LinuxOPinitBotTemplate should inject the arguments as follows: [binaryName, binaryPath, serviceName, appHome]
const LinuxRelayerTemplate Template = `` /* 175-byte string literal not displayed */
LinuxRelayerTemplate should inject the arguments as follows: [binaryName, binaryPath, serviceName, appHome]
const LinuxRunMinitiaBinaryTemplate Template = `` /* 224-byte string literal not displayed */
LinuxRunMinitiaBinaryTemplate should inject the arguments as follows: [binaryName, binaryPath, serviceName, appHome]
const LinuxRunNonUpgradableCosmovisorTemplate Template = `` /* 401-byte string literal not displayed */
LinuxRunNonUpgradableCosmovisorTemplate should inject the arguments as follows: [binaryName, binaryPath, serviceName, appHome]
const LinuxRunUpgradableCosmovisorTemplate Template = `` /* 399-byte string literal not displayed */
LinuxRunUpgradableCosmovisorTemplate should inject the arguments as follows: [binaryName, binaryPath, serviceName, appHome, UserField]