Documentation ¶
Index ¶
- func InterruptGroup(pgid int, service *services.ServiceConfig) error
- func KillGroup(pgid int, service *services.ServiceConfig) error
- type Backend
- type LaunchChecks
- type LegacyUnmarshaler
- type Loader
- func (l *Loader) Builder(s *services.ServiceConfig, b services.Backend) (services.Builder, error)
- func (l *Loader) Handles(c services.Backend) bool
- func (l *Loader) Name() string
- func (l *Loader) New() services.Backend
- func (l *Loader) Runner(s *services.ServiceConfig, b services.Backend) (services.Runner, error)
- type ServiceConfigCommands
- type ServiceConfigProperties
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InterruptGroup ¶
func InterruptGroup(pgid int, service *services.ServiceConfig) error
InterruptGroup sends an interrupt signal to a process group. Will use sudo if required by this service.
Types ¶
type Backend ¶
type Backend struct { // Commands for managing the service Commands ServiceConfigCommands `json:"commands"` // Checks to perform to ensure that a service has started correctly LaunchChecks *LaunchChecks `json:"launch_checks,omitempty"` }
func GetConfigCommandLine ¶
func GetConfigCommandLine(s *services.ServiceConfig) (*Backend, error)
func (*Backend) HasBuildStep ¶
func (*Backend) HasLaunchStep ¶
func (*Backend) UnmarshalJSON ¶
type LaunchChecks ¶
type LaunchChecks struct { // A string to look for in the service's logs that indicates it has completed startup. LogText string `json:"log_text,omitempty"` // One or more specific ports that are expected to be opened when this service starts. Ports []int `json:"ports,omitempty"` // Wait for a specified amount of time (in ms) before calling the service started if still running. Wait int64 `json:"wait,omitempty"` }
LaunchChecks defines the mechanism for testing whether a service has started successfully
type LegacyUnmarshaler ¶
type LegacyUnmarshaler struct{}
func (*LegacyUnmarshaler) Unmarshal ¶
func (l *LegacyUnmarshaler) Unmarshal(data []byte, c *services.ServiceConfig) error
type ServiceConfigCommands ¶
type ServiceConfigCommands struct { // Command to build Build string `json:"build,omitempty"` // Command to launch Launch string `json:"launch,omitempty"` // Optional command to stop Stop string `json:"stop,omitempty"` }
ServiceConfigCommands define the commands for building, launching and stopping a service All commands are optional
type ServiceConfigProperties ¶
type ServiceConfigProperties struct { // Regex to detect a line indicating the service has started successfully Started string `json:"started,omitempty"` // Custom properties, mapping a property name to a regex Custom map[string]string `json:"-"` }
ServiceConfigProperties provides a set of regexes to detect properties of a service Deprecated: This has been dropped in favour of LaunchChecks
Click to show internal directories.
Click to hide internal directories.