view

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CollapseAuto = iota
	CollapseYes
	CollapseNo
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppendToTriggerQueueAction added in v0.4.1

type AppendToTriggerQueueAction struct {
	Name model.ManifestName
}

func (AppendToTriggerQueueAction) Action added in v0.4.1

func (AppendToTriggerQueueAction) Action()

type CollapseState added in v0.4.1

type CollapseState int

func (CollapseState) IsCollapsed added in v0.4.1

func (c CollapseState) IsCollapsed(defaultCollapse bool) bool

type DCResourceInfo added in v0.4.1

type DCResourceInfo struct {
	ConfigPath string

	ContainerID container.ID

	StartTime time.Time
	// contains filtered or unexported fields
}

func NewDCResourceInfo added in v0.4.1

func NewDCResourceInfo(configPath string, status dockercompose.Status, cID container.ID, log string, startTime time.Time) DCResourceInfo

func (DCResourceInfo) RuntimeLog added in v0.4.1

func (dcInfo DCResourceInfo) RuntimeLog() string

func (DCResourceInfo) Status added in v0.4.1

func (dcInfo DCResourceInfo) Status() string

type K8SResourceInfo added in v0.4.1

type K8SResourceInfo struct {
	PodName            string
	PodCreationTime    time.Time
	PodUpdateStartTime time.Time
	PodStatus          string
	PodRestarts        int
	PodLog             string
}

func (K8SResourceInfo) RuntimeLog added in v0.4.1

func (k8sInfo K8SResourceInfo) RuntimeLog() string

func (K8SResourceInfo) Status added in v0.4.1

func (k8sInfo K8SResourceInfo) Status() string

type LogModal added in v0.1.0

type LogModal struct {
	// if non-0, which resource's log is currently shown in a modal (1-based index)
	ResourceLogNumber int

	// if we're showing the full tilt log output in a modal
	TiltLog TiltLogState
}

type Resource

type Resource struct {
	Name               model.ManifestName
	DirectoriesWatched []string
	PathsWatched       []string
	LastDeployTime     time.Time

	BuildHistory []model.BuildRecord
	CurrentBuild model.BuildRecord

	PendingBuildReason model.BuildReason
	PendingBuildEdits  []string
	PendingBuildSince  time.Time

	Endpoints []string

	ResourceInfo ResourceInfoView

	// If a pod had to be killed because it was crashing, we keep the old log around
	// for a little while.
	CrashLog string

	IsTiltfile      bool
	ShowBuildStatus bool // if true, we show status & time in 'Build Status'; else, "N/A"
}

func (Resource) DCInfo added in v0.4.1

func (r Resource) DCInfo() DCResourceInfo

func (Resource) DefaultCollapse added in v0.4.1

func (r Resource) DefaultCollapse() bool

func (Resource) DockerComposeTarget added in v0.4.3

func (r Resource) DockerComposeTarget() DCResourceInfo

func (Resource) IsCollapsed added in v0.4.1

func (r Resource) IsCollapsed(rv ResourceViewState) bool

func (Resource) IsDC added in v0.4.1

func (r Resource) IsDC() bool

func (Resource) IsK8S added in v0.4.1

func (r Resource) IsK8S() bool

func (Resource) IsYAML added in v0.4.1

func (r Resource) IsYAML() bool

func (Resource) K8SInfo added in v0.4.1

func (r Resource) K8SInfo() K8SResourceInfo

func (Resource) LastBuild added in v0.4.1

func (r Resource) LastBuild() model.BuildRecord

func (Resource) YAMLInfo added in v0.4.1

func (r Resource) YAMLInfo() YAMLResourceInfo

type ResourceInfoView added in v0.4.1

type ResourceInfoView interface {
	RuntimeLog() string
	Status() string
	// contains filtered or unexported methods
}

type ResourceViewState added in v0.1.0

type ResourceViewState struct {
	CollapseState CollapseState
}

type TiltLogState added in v0.4.1

type TiltLogState int
const (
	TiltLogPane TiltLogState = iota
	TiltLogHalfScreen
	TiltLogFullScreen
	TiltLogMinimized
)

type View

type View struct {
	Log                  string
	Resources            []Resource
	TiltfileErrorMessage string
	TriggerMode          model.TriggerMode
	IsProfiling          bool
}

State of the current view that's not expressed in the underlying model state.

This includes things like the current selection, warning messages, narration messages, etc.

Client should always hold this as a value struct, and copy it whenever they need to mutate something.

type ViewState

type ViewState struct {
	ShowNarration         bool
	NarrationMessage      string
	Resources             []ResourceViewState
	LogModal              LogModal
	ProcessedLogByteCount int
	AlertMessage          string
}

func (*ViewState) CycleViewLogState added in v0.4.1

func (vs *ViewState) CycleViewLogState()

type YAMLResourceInfo added in v0.4.1

type YAMLResourceInfo struct {
	K8sResources []string
}

func (YAMLResourceInfo) RuntimeLog added in v0.4.1

func (yamlInfo YAMLResourceInfo) RuntimeLog() string

func (YAMLResourceInfo) Status added in v0.4.1

func (yamlInfo YAMLResourceInfo) Status() string

Jump to

Keyboard shortcuts

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