Documentation ¶
Index ¶
- Constants
- Variables
- func NewProcessExecer() *processExecer
- type Cmd
- type CmdList
- type CmdSpec
- type CmdStateRunning
- type CmdStateTerminated
- type CmdStateWaiting
- type CmdStatus
- type Controller
- func (r *Controller) CreateBuilder(mgr ctrl.Manager) (*builder.Builder, error)
- func (c *Controller) ForceRun(ctx context.Context, cmd *v1alpha1.Cmd) (*v1alpha1.CmdStatus, error)
- func (c *Controller) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (c *Controller) TearDown(ctx context.Context)
- type Execer
- type FakeExecer
- type FakeProberManager
- type FileWatch
- type FileWatchSpec
- type ObjectMeta
- type ProberManager
- type RestartOnSpec
- type StartOnSpec
- type UIButton
- type UIButtonSpec
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, clock clockwork.Clock, scheme *runtime.Scheme) *Controller
func (*Controller) CreateBuilder ¶ added in v0.20.9
func (*Controller) ForceRun ¶ added in v0.21.1
Forces the command to run now.
This is a hack to get local_resource commands into the API server, even though the API server doesn't have a notion of resource deps yet.
Blocks until the command is finished, then returns its status.
func (*Controller) TearDown ¶ added in v0.19.0
func (c *Controller) TearDown(ctx context.Context)
type Execer ¶
type Execer interface { // Returns a channel to pull status updates from. After the process exists // (and transmits its final status), the channel is closed. Start(ctx context.Context, cmd model.Cmd, w io.Writer) chan statusAndMetadata }
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 RestartOnSpec ¶ added in v0.19.0
type RestartOnSpec = v1alpha1.RestartOnSpec
type StartOnSpec ¶ added in v0.20.8
type StartOnSpec = v1alpha1.StartOnSpec
type UIButtonSpec ¶ added in v0.20.8
type UIButtonSpec = v1alpha1.UIButtonSpec
Source Files ¶
Click to show internal directories.
Click to hide internal directories.