Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIService ¶ added in v0.15.0
type APIService struct {
// contains filtered or unexported fields
}
APIService is a typed visitor for apiservices.
func NewAPIService ¶ added in v0.15.0
func NewAPIService(os store.Store) *APIService
NewAPIService creates an instance of APIService.
func (*APIService) Supports ¶ added in v0.15.0
func (p *APIService) Supports() schema.GroupVersionKind
Support returns the gvk this typed visitor supports.
func (*APIService) Visit ¶ added in v0.15.0
func (p *APIService) Visit(ctx context.Context, object *unstructured.Unstructured, handler ObjectHandler, visitor Visitor, visitDescendants bool) error
Visit visits a apiservice. It looks for service accounts and services.
type DefaultTypedVisitor ¶
type DefaultTypedVisitor interface {
Visit(ctx context.Context, object *unstructured.Unstructured, handler ObjectHandler, visitor Visitor, visitDescendants bool) error
}
DefaultTypedVisitor is the default typed visitors.
type DefaultVisitor ¶
type DefaultVisitor struct {
// contains filtered or unexported fields
}
DefaultVisitor is the default implementation of Visitor.
func NewDefaultVisitor ¶
func NewDefaultVisitor(dashConfig config.Dash, q queryer.Queryer, options ...DefaultVisitorOption) (*DefaultVisitor, error)
NewDefaultVisitor creates an instance of DefaultVisitor.
func (*DefaultVisitor) Visit ¶
func (dv *DefaultVisitor) Visit(ctx context.Context, object *unstructured.Unstructured, handler ObjectHandler, visitDescendants bool) error
Visit visits a runtime.Object.
type DefaultVisitorOption ¶
type DefaultVisitorOption func(*DefaultVisitor)
DefaultVisitorOption is an option for configuring DefaultVisitor.
func SetDefaultHandler ¶
func SetDefaultHandler(dtv DefaultTypedVisitor) DefaultVisitorOption
SetDefaultHandler sets the default typed visitor for objects.
func SetTypedVisitors ¶
func SetTypedVisitors(list []TypedVisitor) DefaultVisitorOption
SetTypedVisitors sets additional typed visitor for objects based on gvk.
type HorizontalPodAutoscaler ¶
type HorizontalPodAutoscaler struct {
// contains filtered or unexported fields
}
HorizontalPodAutoscaler is a typed visitor for services.
func NewHorizontalPodAutoscaler ¶
func NewHorizontalPodAutoscaler(q queryer.Queryer) *HorizontalPodAutoscaler
NewHorizontalPodAutoscaler creates an instance of HorizontalPodAutoscaler
func (HorizontalPodAutoscaler) Supports ¶
func (HorizontalPodAutoscaler) Supports() schema.GroupVersionKind
Supports returns the gvk this typed visitor supports.
func (*HorizontalPodAutoscaler) Visit ¶
func (s *HorizontalPodAutoscaler) Visit(ctx context.Context, object *unstructured.Unstructured, handler ObjectHandler, visitor Visitor, visitDescendants bool) error
Visit visits a hpa. It looks for an associated scale target (replication controllers, deployments, and replica sets)
type Ingress ¶
type Ingress struct {
// contains filtered or unexported fields
}
Ingress is a typed visitor for ingress objects.
func (*Ingress) Supports ¶
func (i *Ingress) Supports() schema.GroupVersionKind
Supports returns the gvk this typed visitor supports.
func (*Ingress) Visit ¶
func (i *Ingress) Visit(ctx context.Context, object *unstructured.Unstructured, handler ObjectHandler, visitor Visitor, visitDescendants bool) error
Visit visits an ingress. It looks for associated services.
type MutatingWebhookConfiguration ¶ added in v0.15.0
type MutatingWebhookConfiguration struct {
// contains filtered or unexported fields
}
MutatingWebhookConfiguration is a typed visitor for mutatingwebhookconfigurations.
func NewMutatingWebhookConfiguration ¶ added in v0.15.0
func NewMutatingWebhookConfiguration(os store.Store) *MutatingWebhookConfiguration
NewMutatingWebhookConfiguration creates an instance of MutatingWebhookConfiguration.
func (*MutatingWebhookConfiguration) Supports ¶ added in v0.15.0
func (p *MutatingWebhookConfiguration) Supports() schema.GroupVersionKind
Support returns the gvk this typed visitor supports.
func (*MutatingWebhookConfiguration) Visit ¶ added in v0.15.0
func (p *MutatingWebhookConfiguration) Visit(ctx context.Context, object *unstructured.Unstructured, handler ObjectHandler, visitor Visitor, visitDescendants bool) error
Visit visits a mutatingwebhookconfiguration. It looks for service accounts and services.
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
Object is the default visitor for an object.
func (*Object) Visit ¶
func (o *Object) Visit(ctx context.Context, object *unstructured.Unstructured, handler ObjectHandler, visitor Visitor, visitDescendants bool) error
Visit visits an objects. It looks at immediate ancestors and descendants.
type ObjectHandler ¶
type ObjectHandler interface { AddEdge(ctx context.Context, v1, v2 *unstructured.Unstructured) error Process(ctx context.Context, object *unstructured.Unstructured) error }
ObjectHandler performs actions on an object. Can be used to augment visitor actions with extra functionality.
type Pod ¶
type Pod struct {
// contains filtered or unexported fields
}
Pod is a typed visitor for pods.
func (*Pod) Supports ¶
func (p *Pod) Supports() schema.GroupVersionKind
Support returns the gvk this typed visitor supports.
func (*Pod) Visit ¶
func (p *Pod) Visit(ctx context.Context, object *unstructured.Unstructured, handler ObjectHandler, visitor Visitor, visitDescendants bool) error
Visit visits a pod. It looks for service accounts and services.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a typed visitor for services.
func NewService ¶
NewService creates an instance of Service.
func (Service) Supports ¶
func (Service) Supports() schema.GroupVersionKind
Supports returns the gvk this typed visitor supports.
func (*Service) Visit ¶
func (s *Service) Visit(ctx context.Context, object *unstructured.Unstructured, handler ObjectHandler, visitor Visitor, visitDescendants bool) error
Visit visits a service. It looks for associated pods and ingresses.
type TypedVisitor ¶
type TypedVisitor interface { DefaultTypedVisitor Supports() schema.GroupVersionKind }
TypedVisitor is a typed visitor for a specific gvk.
type ValidatingWebhookConfiguration ¶ added in v0.15.0
type ValidatingWebhookConfiguration struct {
// contains filtered or unexported fields
}
ValidatingWebhookConfiguration is a typed visitor for validatingwebhookconfigurations.
func NewValidatingWebhookConfiguration ¶ added in v0.15.0
func NewValidatingWebhookConfiguration(os store.Store) *ValidatingWebhookConfiguration
NewValidatingWebhookConfiguration creates an instance of ValidatingWebhookConfiguration.
func (*ValidatingWebhookConfiguration) Supports ¶ added in v0.15.0
func (p *ValidatingWebhookConfiguration) Supports() schema.GroupVersionKind
Support returns the gvk this typed visitor supports.
func (*ValidatingWebhookConfiguration) Visit ¶ added in v0.15.0
func (p *ValidatingWebhookConfiguration) Visit(ctx context.Context, object *unstructured.Unstructured, handler ObjectHandler, visitor Visitor, visitDescendants bool) error
Visit visits a validatingwebhookconfiguration. It looks for service accounts and services.
type Visitor ¶
type Visitor interface {
Visit(ctx context.Context, object *unstructured.Unstructured, handler ObjectHandler, visitDescendants bool) error
}
Visitor is a visitor for cluster objects. It will visit an object and all of its ancestors and descendants.