Documentation ¶
Index ¶
- Constants
- Variables
- func NewProcessExecer() *processExecer
- type Cmd
- type CmdList
- type CmdSpec
- type CmdStateRunning
- type CmdStateTerminated
- type CmdStateWaiting
- type CmdStatus
- type Controller
- type Execer
- type FakeExecer
- type FakeProberManager
- type FileWatch
- type FileWatchSpec
- type ObjectMeta
- type ProberManager
- type RestartManager
- type RestartOnSpec
Constants ¶
View Source
const ( Unknown status = iota Running status = iota Done status = iota Error status = iota )
Variables ¶
View Source
var DefaultGracePeriod = 30 * time.Second
View Source
var ErrUnsupportedProbeType = errors.New("unsupported probe type")
View Source
var WireSet = wire.NewSet( ProvideExecer, ProvideProberManager, NewController, )
Functions ¶
func NewProcessExecer ¶
func NewProcessExecer() *processExecer
Types ¶
type CmdStateRunning ¶ added in v0.19.0
type CmdStateRunning = v1alpha1.CmdStateRunning
type CmdStateTerminated ¶ added in v0.19.0
type CmdStateTerminated = v1alpha1.CmdStateTerminated
type CmdStateWaiting ¶ added in v0.19.0
type CmdStateWaiting = v1alpha1.CmdStateWaiting
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
A controller that reads CmdSpec and writes CmdStatus
func NewController ¶
func NewController(ctx context.Context, execer Execer, proberManager ProberManager, client ctrlclient.Client, st store.RStore) *Controller
func (*Controller) SetClient ¶
func (c *Controller) SetClient(client ctrlclient.Client)
func (*Controller) SetupWithManager ¶
func (r *Controller) SetupWithManager(mgr ctrl.Manager) error
func (*Controller) TearDown ¶ added in v0.19.0
func (c *Controller) TearDown(ctx context.Context)
type Execer ¶
type Execer interface {
Start(ctx context.Context, cmd model.Cmd, w io.Writer, statusCh chan statusAndMetadata, spanID model.LogSpanID) chan struct{}
}
func ProvideExecer ¶
func ProvideExecer() Execer
type FakeExecer ¶
type FakeExecer struct {
// contains filtered or unexported fields
}
func NewFakeExecer ¶
func NewFakeExecer() *FakeExecer
func (*FakeExecer) RequireNoKnownProcess ¶
func (fe *FakeExecer) RequireNoKnownProcess(t *testing.T, cmd string)
type FakeProberManager ¶
type FakeProberManager struct {
// contains filtered or unexported fields
}
func NewFakeProberManager ¶
func NewFakeProberManager() *FakeProberManager
func (*FakeProberManager) Exec ¶
func (m *FakeProberManager) Exec(name string, args ...string) prober.ProberFunc
func (*FakeProberManager) HTTPGet ¶
func (m *FakeProberManager) HTTPGet(u *url.URL, headers http.Header) prober.ProberFunc
func (*FakeProberManager) ProbeCount ¶
func (m *FakeProberManager) ProbeCount() int
func (*FakeProberManager) TCPSocket ¶
func (m *FakeProberManager) TCPSocket(host string, port int) prober.ProberFunc
type FileWatchSpec ¶ added in v0.19.0
type FileWatchSpec = v1alpha1.FileWatchSpec
type ObjectMeta ¶ added in v0.19.0
type ObjectMeta = metav1.ObjectMeta
type ProberManager ¶
type ProberManager interface { HTTPGet(u *url.URL, headers http.Header) prober.ProberFunc TCPSocket(host string, port int) prober.ProberFunc Exec(name string, args ...string) prober.ProberFunc }
func ProvideProberManager ¶
func ProvideProberManager() ProberManager
type RestartManager ¶ added in v0.19.0
type RestartManager struct {
// contains filtered or unexported fields
}
Helper struct to help reconcilers determine when to restart their objects when a file changes.
TODO(nick): Currently this uses *Cmd types, but it could be generalized to any type with a *RestartOn field.
func NewRestartManager ¶ added in v0.19.0
func NewRestartManager(client client.Client) *RestartManager
type RestartOnSpec ¶ added in v0.19.0
type RestartOnSpec = v1alpha1.RestartOnSpec
Click to show internal directories.
Click to hide internal directories.