webview

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RuntimeStatusOK      RuntimeStatus = "ok"
	RuntimeStatusPending               = "pending"
	RuntimeStatusError                 = "error"
)

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

func NewDCResourceInfo

func NewDCResourceInfo(configPath 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
	PodRestarts        int
	PodLog             model.Log
	YAML               string
}

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

type View

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

	SailEnabled bool
	SailURL     string

	NeedsAnalyticsNudge bool

	RunningTiltBuild model.TiltBuild
	LatestTiltBuild  model.TiltBuild
}

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