local

package
v0.13.6 Latest Latest
Warning

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

Go to latest
Published: May 14, 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)

func (*Controller) TearDown added in v0.11.1

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)

func (*FakeExecer) Start

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

type LocalServeLogActionWriter

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

func (LocalServeLogActionWriter) Write

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

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 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