webview

package
v0.10.9 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NeedsNudge added in v0.8.4

func NeedsNudge(st store.EngineState) bool

Types

type BuildRecord added in v0.8.6

type BuildRecord struct {
	model.BuildRecord
	IsCrashRebuild bool
}

func ToWebViewBuildRecord added in v0.8.6

func ToWebViewBuildRecord(br model.BuildRecord) BuildRecord

func ToWebViewBuildRecords added in v0.8.6

func ToWebViewBuildRecords(brs []model.BuildRecord) []BuildRecord

type DCResourceInfo

type DCResourceInfo struct {
	ConfigPaths     []string
	ContainerStatus dockercompose.Status
	ContainerID     container.ID
	Log             model.Log
	StartTime       time.Time
}

func NewDCResourceInfo

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

func (DCResourceInfo) RuntimeLog

func (dcInfo DCResourceInfo) RuntimeLog() model.Log

func (DCResourceInfo) Status

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
	PodStatusMessage   string
	AllContainersReady bool
	PodRestarts        int
	PodLog             model.Log
}

func (K8sResourceInfo) RuntimeLog added in v0.8.10

func (k8sInfo K8sResourceInfo) RuntimeLog() model.Log

func (K8sResourceInfo) Status added in v0.8.10

func (k8sInfo K8sResourceInfo) Status() string

type LocalResourceInfo added in v0.10.9

type LocalResourceInfo struct{}

Local resources have no run time info, so it's all empty.

func (LocalResourceInfo) RuntimeLog added in v0.10.9

func (LocalResourceInfo) RuntimeLog() model.Log

func (LocalResourceInfo) Status added in v0.10.9

func (LocalResourceInfo) Status() string

type Resource

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

	BuildHistory []BuildRecord
	CurrentBuild BuildRecord

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

	Endpoints []string
	PodID     k8s.PodID

	// TODO(nick): Remove ResourceInfoView. This is fundamentally a bad
	// data structure for the webview because the webview loses the Go type
	// on serialization to JS.
	ResourceInfo  ResourceInfoView
	RuntimeStatus RuntimeStatus

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

func (Resource) LastBuild

func (r Resource) LastBuild() BuildRecord

type ResourceInfoView

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

type RuntimeStatus

type RuntimeStatus string
const (
	RuntimeStatusOK      RuntimeStatus = "ok"
	RuntimeStatusPending RuntimeStatus = "pending"
	RuntimeStatusError   RuntimeStatus = "error"
)

type View

type View struct {
	Log           model.Log
	Resources     []Resource
	LogTimestamps bool

	FeatureFlags map[string]bool

	NeedsAnalyticsNudge bool

	RunningTiltBuild model.TiltBuild
	LatestTiltBuild  model.TiltBuild

	TiltCloudUsername   string
	TiltCloudSchemeHost string
}

func StateToWebView added in v0.8.2

func StateToWebView(s store.EngineState) View

func (View) Resource added in v0.7.12

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

type YAMLResourceInfo

type YAMLResourceInfo struct {
	K8sResources []string
}

func (YAMLResourceInfo) RuntimeLog

func (yamlInfo YAMLResourceInfo) RuntimeLog() model.Log

func (YAMLResourceInfo) Status

func (yamlInfo YAMLResourceInfo) Status() string

Jump to

Keyboard shortcuts

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