Documentation
¶
Index ¶
- type Configuration
- type Handler
- func (handler *Handler) DaemonReload() error
- func (handler *Handler) DeRegister(ctx *log.Context) error
- func (handler *Handler) Disable() error
- func (handler *Handler) Enable() error
- func (handler *Handler) GetInstalledVersion(ctx *log.Context) (string, error)
- func (handler *Handler) IsActive() (bool, error)
- func (handler *Handler) IsEnabled() (bool, error)
- func (handler *Handler) IsInstalled() (bool, error)
- func (handler *Handler) Register(ctx *log.Context, unitConfigContent string) error
- func (handler *Handler) Start() error
- func (handler *Handler) Stop() error
- type UnitManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct {
Name string
}
func NewConfiguration ¶
func NewConfiguration(unitName string) Configuration
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(manager UnitManager, configuration Configuration, ctx *log.Context) Handler
func (*Handler) DaemonReload ¶
func (*Handler) GetInstalledVersion ¶
func (*Handler) IsInstalled ¶
type UnitManager ¶
type UnitManager interface { StartUnit(unitName string, ctx *log.Context) error StopUnit(unitName string, ctx *log.Context) error EnableUnit(unitName string, ctx *log.Context) error DisableUnit(unitName string, ctx *log.Context) error DaemonReload(unitName string, ctx *log.Context) error IsUnitActive(unitName string, ctx *log.Context) error IsUnitEnabled(unitName string, ctx *log.Context) (bool, error) IsUnitInstalled(unitName string, ctx *log.Context) (bool, error) RemoveUnitConfigurationFile(unitName string, ctx *log.Context) error CreateUnitConfigurationFile(unitName string, content []byte, ctx *log.Context) error GetInstalledVersion(unitName string, ctx *log.Context) (string, error) }
Click to show internal directories.
Click to hide internal directories.