Documentation
¶
Index ¶
Constants ¶
View Source
const ShutdownTimeout = time.Second * 10
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandService ¶
type CommandService struct {
// contains filtered or unexported fields
}
CommandService is a Service that runs an external command.
func NewCommandService ¶
func NewCommandService(name string, cmd *exec.Cmd, executor process.Executor, options CommandServiceRunOptions, log logr.Logger) *CommandService
func (*CommandService) Name ¶
func (s *CommandService) Name() string
type CommandServiceRunOptions ¶
type CommandServiceRunOptions uint32
const ( CommandServiceRunOptionShowStderr CommandServiceRunOptions = 0x1 CommandServiceRunOptionDontTerminate CommandServiceRunOptions = 0x2 )
type Host ¶
type Host struct {
// Slice of services to run. Started in order.
Services []Service
// The logger to be used by the host
Logger logr.Logger
// TimeoutFunc allows you to control the timeout behavior for testing
TimeoutFunc func()
}
Host manages the lifetimes and starting of Services.
type LifecycleMessage ¶
LifecycleMessage is a message returned when a service terminates.
Click to show internal directories.
Click to hide internal directories.