Documentation ¶
Index ¶
- Constants
- Variables
- func HandleCmdCreateAction(state *store.EngineState, action CmdCreateAction)
- func HandleCmdUpdateAction(state *store.EngineState, action CmdUpdateAction)
- func NewProcessExecer() *processExecer
- func SpanIDForServeLog(procNum int) logstore.SpanID
- type Cmd
- type CmdCreateAction
- type CmdSpec
- type CmdStateRunning
- type CmdStateTerminated
- type CmdStatus
- type CmdUpdateAction
- type Controller
- type Execer
- type FakeExecer
- type FakeProberManager
- type ObjectMeta
- 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")
Functions ¶
func HandleCmdCreateAction ¶ added in v0.18.12
func HandleCmdCreateAction(state *store.EngineState, action CmdCreateAction)
When the local controller creates a new command, link that command to the Local runtime state.
func HandleCmdUpdateAction ¶ added in v0.18.12
func HandleCmdUpdateAction(state *store.EngineState, action CmdUpdateAction)
When the Cmd controller updates a command, check to see what parts of the EngineState care about that command.
If the local serve cmd is watching the cmd, update the local runtime state to match the cmd status.
func NewProcessExecer ¶
func NewProcessExecer() *processExecer
func SpanIDForServeLog ¶
Types ¶
type CmdCreateAction ¶ added in v0.18.12
type CmdCreateAction struct {
Cmd *Cmd
}
func NewCmdCreateAction ¶ added in v0.18.12
func NewCmdCreateAction(cmd *Cmd) CmdCreateAction
func (CmdCreateAction) Action ¶ added in v0.18.12
func (CmdCreateAction) Action()
type CmdStateRunning ¶ added in v0.18.12
type CmdStateRunning = v1alpha1.CmdStateRunning
type CmdStateTerminated ¶ added in v0.18.12
type CmdStateTerminated = v1alpha1.CmdStateTerminated
type CmdUpdateAction ¶ added in v0.18.12
type CmdUpdateAction struct {
Cmd *Cmd
}
func NewCmdUpdateAction ¶ added in v0.18.12
func NewCmdUpdateAction(cmd *Cmd) CmdUpdateAction
func (CmdUpdateAction) Action ¶ added in v0.18.12
func (CmdUpdateAction) Action()
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(execer Execer, proberManager ProberManager) *Controller
func (*Controller) OnChange ¶
func (c *Controller) OnChange(ctx context.Context, st store.RStore, _ store.ChangeSummary)
func (*Controller) TearDown ¶
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 ¶ added in v0.18.6
type FakeProberManager struct {
// contains filtered or unexported fields
}
func NewFakeProberManager ¶ added in v0.18.6
func NewFakeProberManager() *FakeProberManager
func (*FakeProberManager) Exec ¶ added in v0.18.6
func (m *FakeProberManager) Exec(name string, args ...string) prober.ProberFunc
func (*FakeProberManager) HTTPGet ¶ added in v0.18.6
func (m *FakeProberManager) HTTPGet(u *url.URL, headers http.Header) prober.ProberFunc
func (*FakeProberManager) ProbeCount ¶ added in v0.18.6
func (m *FakeProberManager) ProbeCount() int
func (*FakeProberManager) TCPSocket ¶ added in v0.18.6
func (m *FakeProberManager) TCPSocket(host string, port int) prober.ProberFunc
type ObjectMeta ¶ added in v0.18.12
type ObjectMeta = metav1.ObjectMeta
type ProberManager ¶ added in v0.18.6
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 ¶ added in v0.18.6
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.