Documentation ¶
Index ¶
- Constants
- func ServerShutdown()
- type CheckResult
- type Checker
- func (checker *Checker) Check()
- func (checker *Checker) CheckLockFile()
- func (checker *Checker) HandleFailure(result *CheckResult)
- func (checker *Checker) HandleFailureWithoutShutdown(result *CheckResult)
- func (checker *Checker) Mainloop()
- func (checker *Checker) Run()
- func (checker *Checker) Stop()
- func (checker *Checker) TouchLockFile()
- type Command
- type CommandConfig
- type CommandResult
- type Commands
- type Config
- type Flags
- type GlobalConfig
- type Server
- type UserConfig
Constants ¶
View Source
const (
DefaultConfig = "fstaid.toml"
)
Variables ¶
This section is empty.
Functions ¶
func ServerShutdown ¶
func ServerShutdown()
Types ¶
type CheckResult ¶
type CheckResult struct { Primary *CommandResult Secondary *CommandResult Self *CommandResult SecondarySelf *CommandResult }
func (*CheckResult) SecondarySelfCheckIsSuccess ¶ added in v0.1.5
func (result *CheckResult) SecondarySelfCheckIsSuccess() bool
func (*CheckResult) SelfCheckIsSuccess ¶
func (result *CheckResult) SelfCheckIsSuccess() bool
type Checker ¶
type Checker struct { Config *Config Commands *Commands Handler *Command Out io.Writer Running bool WaitGroup *sync.WaitGroup }
func NewChecker ¶
func (*Checker) CheckLockFile ¶
func (checker *Checker) CheckLockFile()
func (*Checker) HandleFailure ¶ added in v0.1.2
func (checker *Checker) HandleFailure(result *CheckResult)
func (*Checker) HandleFailureWithoutShutdown ¶ added in v0.1.2
func (checker *Checker) HandleFailureWithoutShutdown(result *CheckResult)
func (*Checker) TouchLockFile ¶
func (checker *Checker) TouchLockFile()
type Command ¶
func NewCommand ¶
func NewCommand(name string, config *CommandConfig) (cmd *Command, err error)
type CommandConfig ¶
type CommandResult ¶
func (*CommandResult) IsSuccess ¶
func (result *CommandResult) IsSuccess() bool
type Commands ¶
func NewCommands ¶
func (*Commands) Check ¶
func (cmds *Commands) Check() (result *CheckResult)
func (*Commands) InitCheck ¶ added in v0.1.1
func (cmds *Commands) InitCheck() (result *CheckResult)
type Config ¶
type Config struct { Global GlobalConfig Primary CommandConfig Secondary CommandConfig Self CommandConfig Handler CommandConfig User []UserConfig }
func LoadConfig ¶
type GlobalConfig ¶
type GlobalConfig struct { Port int Maxattempts int AttemptInterval float64 `toml:"attempt_interval"` Interval int Lockdir string Log string Mode string ContinueIfSelfCheckFailed bool `toml:"continue_if_self_check_failed"` }
func (*GlobalConfig) LockFile ¶
func (config *GlobalConfig) LockFile() string
type UserConfig ¶
Click to show internal directories.
Click to hide internal directories.