Documentation ¶
Index ¶
- func Create(ctx context.Context, dashConfig config.Dash, q queryer.Queryer, ...) (*component.ResourceViewer, error)
- func GenerateComponent(ctx context.Context, details Details, selected types.UID) (*component.ResourceViewer, error)
- type Details
- type EdgeEntry
- type Handler
- func (h *Handler) AddEdge(ctx context.Context, from, to *unstructured.Unstructured, level int) error
- func (h *Handler) AdjacencyList() (*component.AdjList, error)
- func (h *Handler) FinalizeEdge(ctx context.Context, from, to *unstructured.Unstructured) error
- func (h *Handler) Nodes(ctx context.Context) (component.Nodes, error)
- func (h *Handler) Process(ctx context.Context, object *unstructured.Unstructured) error
- func (h *Handler) SetLevel(objectKind string, level int) int
- type HandlerObjectStatus
- type HandlerOption
- type ObjectStatus
- type ResourceViewer
- type ViewerOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶ added in v0.10.0
func Create(ctx context.Context, dashConfig config.Dash, q queryer.Queryer, objects ...*unstructured.Unstructured) (*component.ResourceViewer, error)
Create creates a resource viewer given a list objects.
func GenerateComponent ¶
func GenerateComponent(ctx context.Context, details Details, selected types.UID) (*component.ResourceViewer, error)
GenerateComponent generates a resource viewer component given details.
Types ¶
type Details ¶
type Details interface { AdjacencyList() (*component.AdjList, error) Nodes(ctx context.Context) (component.Nodes, error) }
Details generates details for resource viewer.
type EdgeEntry ¶ added in v0.20.0
type EdgeEntry struct {
// contains filtered or unexported fields
}
EdgeEntry contains Edge info stored in edgeCache
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is a visitor handler.
func NewHandler ¶
func NewHandler(dashConfig config.Dash, options ...HandlerOption) (*Handler, error)
NewHandler creates an instance of Handler.
func (*Handler) AddEdge ¶
func (h *Handler) AddEdge(ctx context.Context, from, to *unstructured.Unstructured, level int) error
AddEdge adds edge to the cache
func (*Handler) FinalizeEdge ¶ added in v0.20.0
func (h *Handler) FinalizeEdge(ctx context.Context, from, to *unstructured.Unstructured) error
FinalizeEdge is finalizing the edge creation process by applying edge from cache
func (*Handler) Process ¶
func (h *Handler) Process(ctx context.Context, object *unstructured.Unstructured) error
Process adds nodes to the dependency graph.
type HandlerObjectStatus ¶
type HandlerObjectStatus struct {
// contains filtered or unexported fields
}
func NewHandlerObjectStatus ¶
func NewHandlerObjectStatus(objectStore store.Store, pluginManager plugin.ManagerInterface) *HandlerObjectStatus
func (*HandlerObjectStatus) Status ¶
func (h *HandlerObjectStatus) Status(ctx context.Context, object runtime.Object) (*objectstatus.ObjectStatus, error)
type HandlerOption ¶
type HandlerOption func(h *Handler)
HandlerOption is an option for configuring Handler.
func SetHandlerObjectStatus ¶
func SetHandlerObjectStatus(objectStatus ObjectStatus) HandlerOption
SetHandlerObjectStatus configures handler to use a custom object status generator.
type ObjectStatus ¶
type ObjectStatus interface {
Status(ctx context.Context, object runtime.Object) (*objectstatus.ObjectStatus, error)
}
type ResourceViewer ¶
type ResourceViewer struct {
// contains filtered or unexported fields
}
ResourceViewer visits an object and creates a view component.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.