view

package
v0.8.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	CollapseAuto = iota
	CollapseYes
	CollapseNo
)
View Source
const TiltfileResourceName = "(Tiltfile)"

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
	ContainerStatus dockercompose.Status
	ContainerID     container.ID
	Log             model.Log
	StartTime       time.Time
}

func NewDCResourceInfo added in v0.4.1

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

func (DCResourceInfo) RuntimeLog added in v0.4.1

func (dcInfo DCResourceInfo) RuntimeLog() model.Log

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             model.Log
	YAML               string
}

func (K8SResourceInfo) RuntimeLog added in v0.4.1

func (k8sInfo K8SResourceInfo) RuntimeLog() model.Log

func (K8SResourceInfo) Status added in v0.4.1

func (k8sInfo K8SResourceInfo) Status() string

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 model.Log

	IsTiltfile bool
}

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() model.Log
	Status() string
	// contains filtered or unexported methods
}

type ResourceViewState added in v0.1.0

type ResourceViewState struct {
	CollapseState CollapseState
}

type TabState added in v0.8.0

type TabState int
const (
	TabAllLog TabState = iota
	TabBuildLog
	TabPodLog
)

type TiltLogState added in v0.4.1

type TiltLogState int
const (
	TiltLogShort TiltLogState = iota
	TiltLogHalfScreen
	TiltLogFullScreen
)

type View

type View struct {
	Log           model.Log
	Resources     []Resource
	TriggerMode   model.TriggerMode
	IsProfiling   bool
	LogTimestamps 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.

func (View) Resource added in v0.7.12

func (v View) Resource(n model.ManifestName) (Resource, bool)

func (View) TiltfileErrorMessage added in v0.2.0

func (v View) TiltfileErrorMessage() string

type ViewState

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

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() model.Log

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