Documentation ¶
Index ¶
- Constants
- Variables
- func NewProcessExecer() *processExecer
- func SpanIDForServeLog(procNum int) logstore.SpanID
- type Cmd
- type Controller
- type ControllerOld
- type Execer
- type FakeExecer
- type FakeProberManager
- type LocalServeLogActionWriter
- type LocalServeReadinessProbeAction
- type LocalServeStatusAction
- type ProberManager
- type ServeSpec
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( NewController, )
Functions ¶
func NewProcessExecer ¶
func NewProcessExecer() *processExecer
func SpanIDForServeLog ¶
Types ¶
type Controller ¶
func NewController ¶
func NewController() *Controller
func (*Controller) SetClient ¶
func (r *Controller) SetClient(client client.Client)
func (*Controller) SetupWithManager ¶
func (r *Controller) SetupWithManager(mgr ctrl.Manager) error
type ControllerOld ¶
type ControllerOld struct {
// contains filtered or unexported fields
}
func NewControllerOld ¶
func NewControllerOld(execer Execer, proberManager ProberManager) *ControllerOld
func (*ControllerOld) OnChange ¶
func (c *ControllerOld) OnChange(ctx context.Context, st store.RStore, _ store.ChangeSummary)
func (*ControllerOld) TearDown ¶
func (c *ControllerOld) 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 LocalServeLogActionWriter ¶
type LocalServeLogActionWriter struct {
// contains filtered or unexported fields
}
type LocalServeReadinessProbeAction ¶
type LocalServeReadinessProbeAction struct { ManifestName model.ManifestName Ready bool }
func (LocalServeReadinessProbeAction) Action ¶
func (LocalServeReadinessProbeAction) Action()
type LocalServeStatusAction ¶
type LocalServeStatusAction struct { ManifestName model.ManifestName Status model.RuntimeStatus PID int // 0 if there's no process running SpanID model.LogSpanID }
func (LocalServeStatusAction) Action ¶
func (LocalServeStatusAction) Action()
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 ServeSpec ¶
type ServeSpec struct { ManifestName model.ManifestName ServeCmd model.Cmd TriggerTime time.Time // TriggerTime is how Runner knows to restart; if it's newer than the TriggerTime of the currently running command, then Runner should restart it ReadinessProbe *v1alpha1.Probe }
ServeSpec describes what Runner should be running
Click to show internal directories.
Click to hide internal directories.