octant

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2020 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActionDeleteObject            = "action.octant.dev/deleteObject"
	ActionOverviewCordon          = "action.octant.dev/cordon"
	ActionOverviewUncordon        = "action.octant.dev/uncordon"
	ActionOverviewContainerEditor = "action.octant.dev/containerEditor"
	ActionOverviewCronjob         = "action.octant.dev/cronJob"
	ActionOverviewServiceEditor   = "action.octant.dev/serviceEditor"
	ActionDeploymentConfiguration = "action.octant.dev/deploymentConfiguration"
	ActionUpdateObject            = "action.octant.dev/update"
)
View Source
const (
	// EventTypeBuildInfo is a buildInfo event
	EventTypeBuildInfo EventType = "event.octant.dev/buildInfo"

	// EventTypeContent is a content event.
	EventTypeContent EventType = "event.octant.dev/content"

	// EventTypeNamespaces is a namespaces event.
	EventTypeNamespaces EventType = "event.octant.dev/namespaces"

	// EventTypeNavigation is a navigation event.
	EventTypeNavigation EventType = "event.octant.dev/navigation"

	// EventTypeObjectNotFound is an object not found event.
	EventTypeObjectNotFound EventType = "event.octant.dev/objectNotFound"

	// EventTypeCurrentNamespace is a current namespace event.
	EventTypeCurrentNamespace EventType = "event.octant.dev/currentNamespace"

	// EventTypeUnknown is an unknown event.
	EventTypeUnknown EventType = "event.octant.dev/unknown"

	// EventTypeNamespace is a namespace event.
	EventTypeNamespace EventType = "event.octant.dev/namespace"

	// EventTypeContext is a context event.
	EventTypeContext EventType = "event.octant.dev/context"

	// EventTypeKubeConfig is an event for updating kube contexts on the front end.
	EventTypeKubeConfig EventType = "event.octant.dev/kubeConfig"

	// EventTypeContentPath is a content path event.
	EventTypeContentPath EventType = "event.octant.dev/contentPath"

	// EventTypeFilters is a filters event.
	EventTypeFilters EventType = "event.octant.dev/filters"

	// EventTypeAlert is an alert event.
	EventTypeAlert EventType = "event.octant.dev/alert"

	// EventTypeTerminalFormat is a string with format specifiers to assist in generating
	// a terminal event type.
	EventTypeTerminalFormat string = "event.octant.dev/terminals/namespace/%s/pod/%s/container/%s"

	// EventTypeLoggingFormat is a string with format specifiers to assist in generating
	// a logging event type.
	EventTypeLoggingFormat string = "event.octant.dev/logging/namespace/%s/pod/%s"
)
View Source
const (
	// WorkloadStatusColorOK is the color for ok workload status.
	WorkloadStatusColorOK = "#60b515"
	// WorkloadStatusColorWarning is the color for warning workload status.
	WorkloadStatusColorWarning = "#f57600"
	// WorkloadStatusColorError is the color for error workload status.
	WorkloadStatusColorError = "#e12200"
)

Variables

View Source
var (
	// PodMetricsResource is resource for pod metrics.
	PodMetricsResource = schema.GroupVersionResource{Group: "metrics.k8s.io", Version: "v1beta1", Resource: "pods"}
)

Functions

func CRDAPIVersions

func CRDAPIVersions(crd *unstructured.Unstructured) ([]schema.GroupVersion, error)

CRDAPIVersions returns the group versions that are contained within a CRD.

func CombineResourceRequirements added in v0.10.0

func CombineResourceRequirements(a, b corev1.ResourceRequirements) corev1.ResourceRequirements

CombineResourceRequirements combines two resource requirements into a new resource requirement.

func CreateCard added in v0.10.0

func CreateCard(workload *Workload, namespace string) (*component.Card, bool, error)

func DeleteObjectConfirmation added in v0.13.0

func DeleteObjectConfirmation(object runtime.Object) (*component.Confirmation, error)

func DeleteObjectConfirmationButton added in v0.13.0

func DeleteObjectConfirmationButton(object runtime.Object) (component.ButtonOption, error)

func IsPodMetricsNotSupported added in v0.10.0

func IsPodMetricsNotSupported(err error) bool

IsPodMetricsNotSupported returns true if error is pod metrics not supported.

func ObjectUpdateFromPayload added in v0.13.0

func ObjectUpdateFromPayload(payload action.Payload) (*unstructured.Unstructured, error)

ObjectUpdateFromPayload loads an object from the payload. The object source in YAML format should exist in the `update` key.

func PodCPUStat added in v0.10.0

func PodCPUStat(workload *Workload) (*component.SingleStat, error)

PodCPUStat creates a single stat component for pod cpu. It will summarize all the pods in the workload.

func PodMemoryStat added in v0.10.0

func PodMemoryStat(workload *Workload) (*component.SingleStat, error)

PodMemoryStat creates a single stats component for pod memory. It will summarize all the pods in the workload.

Types

type CRDPathGenFunc

type CRDPathGenFunc func(namespace, crdName, version, name string) (string, error)

CRDPathGenFunc is a function that generates a custom resource path.

type ClientRequestHandler

type ClientRequestHandler struct {
	RequestType string
	Handler     func(state State, payload action.Payload) error
}

ClientRequestHandler is a client request.

type ClusterPodMetricsLoader added in v0.10.0

type ClusterPodMetricsLoader struct {
	PodMetricsCRUD PodMetricsCRUD
	// contains filtered or unexported fields
}

ClusterPodMetricsLoader loads metrics for a pod using a cluster client.

func NewClusterPodMetricsLoader added in v0.10.0

func NewClusterPodMetricsLoader(clusterClient cluster.ClientInterface, options ...ClusterPodMetricsLoaderOption) (*ClusterPodMetricsLoader, error)

NewClusterPodMetricsLoader creates an instance of ClusterPodMetricsLoader.

func (*ClusterPodMetricsLoader) Load added in v0.10.0

func (ml *ClusterPodMetricsLoader) Load(namespace, name string) (*unstructured.Unstructured, bool, error)

Load loads metrics for a pod given namespace and a name.

func (*ClusterPodMetricsLoader) SupportsMetrics added in v0.10.0

func (ml *ClusterPodMetricsLoader) SupportsMetrics() (bool, error)

type ClusterPodMetricsLoaderOption added in v0.10.0

type ClusterPodMetricsLoaderOption func(loader *ClusterPodMetricsLoader)

ClusterPodMetricsLoaderOption is an option for configuring ClusterPodMetricsLoader.

type ClusterWorkloadLoader added in v0.10.0

type ClusterWorkloadLoader struct {
	ObjectStatuser   func(context.Context, runtime.Object, store.Store) (objectstatus.ObjectStatus, error)
	ObjectStore      store.Store
	PodMetricsLoader PodMetricsLoader
}

ClusterWorkloadLoader loads workloads from a Kubernetes cluster.

func NewClusterWorkloadLoader added in v0.10.0

func NewClusterWorkloadLoader(objectStore store.Store, pml PodMetricsLoader, options ...ClusterWorkloadLoaderOption) (*ClusterWorkloadLoader, error)

NewWorkloadLoader creates an instance of ClusterWorkloadLoader.

func (*ClusterWorkloadLoader) Load added in v0.10.0

func (wl *ClusterWorkloadLoader) Load(ctx context.Context, namespace string) ([]Workload, error)

Load loads workloads from a cluster.

type ClusterWorkloadLoaderOption added in v0.10.0

type ClusterWorkloadLoaderOption func(wl *ClusterWorkloadLoader)

ClusterWorkloadLoaderOption is option for configuring ClusterWorkloadLoader.

type ContainerEditor

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

ContainerEditor edits containers.

func NewContainerEditor

func NewContainerEditor(objectStore store.Store) *ContainerEditor

NewContainerEditor creates an instance of ContainerEditor.

func (*ContainerEditor) ActionName

func (e *ContainerEditor) ActionName() string

ActionName returns name of this action.

func (*ContainerEditor) Handle

func (e *ContainerEditor) Handle(ctx context.Context, alerter action.Alerter, payload action.Payload) error

Handle edits a container. Supported edits:

  • image

type ContentPathUpdateFunc

type ContentPathUpdateFunc func(contentPath string)

ContentPathUpdateFunc is a function that is called when content path is updated.

type Cordon added in v0.11.0

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

Cordon cordons a node

func NewCordon added in v0.11.0

func NewCordon(objectStore store.Store, clusterClient cluster.ClientInterface) *Cordon

NewCordon creates an instance of Cordon

func (*Cordon) ActionName added in v0.11.0

func (c *Cordon) ActionName() string

ActionName returns the name of this action

func (*Cordon) Cordon added in v0.11.0

func (c *Cordon) Cordon(node *corev1.Node) error

Cordon marks a node as unschedulable

func (*Cordon) Handle added in v0.11.0

func (c *Cordon) Handle(ctx context.Context, alerter action.Alerter, payload action.Payload) error

Handle executing cordon

type CronJobTrigger added in v0.11.0

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

CronJobTrigger manually triggers a cronjob

func NewCronJobTrigger added in v0.11.0

func NewCronJobTrigger(objectStore store.Store, clusterClient cluster.ClientInterface) *CronJobTrigger

NewCronJobTrigger creates an instance of CronJobTrigger

func (*CronJobTrigger) ActionName added in v0.11.0

func (c *CronJobTrigger) ActionName() string

ActionName returns the name of this action

func (*CronJobTrigger) Handle added in v0.11.0

func (c *CronJobTrigger) Handle(ctx context.Context, alerter action.Alerter, payload action.Payload) error

Handle executing cronjob

func (*CronJobTrigger) Trigger added in v0.11.0

func (c *CronJobTrigger) Trigger(name string, cronJob *batchv1beta1.CronJob) error

Trigger manually creates a new job

type CustomResourceDefinition added in v0.10.0

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

func NewCustomResourceDefinition added in v0.10.0

func NewCustomResourceDefinition(object *unstructured.Unstructured) (*CustomResourceDefinition, error)

func (*CustomResourceDefinition) Version added in v0.10.0

func (*CustomResourceDefinition) Versions added in v0.10.0

func (crd *CustomResourceDefinition) Versions() ([]string, error)

type CustomResourceDefinitionPrinterColumn added in v0.10.0

type CustomResourceDefinitionPrinterColumn struct {
	Name        string
	Type        string
	Description string
	JSONPath    string
}

type CustomResourceDefinitionVersion added in v0.10.0

type CustomResourceDefinitionVersion struct {
	Version        string
	PrinterColumns []CustomResourceDefinitionPrinterColumn
}

type DeploymentConfigurationEditor

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

DeploymentConfigurationEditor edits a deployment's configuration.

func NewDeploymentConfigurationEditor

func NewDeploymentConfigurationEditor(logger log.Logger, objectStore store.Store) *DeploymentConfigurationEditor

NewDeploymentConfigurationEditor edits a deployment.

func (*DeploymentConfigurationEditor) ActionName

func (e *DeploymentConfigurationEditor) ActionName() string

ActionName returns the action name for this editor.

func (*DeploymentConfigurationEditor) Handle

Handle edits a deployment. Supported edits:

  • replicas

type EntriesFunc

type EntriesFunc func(ctx context.Context, prefix, namespace string, objectStore store.Store, wantsClusterScoped bool) ([]navigation.Navigation, bool, error)

EntriesFunc is a function that can create navigation entries.

type Event

type Event struct {
	Type EventType   `json:"type"`
	Data interface{} `json:"data"`
	Err  error
}

Event is an event for the dash frontend.

type EventType

type EventType string

func NewLoggingEventType added in v0.12.0

func NewLoggingEventType(namespace, pod string) EventType

NewLoggingEventType returns an event type for pod logs. This is the Event.Type that an Octant client will watch for to read the logging stream.

func NewTerminalEventType added in v0.12.0

func NewTerminalEventType(namespace, pod, container string) EventType

NewTerminalEventType returns an event type for a specific terminal instance. This is the Event.Type that an Octant client will watch for to read the terminal stream.

type Filter

type Filter struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

Filter is used to filter queries for objects. Typically, the filter is an object's label.

func (*Filter) IsEqual

func (f *Filter) IsEqual(other Filter) bool

IsEqual returns true if the filter equals the other filter.

func (*Filter) String

func (f *Filter) String() string

String converts the filter to a string.

func (*Filter) ToQueryParam

func (f *Filter) ToQueryParam() string

ToQueryParam converts the filter to a query parameter.

type Generator

type Generator interface {
	// Event generates events using the returned channel.
	Event(ctx context.Context) (Event, error)

	// ScheduleDelay is how long to wait before scheduling this generator again.
	ScheduleDelay() time.Duration

	// Name is the generator name.
	Name() string
}

Generator generates events.

type NamespaceUpdateFunc

type NamespaceUpdateFunc func(namespace string)

NamespaceUpdateFunc is a function that is called when namespace is updated.

type NavigationEntries struct {
	Lookup       map[string]string
	EntriesFuncs map[string]EntriesFunc
	IconMap      map[string]string
	Order        []string
}

NavigationEntries help construct navigation entries.

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

NavigationFactory generates navigation entries.

func NewNavigationFactory

func NewNavigationFactory(namespace string, root string, objectStore store.Store, entries NavigationEntries) *NavigationFactory

NewNavigationFactory creates an instance of NewNavigationFactory.

func (nf *NavigationFactory) Generate(ctx context.Context, module string, wantsClusterScoped bool) ([]navigation.Navigation, error)

Generate returns navigation entries.

func (nf *NavigationFactory) Root() string

Root returns the rootPath of the navigation tree.

type NoPodMetricsErr added in v0.10.0

type NoPodMetricsErr struct{}

NoPodMetricsErr is an error signifying a cluster does not have pod metrics support.

func (*NoPodMetricsErr) Error added in v0.10.0

func (e *NoPodMetricsErr) Error() string

func (*NoPodMetricsErr) NoPodMetricsSupport added in v0.10.0

func (e *NoPodMetricsErr) NoPodMetricsSupport() bool

type ObjectPath

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

ObjectPath contains functions for generating paths for an object. Typically this is a helper which can be embedded in modules.

func NewObjectPath

func NewObjectPath(config ObjectPathConfig) (*ObjectPath, error)

NewObjectPath creates ObjectPath.

func (*ObjectPath) AddCRD

func (op *ObjectPath) AddCRD(ctx context.Context, crd *unstructured.Unstructured) error

AddCRD adds support for a CRD to the ObjectPath.

func (*ObjectPath) GroupVersionKindPath

func (op *ObjectPath) GroupVersionKindPath(namespace, apiVersion, kind, name string) (string, error)

GroupVersionKind returns a path for an object.

func (*ObjectPath) RemoveCRD

func (op *ObjectPath) RemoveCRD(ctx context.Context, crd *unstructured.Unstructured) error

RemoveCRD removes support for a CRD from the ObjectPath.

func (*ObjectPath) ResetCRDs

func (op *ObjectPath) ResetCRDs(ctx context.Context) error

ResetCRDs deletes all the CRD paths ObjectPath is tracking.

func (*ObjectPath) SupportedGroupVersionKind

func (op *ObjectPath) SupportedGroupVersionKind() []schema.GroupVersionKind

SupportedGroupVersionKind returns a slice of GVKs this object path can handle.

type ObjectPathConfig

type ObjectPathConfig struct {
	ModuleName     string
	SupportedGVKs  []schema.GroupVersionKind
	PathLookupFunc PathLookupFunc
	CRDPathGenFunc CRDPathGenFunc
}

ObjectPathConfig is configuration for ObjectPath.

func (*ObjectPathConfig) Validate

func (opc *ObjectPathConfig) Validate() error

Validate returns an error if the configuration is invalid.

type ObjectUpdaterDispatcher added in v0.13.0

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

ObjectUpdaterDispatcher is an action that updates an object.

func NewObjectUpdaterDispatcher added in v0.13.0

func NewObjectUpdaterDispatcher(objectStore store.Store, options ...ObjectUpdaterDispatcherOption) *ObjectUpdaterDispatcher

NewObjectUpdaterDispatcher creates an instance of ObjectUpdaterDispatcher.

func (ObjectUpdaterDispatcher) ActionName added in v0.13.0

func (o ObjectUpdaterDispatcher) ActionName() string

ActionName returns the action name this dispatcher responds to.

func (ObjectUpdaterDispatcher) Handle added in v0.13.0

func (o ObjectUpdaterDispatcher) Handle(ctx context.Context, alerter action.Alerter, payload action.Payload) error

Handle updates an object using a payload if possible.

type ObjectUpdaterDispatcherOption added in v0.13.0

type ObjectUpdaterDispatcherOption func(dispatcher *ObjectUpdaterDispatcher)

type PathLookupFunc

type PathLookupFunc func(namespace, apiVersion, kind, name string) (string, error)

PathLookupFunc looks up paths for an object.

type PodMetricsCRUD added in v0.10.0

type PodMetricsCRUD interface {
	// Get returns pod metrics for a pod. If pod is not found, isFound will be false.
	Get(namespace, name string) (pod *unstructured.Unstructured, isFound bool, err error)
}

PodMetricsCRUD contains CRUD methods for accessing pod metrics.

type PodMetricsLoader added in v0.10.0

type PodMetricsLoader interface {
	// Load loads metrics for a pod given namespace and a name. It returns false if the
	// object is not found.
	Load(namespace, name string) (object *unstructured.Unstructured, isFound bool, err error)
	// SupportsMetrics returns true if the cluster has metrics support.
	SupportsMetrics() (bool, error)
}

PodMetricsLoader loads metrics for a pod.

type PodWithMetric added in v0.10.0

type PodWithMetric struct {
	Pod          *unstructured.Unstructured
	ResourceList corev1.ResourceList
}

PodWithMetric combines a pod and resource list into a single type.

type PortForward added in v0.10.0

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

PortForward creates a port forwarder

func NewPortForward added in v0.10.0

func NewPortForward(logger log.Logger, objectStore store.Store, portForwarder portforward.PortForwarder) *PortForward

NewPortForward creates an instance of PortForward

func (*PortForward) ActionName added in v0.10.0

func (p *PortForward) ActionName() string

ActionName returns the name of this action

func (*PortForward) Handle added in v0.10.0

func (p *PortForward) Handle(ctx context.Context, alerter action.Alerter, payload action.Payload) error

Handle starts a port forward

type PortForwardDelete added in v0.10.0

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

PortForwardDelete stops a port forwarder

func NewPortForwardDelete added in v0.10.0

func NewPortForwardDelete(logger log.Logger, objectStore store.Store, portForwarder portforward.PortForwarder) *PortForwardDelete

NewPortForwardDelete creates an instance of PortForwardDelete

func (*PortForwardDelete) ActionName added in v0.10.0

func (p *PortForwardDelete) ActionName() string

ActionName returns the name of this action

func (*PortForwardDelete) Handle added in v0.10.0

func (p *PortForwardDelete) Handle(ctx context.Context, alerter action.Alerter, payload action.Payload) error

Handle stops a port forward

type ServiceConfigurationEditor

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

ServiceConfigurationEditor edits editors.

func NewServiceConfigurationEditor

func NewServiceConfigurationEditor(objectStore store.Store) *ServiceConfigurationEditor

NewServiceConfigurationEditor creates an instance of ServiceConfigurationEditor.

func (*ServiceConfigurationEditor) ActionName

func (s *ServiceConfigurationEditor) ActionName() string

ActionName returns the name of this action.

func (*ServiceConfigurationEditor) Handle

func (s *ServiceConfigurationEditor) Handle(ctx context.Context, alerter action.Alerter, payload action.Payload) error

Handle edits a service: Supported edits:

  • selector

type State

type State interface {
	// SetContentPath sets the content path.
	SetContentPath(string)
	// GetContentPath returns the content path.
	GetContentPath() string
	// OnNamespaceUpdate registers a function to be called with the content path
	// is changed.
	OnContentPathUpdate(fn ContentPathUpdateFunc) UpdateCancelFunc
	// GetQueryParams returns the query params.
	GetQueryParams() map[string][]string
	// SetNamespace sets the namespace.
	SetNamespace(namespace string)
	// GetNamespace returns the namespace.
	GetNamespace() string
	// OnNamespaceUpdate returns a function to be called when the namespace
	// is changed.
	OnNamespaceUpdate(fun NamespaceUpdateFunc) UpdateCancelFunc
	// AddFilter adds a label to filtered.
	AddFilter(filter Filter)
	// RemoveFilter removes a filter.
	RemoveFilter(filter Filter)
	// GetFilters returns a slice of filters.
	GetFilters() []Filter
	// SetFilters replaces the current filters with a slice of filters.
	// The slice can be empty.
	SetFilters(filters []Filter)
	// SetContext sets the current context.
	SetContext(requestedContext string)
	// Dispatch dispatches a payload for an action.
	Dispatch(ctx context.Context, actionName string, payload action.Payload) error
	// SendAlert sends an alert.
	SendAlert(alert action.Alert)
}

State represents Octant's view state.

type Uncordon added in v0.11.0

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

Uncordon uncordons a node

func NewUncordon added in v0.11.0

func NewUncordon(objectStore store.Store, clusterClient cluster.ClientInterface) *Uncordon

NewUncordon creates an instances of uncordon

func (*Uncordon) ActionName added in v0.11.0

func (u *Uncordon) ActionName() string

ActionName returns the name of this action

func (*Uncordon) Handle added in v0.11.0

func (u *Uncordon) Handle(ctx context.Context, alerter action.Alerter, payload action.Payload) error

Handle executing uncordon

func (*Uncordon) Uncordon added in v0.11.0

func (u *Uncordon) Uncordon(node *corev1.Node) error

Uncordon marks a node as schedulable

type UpdateCancelFunc

type UpdateCancelFunc func()

UpdateCancelFunc cancels the update.

type Workload added in v0.10.0

type Workload struct {
	// IconName is the name of the icon for this workload.
	IconName string
	// Name is the name of the workload
	Name string
	// Owner is the ancestor that ultimately own the workload.
	Owner *unstructured.Unstructured

	SegmentCounter map[component.NodeStatus][]PodWithMetric
	// contains filtered or unexported fields
}

Workload is a workload.

func NewWorkload added in v0.10.0

func NewWorkload(name, iconName string) *Workload

NewWorkload creates a workload.

func (*Workload) AddPodStatus added in v0.10.0

func (w *Workload) AddPodStatus(status component.NodeStatus, object *unstructured.Unstructured, resourceList corev1.ResourceList)

AddStatus adds a pod status to the workload.

func (*Workload) DonutChart added in v0.10.0

func (w *Workload) DonutChart(size component.DonutChartSize) (*component.DonutChart, error)

func (*Workload) PodMetricsEnabled added in v0.10.0

func (w *Workload) PodMetricsEnabled() bool

func (*Workload) Pods added in v0.10.0

func (*Workload) PodsWithMetrics added in v0.10.0

func (w *Workload) PodsWithMetrics() []PodWithMetric

PodsWithMetrics returns a slice of PodWithMetric.

func (*Workload) SetPodMetricsDisabled added in v0.10.0

func (w *Workload) SetPodMetricsDisabled()

type WorkloadCardCollector added in v0.10.0

type WorkloadCardCollector struct {
	WorkloadLoader WorkloadLoaderInterface
}

WorkloadCardCollector creates cards for workloads in a namespace.

func NewWorkloadCardCollector added in v0.10.0

func NewWorkloadCardCollector(loader WorkloadLoaderInterface) (*WorkloadCardCollector, error)

NewWorkloadCardCollector creates an instance of WorkloadCardCollector.

func (*WorkloadCardCollector) Collect added in v0.10.0

func (wc *WorkloadCardCollector) Collect(ctx context.Context, namespace string) ([]*component.Card, bool, error)

Collect collects cards.

type WorkloadLoaderInterface added in v0.10.0

type WorkloadLoaderInterface interface {
	// Load loads workloads from a namespace.
	Load(ctx context.Context, namespace string) ([]Workload, error)
}

WorkloadLoaderInterface loads workloads from a namespace.

type WorkloadSummary added in v0.10.0

type WorkloadSummary struct {
	Summary        component.Component
	Memory         component.Component
	CPU            component.Component
	MetricsEnabled bool
}

func CreateWorkloadSummary added in v0.10.0

func CreateWorkloadSummary(workload *Workload, summarySize component.DonutChartSize) (WorkloadSummary, error)

Directories

Path Synopsis
Package fake is a generated GoMock package.
Package fake is a generated GoMock package.

Jump to

Keyboard shortcuts

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