webview

package
v0.8.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

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

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

func (K8SResourceInfo) RuntimeLog

func (k8sInfo K8SResourceInfo) RuntimeLog() model.Log

func (K8SResourceInfo) Status

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

func (Resource) LastBuild

func (r Resource) LastBuild() model.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
}

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