Documentation ¶
Index ¶
- Constants
- Variables
- func CRDAPIVersions(crd *unstructured.Unstructured) ([]schema.GroupVersion, error)
- func CombineResourceRequirements(a, b corev1.ResourceRequirements) corev1.ResourceRequirements
- func CreateCard(workload *Workload, namespace string) (*component.Card, bool, error)
- func DeleteObjectConfirmation(object runtime.Object) (*component.Confirmation, error)
- func DeleteObjectConfirmationButton(object runtime.Object) (component.ButtonOption, error)
- func IsPodMetricsNotSupported(err error) bool
- func ObjectUpdateFromPayload(payload action.Payload) (*unstructured.Unstructured, error)
- func PodCPUStat(workload *Workload) (*component.SingleStat, error)
- func PodMemoryStat(workload *Workload) (*component.SingleStat, error)
- type ApplyYaml
- type CRDPathGenFunc
- type ClientRequestHandler
- type ClusterPodMetricsLoader
- type ClusterPodMetricsLoaderOption
- type ClusterWorkloadLoader
- type ClusterWorkloadLoaderOption
- type ContainerEditor
- type ContentPathUpdateFunc
- type Cordon
- type CronJobResume
- type CronJobSuspend
- type CronJobTrigger
- type CustomResourceDefinitionPrinterColumn
- type CustomResourceDefinitionTool
- type CustomResourceDefinitionVersion
- type DashboardClientFactory
- type DashboardClientFunction
- type DeploymentConfigurationEditor
- type EntriesFunc
- type Filter
- type Generator
- type LinkGenerator
- type NamespaceUpdateFunc
- type NavigationEntries
- type NavigationFactory
- type NoPodMetricsErr
- type ObjectPath
- func (op *ObjectPath) AddCRD(ctx context.Context, crd *unstructured.Unstructured) error
- func (op *ObjectPath) GroupVersionKindPath(namespace, apiVersion, kind, name string) (string, error)
- func (op *ObjectPath) GvkFromPath(contentPath, namespace string) (schema.GroupVersionKind, error)
- func (op *ObjectPath) RemoveCRD(ctx context.Context, crd *unstructured.Unstructured) error
- func (op *ObjectPath) ResetCRDs(ctx context.Context) error
- func (op *ObjectPath) SupportedGroupVersionKind() []schema.GroupVersionKind
- type ObjectPathConfig
- type ObjectUpdaterDispatcher
- type ObjectUpdaterDispatcherOption
- type PathLookupFunc
- type PodMetricsCRUD
- type PodMetricsLoader
- type PodWithMetric
- type PortForward
- type PortForwardDelete
- type ReversePathLookupFunc
- type ServiceConfigurationEditor
- type State
- type Storage
- type Uncordon
- type UpdateCancelFunc
- type Workload
- func (w *Workload) AddPodStatus(status component.NodeStatus, object *unstructured.Unstructured, ...)
- func (w *Workload) DonutChart(size component.DonutChartSize) (*component.DonutChart, error)
- func (w *Workload) PodMetricsEnabled() bool
- func (w *Workload) Pods() *unstructured.UnstructuredList
- func (w *Workload) PodsWithMetrics() []PodWithMetric
- func (w *Workload) SetPodMetricsDisabled()
- type WorkloadCardCollector
- type WorkloadLoaderInterface
- type WorkloadSummary
Constants ¶
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" ActionOverviewSuspendCronjob = "action.octant.dev/suspendCronJob" ActionOverviewResumeCronjob = "action.octant.dev/resumeCronJob" ActionOverviewServiceEditor = "action.octant.dev/serviceEditor" ActionDeploymentConfiguration = "action.octant.dev/deploymentConfiguration" ActionUpdateObject = "action.octant.dev/update" ActionApplyYaml = "action.octant.dev/apply" )
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 ¶
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 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
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 ApplyYaml ¶ added in v0.14.0
type ApplyYaml struct {
// contains filtered or unexported fields
}
ApplyYaml creates a yaml applier
func NewApplyYaml ¶ added in v0.14.0
NewApplyYaml creates an instance of ApplyYaml
func (*ApplyYaml) ActionName ¶ added in v0.14.0
ActionName returns the name of this action
type CRDPathGenFunc ¶
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(ctx context.Context, 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(ctx context.Context) (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, link.Interface) (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.
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.
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
ActionName returns the name of this action
type CronJobResume ¶ added in v0.14.0
type CronJobResume struct {
// contains filtered or unexported fields
}
CronJobResume resumes a cronjob
func NewCronJobResume ¶ added in v0.14.0
func NewCronJobResume(objectStore store.Store, clusterClient cluster.ClientInterface) *CronJobResume
func (*CronJobResume) ActionName ¶ added in v0.14.0
func (c *CronJobResume) ActionName() string
ActionName returns the action name
type CronJobSuspend ¶ added in v0.14.0
type CronJobSuspend struct {
// contains filtered or unexported fields
}
CronJobSuspend pauses a cronjob
func NewCronJobSuspend ¶ added in v0.14.0
func NewCronJobSuspend(objectStore store.Store, clusterClient cluster.ClientInterface) *CronJobSuspend
func (*CronJobSuspend) ActionName ¶ added in v0.14.0
func (c *CronJobSuspend) ActionName() string
ActionName returns the action name
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 CustomResourceDefinitionPrinterColumn ¶ added in v0.10.0
type CustomResourceDefinitionTool ¶ added in v0.17.0
type CustomResourceDefinitionTool struct {
// contains filtered or unexported fields
}
CustomResourceDefinitionTool is a tool for extracting information from a CRD.
func NewCustomResourceDefinitionTool ¶ added in v0.17.0
func NewCustomResourceDefinitionTool(object *unstructured.Unstructured) (*CustomResourceDefinitionTool, error)
NewCustomResourceDefinitionTool creates an instance of CustomResourceDefinitionTool.
func (*CustomResourceDefinitionTool) GroupKind ¶ added in v0.17.0
func (crd *CustomResourceDefinitionTool) GroupKind() (schema.GroupKind, error)
GroupKind returns a group/kind for the CRD.
func (*CustomResourceDefinitionTool) Version ¶ added in v0.17.0
func (crd *CustomResourceDefinitionTool) Version(version string) (CustomResourceDefinitionVersion, error)
Version returns a version descriptor for a specified version.
func (*CustomResourceDefinitionTool) Versions ¶ added in v0.17.0
func (crd *CustomResourceDefinitionTool) Versions() ([]string, error)
Versions returns the defined versions in a CRD.
type CustomResourceDefinitionVersion ¶ added in v0.10.0
type CustomResourceDefinitionVersion struct { Version string PrinterColumns []CustomResourceDefinitionPrinterColumn }
type DashboardClientFactory ¶ added in v0.15.0
type DashboardClientFactory interface { // Create creates a dashboard clients in a goja value. Create(ctx context.Context, vm *goja.Runtime) goja.Value }
DashboardClientFactory is an interface for a factory that creates dashboard clients.
type DashboardClientFunction ¶ added in v0.15.0
type DashboardClientFunction interface { // Name returns the name of the function. Name() string // Call generates a function that executes the function. Call(ctx context.Context, vm *goja.Runtime) func(c goja.FunctionCall) goja.Value }
DashboardClientFunction is a function in the the dashboard client.
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.
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 Filter ¶
Filter is used to filter queries for objects. Typically, the filter is an object's label.
func (*Filter) ToQueryParam ¶
ToQueryParam converts the filter to a query parameter.
type Generator ¶
type Generator interface { // Event generates events using the returned channel. Events(ctx context.Context) ([]event.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 LinkGenerator ¶ added in v0.15.0
type LinkGenerator interface { // ObjectPath returns the path of a reference. ObjectPath(namespace, apiVersion, kind, name string) (string, error) }
LinkGenerator is an interface containing object path items.
type NamespaceUpdateFunc ¶
type NamespaceUpdateFunc func(namespace string)
NamespaceUpdateFunc is a function that is called when namespace is updated.
type NavigationEntries ¶
type NavigationEntries struct {}
NavigationEntries help construct navigation entries.
type NavigationFactory ¶
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 (*NavigationFactory) Generate ¶
func (nf *NavigationFactory) Generate(ctx context.Context, module string, wantsClusterScoped bool) ([]navigation.Navigation, error)
Generate returns navigation entries.
func (*NavigationFactory) Root ¶
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) GvkFromPath ¶ added in v0.17.0
func (op *ObjectPath) GvkFromPath(contentPath, namespace string) (schema.GroupVersionKind, error)
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 ReversePathLookupFunc ReversePathLookupFunc }
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.
type ObjectUpdaterDispatcherOption ¶ added in v0.13.0
type ObjectUpdaterDispatcherOption func(dispatcher *ObjectUpdaterDispatcher)
type PathLookupFunc ¶
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(ctx context.Context, 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(ctx context.Context, namespace, name string) (object *unstructured.Unstructured, isFound bool, err error) // SupportsMetrics returns true if the cluster has metrics support. SupportsMetrics(ctx context.Context) (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
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
type ReversePathLookupFunc ¶ added in v0.17.0
type ReversePathLookupFunc func(path, namespace string) (schema.GroupVersionKind, error)
ReversePathLookupFunc looks up paths for an object.
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.
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) // ClientID returns the websocket client ID. GetClientID() string }
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
ActionName returns the name of this action
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
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 (*Workload) Pods ¶ added in v0.10.0
func (w *Workload) Pods() *unstructured.UnstructuredList
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.
type WorkloadLoaderInterface ¶ added in v0.10.0
type WorkloadLoaderInterface interface { // Load loads workloads from a namespace. Load(ctx context.Context, namespace string, link link.Interface) ([]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)
Source Files ¶
- actions.go
- apply_yaml.go
- client_request.go
- container_editor.go
- cordon.go
- cronjob.go
- customresource.go
- deployment_configuration_editor.go
- drain.go
- factory.go
- filter.go
- generator.go
- javascript.go
- link_generator.go
- object.go
- object_path.go
- object_updater.go
- pod_metrics_loader.go
- port_forward.go
- service_configuration_editor.go
- state.go
- storage.go
- workload.go