Documentation ¶
Index ¶
- Variables
- func AddHandlers(p Handler) error
- func BreakdownRule(rule rbacv1.PolicyRule) []rbacv1.PolicyRule
- func ClusterRoleBindingHandler(ctx context.Context, roleBinding *rbacv1.ClusterRoleBinding, options Options) (component.Component, error)
- func ClusterRoleBindingListHandler(_ context.Context, clusterRoleBindingList *rbacv1.ClusterRoleBindingList, ...) (component.Component, error)
- func ClusterRoleHandler(ctx context.Context, clusterRole *rbacv1.ClusterRole, options Options) (component.Component, error)
- func ClusterRoleListHandler(_ context.Context, list *rbacv1.ClusterRoleList, options Options) (component.Component, error)
- func CombineResourceGroup(resource, group []string) string
- func ConfigMapHandler(ctx context.Context, cm *corev1.ConfigMap, options Options) (component.Component, error)
- func ConfigMapListHandler(_ context.Context, list *corev1.ConfigMapList, opts Options) (component.Component, error)
- func CronJobHandler(ctx context.Context, c *batchv1beta1.CronJob, opts Options) (component.Component, error)
- func CronJobListHandler(ctx context.Context, list *batchv1beta1.CronJobList, opts Options) (component.Component, error)
- func CustomResourceHandler(ctx context.Context, crd *apiextv1beta1.CustomResourceDefinition, ...) (component.Component, error)
- func CustomResourceListHandler(crdName string, crd *apiextv1beta1.CustomResourceDefinition, ...) (component.Component, error)
- func DaemonSetHandler(ctx context.Context, daemonSet *appsv1.DaemonSet, options Options) (component.Component, error)
- func DaemonSetListHandler(_ context.Context, list *appsv1.DaemonSetList, opts Options) (component.Component, error)
- func DefaultPrintFunc(_ context.Context, object runtime.Object, _ Options) (component.Component, error)
- func DeploymentHandler(ctx context.Context, deployment *appsv1.Deployment, options Options) (component.Component, error)
- func DeploymentListHandler(_ context.Context, list *appsv1.DeploymentList, opts Options) (component.Component, error)
- func EventHandler(ctx context.Context, event *corev1.Event, opts Options) (component.Component, error)
- func EventListHandler(ctx context.Context, list *corev1.EventList, opts Options) (component.Component, error)
- func IngressHandler(ctx context.Context, ingress *extv1beta1.Ingress, options Options) (component.Component, error)
- func IngressListHandler(_ context.Context, list *extv1beta1.IngressList, options Options) (component.Component, error)
- func JobHandler(ctx context.Context, job *batchv1.Job, opts Options) (component.Component, error)
- func JobListHandler(_ context.Context, list *batchv1.JobList, opts Options) (component.Component, error)
- func NodeHandler(ctx context.Context, node *corev1.Node, options Options) (component.Component, error)
- func NodeListHandler(ctx context.Context, list *corev1.NodeList, options Options) (component.Component, error)
- func ObjectReferencePath(or corev1.ObjectReference) (string, error)
- func PersistentVolumeClaimHandler(ctx context.Context, persistentVolumeClaim *corev1.PersistentVolumeClaim, ...) (component.Component, error)
- func PersistentVolumeClaimListHandler(ctx context.Context, list *corev1.PersistentVolumeClaimList, options Options) (component.Component, error)
- func PodHandler(ctx context.Context, pod *corev1.Pod, opts Options) (component.Component, error)
- func PodListHandler(_ context.Context, list *corev1.PodList, opts Options) (component.Component, error)
- func PrintEvents(list *corev1.EventList, opts Options) (component.Component, error)
- func ReplicaSetHandler(ctx context.Context, rs *appsv1.ReplicaSet, options Options) (component.Component, error)
- func ReplicaSetListHandler(ctx context.Context, list *appsv1.ReplicaSetList, opts Options) (component.Component, error)
- func ReplicationControllerHandler(ctx context.Context, rc *corev1.ReplicationController, options Options) (component.Component, error)
- func ReplicationControllerListHandler(ctx context.Context, list *corev1.ReplicationControllerList, options Options) (component.Component, error)
- func RoleBindingHandler(ctx context.Context, roleBinding *rbacv1.RoleBinding, opts Options) (component.Component, error)
- func RoleBindingListHandler(ctx context.Context, roleBindingList *rbacv1.RoleBindingList, opts Options) (component.Component, error)
- func RoleHandler(ctx context.Context, role *rbacv1.Role, opts Options) (component.Component, error)
- func RoleListHandler(_ context.Context, roleList *rbacv1.RoleList, options Options) (component.Component, error)
- func SecretHandler(ctx context.Context, secret *corev1.Secret, options Options) (component.Component, error)
- func SecretListHandler(ctx context.Context, list *corev1.SecretList, options Options) (component.Component, error)
- func ServiceAccountHandler(ctx context.Context, serviceAccount *corev1.ServiceAccount, options Options) (component.Component, error)
- func ServiceAccountListHandler(_ context.Context, list *corev1.ServiceAccountList, options Options) (component.Component, error)
- func ServiceHandler(ctx context.Context, service *corev1.Service, options Options) (component.Component, error)
- func ServiceListHandler(_ context.Context, list *corev1.ServiceList, options Options) (component.Component, error)
- func StatefulSetHandler(ctx context.Context, statefulSet *appsv1.StatefulSet, options Options) (component.Component, error)
- func StatefulSetListHandler(_ context.Context, list *appsv1.StatefulSetList, options Options) (component.Component, error)
- func ValidatePrintHandlerFunc(printFunc reflect.Value) error
- type ConfigMapConfiguration
- type ContainerConfiguration
- type CronJobConfiguration
- type DeploymentConfiguration
- type Handler
- type ItemDescriptor
- type JobTemplate
- type JobTemplateHeader
- type Metadata
- type Object
- func (o *Object) EnableEvents()
- func (o *Object) EnableJobTemplate(templateSpec batchv1beta1.JobTemplateSpec)
- func (o *Object) EnablePodTemplate(templateSpec corev1.PodTemplateSpec)
- func (o *Object) RegisterConfig(summary *component.Summary)
- func (o *Object) RegisterItems(items ...ItemDescriptor)
- func (o *Object) RegisterSummary(summary *component.Summary)
- func (o *Object) ToComponent(ctx context.Context, options Options) (component.Component, error)
- type ObjectOpts
- type ObjectPrinterFunc
- type ObjectPrinterLayoutFunc
- type Options
- type PodConfiguration
- type PodTemplate
- type PodTemplateHeader
- type Printer
- type ReplicaSetConfiguration
- type ReplicaSetStatus
- type ReplicationControllerConfiguration
- type ReplicationControllerStatus
- type Resource
- type StatefulSetConfiguration
- type StatefulSetStatus
Constants ¶
This section is empty.
Variables ¶
var (
JobCols = component.NewTableCols("Name", "Labels", "Completions", "Successful", "Age")
)
Functions ¶
func BreakdownRule ¶
func BreakdownRule(rule rbacv1.PolicyRule) []rbacv1.PolicyRule
BreakdownRule takes a rule and builds an equivalent list of rules that each have at most one verb, one resource, and one resource name
func ClusterRoleHandler ¶
func ClusterRoleHandler(ctx context.Context, clusterRole *rbacv1.ClusterRole, options Options) (component.Component, error)
ClusterRoleHandler is a printFunc that prints a cluster role
func ClusterRoleListHandler ¶
func ClusterRoleListHandler(_ context.Context, list *rbacv1.ClusterRoleList, options Options) (component.Component, error)
ClusterRoleListHandler is a printFunc that prints cluster roles
func CombineResourceGroup ¶
func ConfigMapHandler ¶
func ConfigMapHandler(ctx context.Context, cm *corev1.ConfigMap, options Options) (component.Component, error)
ConfigMapHandler is a printFunc that prints a ConfigMap
func ConfigMapListHandler ¶
func ConfigMapListHandler(_ context.Context, list *corev1.ConfigMapList, opts Options) (component.Component, error)
ConfigMapListHandler is a printFunc that prints ConfigMaps
func CronJobHandler ¶
func CronJobHandler(ctx context.Context, c *batchv1beta1.CronJob, opts Options) (component.Component, error)
CronJobHandler is a printFunc that prints a CronJob
func CronJobListHandler ¶
func CronJobListHandler(ctx context.Context, list *batchv1beta1.CronJobList, opts Options) (component.Component, error)
CronJobListHandler is a printFunc that lists cronjobs
func CustomResourceHandler ¶
func CustomResourceHandler( ctx context.Context, crd *apiextv1beta1.CustomResourceDefinition, object *unstructured.Unstructured, options Options) (component.Component, error)
CustomResourceHandler prints custom resource objects. If the object has columns specified, it will print those columns as well.
func CustomResourceListHandler ¶
func CustomResourceListHandler( crdName string, crd *apiextv1beta1.CustomResourceDefinition, list *unstructured.UnstructuredList, linkGenerator link.Interface) (component.Component, error)
CustomResourceListHandler prints a list of custom resources with optional custom columns.
func DaemonSetHandler ¶
func DaemonSetHandler(ctx context.Context, daemonSet *appsv1.DaemonSet, options Options) (component.Component, error)
DaemonSetHandler is a printFunc that prints a daemon set
func DaemonSetListHandler ¶
func DaemonSetListHandler(_ context.Context, list *appsv1.DaemonSetList, opts Options) (component.Component, error)
DaemonSetListHandler is a printFunc that lists daemon sets
func DefaultPrintFunc ¶
func DefaultPrintFunc(_ context.Context, object runtime.Object, _ Options) (component.Component, error)
DefaultPrintFunc is a default object printer. It prints Kubernetes resource lists with three columns: name, labels, age. Returns nil if the object should not be printed.
func DeploymentHandler ¶
func DeploymentHandler(ctx context.Context, deployment *appsv1.Deployment, options Options) (component.Component, error)
DeploymentHandler is a printFunc that prints a Deployments.
func DeploymentListHandler ¶
func DeploymentListHandler(_ context.Context, list *appsv1.DeploymentList, opts Options) (component.Component, error)
DeploymentListHandler is a printFunc that lists deployments
func EventHandler ¶
func EventListHandler ¶
func EventListHandler(ctx context.Context, list *corev1.EventList, opts Options) (component.Component, error)
EventListHandler is a printFunc that lists events.
func IngressHandler ¶
func IngressListHandler ¶
func IngressListHandler(_ context.Context, list *extv1beta1.IngressList, options Options) (component.Component, error)
func JobHandler ¶
JobHandler printers a job.
func JobListHandler ¶
func JobListHandler(_ context.Context, list *batchv1.JobList, opts Options) (component.Component, error)
JobListHandler prints a job list.
func NodeHandler ¶ added in v0.5.0
func NodeListHandler ¶ added in v0.5.0
func ObjectReferencePath ¶
func ObjectReferencePath(or corev1.ObjectReference) (string, error)
ObjectReferencePath returns the overview path for an object reference. Currently, this does not support custom resources.
func PersistentVolumeClaimHandler ¶
func PersistentVolumeClaimHandler(ctx context.Context, persistentVolumeClaim *corev1.PersistentVolumeClaim, options Options) (component.Component, error)
PersistentVolumeClaimHandler is a printFunc that prints a PersistentVolumeClaim
func PersistentVolumeClaimListHandler ¶
func PersistentVolumeClaimListHandler(ctx context.Context, list *corev1.PersistentVolumeClaimList, options Options) (component.Component, error)
PersistentVolumeClaimListHandler is a printFunc that prints persistentvolumeclaims
func PodHandler ¶
PodHandler is a printFunc that prints Pods
func PodListHandler ¶
func PodListHandler(_ context.Context, list *corev1.PodList, opts Options) (component.Component, error)
PodListHandler is a printFunc that prints pods
func PrintEvents ¶
PrintEvents collects events for a resource
func ReplicaSetHandler ¶
func ReplicaSetHandler(ctx context.Context, rs *appsv1.ReplicaSet, options Options) (component.Component, error)
ReplicaSetHandler is a printFunc that prints a ReplicaSets.
func ReplicaSetListHandler ¶
func ReplicaSetListHandler(ctx context.Context, list *appsv1.ReplicaSetList, opts Options) (component.Component, error)
ReplicaSetListHandler is a printFunc that lists deployments
func ReplicationControllerHandler ¶
func ReplicationControllerHandler(ctx context.Context, rc *corev1.ReplicationController, options Options) (component.Component, error)
ReplicationControllerHandler is a printFunc that prints a ReplicationController
func ReplicationControllerListHandler ¶
func ReplicationControllerListHandler(ctx context.Context, list *corev1.ReplicationControllerList, options Options) (component.Component, error)
ReplicationControllerListHandler is a printFunc that lists ReplicationControllers
func RoleBindingHandler ¶
func RoleBindingListHandler ¶
func RoleHandler ¶
func RoleListHandler ¶
func SecretHandler ¶
func SecretHandler(ctx context.Context, secret *corev1.Secret, options Options) (component.Component, error)
SecretHandler is a printFunc for printing a secret summary.
func SecretListHandler ¶
func SecretListHandler(ctx context.Context, list *corev1.SecretList, options Options) (component.Component, error)
SecretListHandler is a printFunc that lists secrets.
func ServiceAccountHandler ¶
func ServiceHandler ¶
func ServiceHandler(ctx context.Context, service *corev1.Service, options Options) (component.Component, error)
ServiceHandler is a printFunc that prints a Services.
func ServiceListHandler ¶
func ServiceListHandler(_ context.Context, list *corev1.ServiceList, options Options) (component.Component, error)
ServiceListHandler is a printFunc that lists services
func StatefulSetHandler ¶
func StatefulSetHandler(ctx context.Context, statefulSet *appsv1.StatefulSet, options Options) (component.Component, error)
StatefulSetHandler is a printFunc that prints a StatefulSet
func StatefulSetListHandler ¶
func StatefulSetListHandler(_ context.Context, list *appsv1.StatefulSetList, options Options) (component.Component, error)
StatefulSetListHandler is a printFunc that list stateful sets
func ValidatePrintHandlerFunc ¶
ValidatePrintHandlerFunc validates print handler signature. printFunc is the function that will be called to print an object. printFunc must be of the following type:
func printFunc(ctx context.Context, object ObjectType, options Options) (component.Component, error)
where:
ObjectType is the type of object that will be printed
Types ¶
type ConfigMapConfiguration ¶
type ConfigMapConfiguration struct {
// contains filtered or unexported fields
}
ConfigMapConfiguration generates config map configuration
func NewConfigMapConfiguration ¶
func NewConfigMapConfiguration(cm *corev1.ConfigMap) *ConfigMapConfiguration
NewConfigMapConfiguration creates an instance of ConfigMapConfiguration
type ContainerConfiguration ¶
type ContainerConfiguration struct {
// contains filtered or unexported fields
}
ContainerConfiguration generates container configuration.
func NewContainerConfiguration ¶
func NewContainerConfiguration(parent runtime.Object, c *corev1.Container, pfs portforward.PortForwarder, isInit bool, options Options) *ContainerConfiguration
NewContainerConfiguration creates an instance of ContainerConfiguration.
type CronJobConfiguration ¶
type CronJobConfiguration struct {
// contains filtered or unexported fields
}
CronJobConfiguration generates cronjob configuration
func NewCronJobConfiguration ¶
func NewCronJobConfiguration(c *batchv1beta1.CronJob) *CronJobConfiguration
NewCronJobConfiguration creates an instance of CronJobConfiguration
type DeploymentConfiguration ¶
type DeploymentConfiguration struct {
// contains filtered or unexported fields
}
DeploymentConfiguration generates deployment configuration.
func NewDeploymentConfiguration ¶
func NewDeploymentConfiguration(d *appsv1.Deployment) *DeploymentConfiguration
NewDeploymentConfiguration creates an instance of DeploymentConfiguration.
type Handler ¶
type Handler interface {
Handler(printFunc interface{}) error
}
Handler configures handlers for a printer.
type ItemDescriptor ¶
type ItemDescriptor struct { Func ObjectPrinterFunc Width int }
ItemDescriptor describes a func to print a view and its width.
type JobTemplate ¶
type JobTemplate struct {
// contains filtered or unexported fields
}
func NewJobTemplate ¶
func NewJobTemplate(parent runtime.Object, jobTemplateSpec batchv1beta1.JobTemplateSpec) *JobTemplate
func (*JobTemplate) AddToFlexLayout ¶
func (jt *JobTemplate) AddToFlexLayout(fl *flexlayout.FlexLayout, options Options) error
type JobTemplateHeader ¶
type JobTemplateHeader struct {
// contains filtered or unexported fields
}
JobTemplateHeader creates a job template header
func NewJobTemplateHeader ¶
func NewJobTemplateHeader(labels map[string]string) *JobTemplateHeader
NewJobTemplateHeader creates an instance of JobTemplateHeader
type Metadata ¶
type Metadata struct {
// contains filtered or unexported fields
}
func (*Metadata) AddToFlexLayout ¶
func (m *Metadata) AddToFlexLayout(fl *flexlayout.FlexLayout) error
type Object ¶
type Object struct { MetadataGen func(runtime.Object, *flexlayout.FlexLayout, Options) error PodTemplateGen func(runtime.Object, corev1.PodTemplateSpec, *flexlayout.FlexLayout, Options) error JobTemplateGen func(runtime.Object, batchv1beta1.JobTemplateSpec, *flexlayout.FlexLayout, Options) error EventsGen func(ctx context.Context, object runtime.Object, fl *flexlayout.FlexLayout, options Options) error // contains filtered or unexported fields }
Object prints an object.
func NewObject ¶
func NewObject(object runtime.Object, options ...ObjectOpts) *Object
NewObject creates an instance of Object.
func (*Object) EnableEvents ¶
func (o *Object) EnableEvents()
EnableEvents enables the event view for the object.
func (*Object) EnableJobTemplate ¶
func (o *Object) EnableJobTemplate(templateSpec batchv1beta1.JobTemplateSpec)
EnableJobTemplate enables the job template view for the object.
func (*Object) EnablePodTemplate ¶
func (o *Object) EnablePodTemplate(templateSpec corev1.PodTemplateSpec)
EnablePodTemplate enables the pod template view for the object.
func (*Object) RegisterConfig ¶
RegisterConfig registers the config view for an object.
func (*Object) RegisterItems ¶
func (o *Object) RegisterItems(items ...ItemDescriptor)
RegisterItems registers one or more items to be printed in a section. Each call to RegisterItems will create a new section.
func (*Object) RegisterSummary ¶
RegisterSummary registers a summary view for an object.
type ObjectPrinterFunc ¶
ObjectPrinterFunc is a func that create a view.
type ObjectPrinterLayoutFunc ¶
type ObjectPrinterLayoutFunc func(*flexlayout.FlexLayout) error
ObjectPrinterLayoutFunc is a func that render a view in a flex layout.
type PodConfiguration ¶
type PodConfiguration struct {
// contains filtered or unexported fields
}
PodConfiguration generates pod configuration.
func NewPodConfiguration ¶
func NewPodConfiguration(p *corev1.Pod) *PodConfiguration
NewPodConfiguration creates an instance of PodConfiguration.
type PodTemplate ¶
type PodTemplate struct {
// contains filtered or unexported fields
}
func NewPodTemplate ¶
func NewPodTemplate(parent runtime.Object, podTemplateSpec corev1.PodTemplateSpec) *PodTemplate
func (*PodTemplate) AddToFlexLayout ¶
func (pt *PodTemplate) AddToFlexLayout(fl *flexlayout.FlexLayout, options Options) error
type PodTemplateHeader ¶
type PodTemplateHeader struct {
// contains filtered or unexported fields
}
PodTemplateHeader creates a pod template header. It consists of a selectors component with title `Pod Template` and the associated match selectors.
func NewPodTemplateHeader ¶
func NewPodTemplateHeader(labels map[string]string) *PodTemplateHeader
NewPodTemplateHeader creates an instance of PodTemplateHeader.
func (*PodTemplateHeader) Create ¶
func (pth *PodTemplateHeader) Create() *component.Labels
Create creates a labels component.
type Printer ¶
type Printer interface { // Print prints a runtime object. Print(ctx context.Context, object runtime.Object, pluginPrinter plugin.ManagerInterface) (component.Component, error) }
Printer is an interface for printing runtime objects.
type ReplicaSetConfiguration ¶
type ReplicaSetConfiguration struct {
// contains filtered or unexported fields
}
ReplicaSetConfiguration generates a replicaset configuration
func NewReplicaSetConfiguration ¶
func NewReplicaSetConfiguration(rs *appsv1.ReplicaSet) *ReplicaSetConfiguration
NewReplicaSetConfiguration creates an instance of ReplicaSetConfiguration
type ReplicaSetStatus ¶
type ReplicaSetStatus struct {
// contains filtered or unexported fields
}
ReplicaSetStatus generates a replicaset status
func NewReplicaSetStatus ¶
func NewReplicaSetStatus(rs *appsv1.ReplicaSet) *ReplicaSetStatus
NewReplicaSetStatus creates an instance of ReplicaSetStatus
type ReplicationControllerConfiguration ¶
type ReplicationControllerConfiguration struct {
// contains filtered or unexported fields
}
ReplicationControllerConfiguration generates a replicationcontroller configuration
func NewReplicationControllerConfiguration ¶
func NewReplicationControllerConfiguration(rc *corev1.ReplicationController) *ReplicationControllerConfiguration
NewReplicationControllerConfiguration creates an instance of ReplicationControllerConfiguration
type ReplicationControllerStatus ¶
type ReplicationControllerStatus struct {
// contains filtered or unexported fields
}
ReplicationControllerStatus generates a replication controller status
func NewReplicationControllerStatus ¶
func NewReplicationControllerStatus(replicationController *corev1.ReplicationController) *ReplicationControllerStatus
NewReplicationControllerStatus creates an instance of ReplicationControllerStatus
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
Resource prints runtime objects.
func NewResource ¶
NewResource creates an instance of ResourcePrinter.
type StatefulSetConfiguration ¶
type StatefulSetConfiguration struct {
// contains filtered or unexported fields
}
StatefulSetConfiguration generates a statefulset configuration
func NewStatefulSetConfiguration ¶
func NewStatefulSetConfiguration(statefulSet *appsv1.StatefulSet) *StatefulSetConfiguration
NewStatefulSetConfiguration creates an instance of StatefulSetConfiguration
type StatefulSetStatus ¶
type StatefulSetStatus struct {
// contains filtered or unexported fields
}
StatefulSetStatus generates a statefulset status
func NewStatefulSetStatus ¶
func NewStatefulSetStatus(statefulSet *appsv1.StatefulSet) *StatefulSetStatus
NewStatefulSetStatus creates an instance of StatefulSetStatus
Source Files ¶
- affinity.go
- clusterrole.go
- clusterrolebinding.go
- configmap.go
- container.go
- cronjob.go
- customresource.go
- daemonset.go
- deployment.go
- event.go
- handler.go
- ingress.go
- job.go
- job_template.go
- label_selector.go
- metadata.go
- node.go
- object.go
- path.go
- persistentvolumeclaim.go
- pod.go
- pod_template.go
- policyrules.go
- printer.go
- replicaset.go
- replicationcontroller.go
- role.go
- rolebinding.go
- secret.go
- selector.go
- service.go
- serviceaccount.go
- statefulset.go
- tolerations.go
- volume.go