view

package
v0.33.19 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

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 {
	ContainerStatus string
	ContainerID     container.ID
	SpanID          logstore.SpanID
	StartTime       time.Time
	RunStatus       v1alpha1.RuntimeStatus
}

func NewDCResourceInfo added in v0.4.1

func NewDCResourceInfo(status string, cID container.ID, spanID logstore.SpanID, startTime time.Time, runtimeStatus v1alpha1.RuntimeStatus) DCResourceInfo

func (DCResourceInfo) RuntimeSpanID added in v0.10.25

func (dcInfo DCResourceInfo) RuntimeSpanID() logstore.SpanID

func (DCResourceInfo) RuntimeStatus added in v0.14.0

func (dcInfo DCResourceInfo) RuntimeStatus() v1alpha1.RuntimeStatus

func (DCResourceInfo) Status added in v0.4.1

func (dcInfo DCResourceInfo) Status() string

type K8sResourceInfo added in v0.8.10

type K8sResourceInfo struct {
	PodName            string
	PodCreationTime    time.Time
	PodUpdateStartTime time.Time
	PodStatus          string
	PodRestarts        int
	SpanID             logstore.SpanID
	RunStatus          v1alpha1.RuntimeStatus
	DisplayNames       []string
}

func (K8sResourceInfo) RuntimeSpanID added in v0.10.25

func (k8sInfo K8sResourceInfo) RuntimeSpanID() logstore.SpanID

func (K8sResourceInfo) RuntimeStatus added in v0.14.0

func (k8sInfo K8sResourceInfo) RuntimeStatus() v1alpha1.RuntimeStatus

func (K8sResourceInfo) Status added in v0.8.10

func (k8sInfo K8sResourceInfo) Status() string

type LocalResourceInfo added in v0.10.9

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

func NewLocalResourceInfo added in v0.14.0

func NewLocalResourceInfo(status v1alpha1.RuntimeStatus, pid int, spanID model.LogSpanID) LocalResourceInfo

func (LocalResourceInfo) RuntimeSpanID added in v0.10.25

func (lri LocalResourceInfo) RuntimeSpanID() logstore.SpanID

func (LocalResourceInfo) RuntimeStatus added in v0.14.0

func (lri LocalResourceInfo) RuntimeStatus() v1alpha1.RuntimeStatus

func (LocalResourceInfo) Status added in v0.10.9

func (lri LocalResourceInfo) Status() string

type Resource

type Resource struct {
	Name           model.ManifestName
	LastDeployTime time.Time
	TriggerMode    model.TriggerMode

	BuildHistory []model.BuildRecord
	CurrentBuild model.BuildRecord

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

	Endpoints []string

	ResourceInfo ResourceInfoView

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

func (r Resource) IsK8s() bool

func (Resource) IsYAML added in v0.4.1

func (r Resource) IsYAML() bool

func (Resource) K8sInfo added in v0.8.10

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 {
	RuntimeSpanID() logstore.SpanID
	RuntimeStatus() v1alpha1.RuntimeStatus
	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
	TabRuntimeLog
)

type TiltLogState added in v0.4.1

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

type TiltfileResourceInfo added in v0.14.0

type TiltfileResourceInfo struct {
}

This TiltfileResourceInfo is consistent with how the web UI models the tiltfile.

func (TiltfileResourceInfo) RuntimeSpanID added in v0.14.0

func (TiltfileResourceInfo) RuntimeSpanID() logstore.SpanID

func (TiltfileResourceInfo) RuntimeStatus added in v0.14.0

func (TiltfileResourceInfo) Status added in v0.14.0

func (TiltfileResourceInfo) Status() string

type View

type View struct {
	LogReader  logstore.Reader
	Resources  []Resource
	FatalError error
}

Snapshot 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
	ProcessedLogs    logstore.Checkpoint
	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 {
	K8sDisplayNames []string
}

func (YAMLResourceInfo) RuntimeSpanID added in v0.10.25

func (yamlInfo YAMLResourceInfo) RuntimeSpanID() logstore.SpanID

func (YAMLResourceInfo) RuntimeStatus added in v0.14.0

func (yamlInfo YAMLResourceInfo) RuntimeStatus() v1alpha1.RuntimeStatus

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