Documentation
¶
Index ¶
Constants ¶
View Source
const ( ErrExecHook = "ErrExecHook" ReasonProcessStarted = "ProcessStarted" ReasonPhaseComplete = "ExecHook" MessageErrExecHook = "Error executing hook: %s" MessageProcessStarted = "Subprocess %q started" MessagePhaseComplete = "Completed phase %q" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenericPilot ¶
type GenericPilot struct {
Options Options
// contains filtered or unexported fields
}
func (*GenericPilot) Elector ¶
func (g *GenericPilot) Elector() leaderelection.Interface
func (*GenericPilot) IsRunning ¶
func (g *GenericPilot) IsRunning() bool
func (*GenericPilot) IsThisPilot ¶
func (g *GenericPilot) IsThisPilot(pilot *v1alpha1.Pilot) bool
IsThisPilot will return true if 'pilot' corresponds to the Pilot resource for this pilot.
func (*GenericPilot) Run ¶
func (g *GenericPilot) Run() error
type Options ¶
type Options struct {
// KubernetesClient is the kubernetes clientset used to talk to the
// apiserver
KubernetesClient kubernetes.Interface
NavigatorClient clientset.Interface
SharedInformerFactory informers.SharedInformerFactory
// PilotName is the name of this Pilot
PilotName string
// PilotNamespace is the namespace the corresponding Pilot exists within
PilotNamespace string
LeaderElectionConfigMap string
// CmdFunc returns an *exec.Cmd for a given Pilot resource for the pilot
CmdFunc func(*v1alpha1.Pilot) (*exec.Cmd, error)
// Signals contains a genericpilot->os.Signal translation
Signals processmanager.Signals
// Stdout to be used when creating the application process
Stdout *os.File
// Stderr to be used when creating the application process
Stderr *os.File
// StopCh signals that the Pilot should shut down when closed
StopCh <-chan struct{}
// Hooks to be run during the lifecycle of the application
Hooks *hook.Hooks
ReadinessProbe probe.Check
LivenessProbe probe.Check
SyncFunc func(*v1alpha1.Pilot) error
LeaderElectedSyncFunc func(*v1alpha1.Pilot) error
}
func NewDefaultOptions ¶
func NewDefaultOptions() *Options
func (*Options) Pilot ¶
func (o *Options) Pilot() (*GenericPilot, error)
Directories
¶
| Path | Synopsis |
|---|---|
|
package hook is used to ensure execution of a set of pre-start, post-start, pre-stop and post-stop hooks.
|
package hook is used to ensure execution of a set of pre-start, post-start, pre-stop and post-stop hooks. |
Click to show internal directories.
Click to hide internal directories.