local

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Unknown status = iota
	Running status = iota
	Done    status = iota
	Error   status = iota
)

Variables

This section is empty.

Functions

func NewProcessExecer

func NewProcessExecer() *processExecer

func SpanIDForServeLog

func SpanIDForServeLog(procNum int) logstore.SpanID

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func NewController

func NewController(execer Execer) *Controller

func (*Controller) OnChange

func (c *Controller) OnChange(ctx context.Context, st store.RStore)

type Execer

type Execer interface {
	Start(ctx context.Context, cmd model.Cmd, w io.Writer, statusCh chan status) 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)

func (*FakeExecer) Start

func (e *FakeExecer) Start(ctx context.Context, cmd model.Cmd, w io.Writer, statusCh chan status) chan struct{}

type LocalServeLogActionWriter

type LocalServeLogActionWriter struct {
	// contains filtered or unexported fields
}

func (LocalServeLogActionWriter) Write

func (w LocalServeLogActionWriter) Write(level logger.Level, p []byte) error

type LocalServeStatusAction

type LocalServeStatusAction struct {
	ManifestName model.ManifestName
	Status       model.RuntimeStatus
}

func (LocalServeStatusAction) Action

func (LocalServeStatusAction) Action()

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
}

ServeSpec describes what Runner should be running

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL