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) IsThisPilot ¶
func (g *GenericPilot) IsThisPilot(pilot *v1alpha1.Pilot) bool
IsThisPilot will return true if 'pilot' corresponds to the Pilot resource for this pilot.
type Options ¶
type Options struct {
// KubernetesClient is the kubernetes clientset used to talk to the
// apiserver
KubernetesClient kubernetes.Interface
// NavigatorClient is the clientset used to talk to the navigator apiserver
NavigatorClient clientset.Interface
// SharedInformerFactory provides a shared cache of informers
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
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.