Documentation
¶
Index ¶
- type Dashboard
- type Handler
- func (p *Handler) Content(contentPath string) (component.ContentResponse, error)
- func (p *Handler) HandleAction(payload action.Payload) error
- func (p *Handler) Navigation() (navigation.Navigation, error)
- func (p *Handler) ObjectStatus(object runtime.Object) (plugin.ObjectStatusResponse, error)
- func (p *Handler) Print(object runtime.Object) (plugin.PrintResponse, error)
- func (p *Handler) PrintTab(object runtime.Object) (*component.Tab, error)
- func (p *Handler) Register(dashboardAPIAddress string) (plugin.Metadata, error)
- func (p *Handler) Validate() error
- type HandlerFuncs
- type Plugin
- type PluginOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dashboard ¶
type Dashboard interface {
Close() error
List(ctx context.Context, key store.Key) ([]*unstructured.Unstructured, error)
Get(ctx context.Context, key store.Key) (*unstructured.Unstructured, error)
Update(ctx context.Context, object *unstructured.Unstructured) error
PortForward(ctx context.Context, req api.PortForwardRequest) (api.PortForwardResponse, error)
CancelPortForward(ctx context.Context, id string)
ForceFrontendUpdate(ctx context.Context) error
}
Dashboard is the client a plugin can use to interact with Octant.
func NewDashboardClient ¶
NewDashboardClient creates a dashboard client.
type Handler ¶
type Handler struct {
HandlerFuncs
// contains filtered or unexported fields
}
Handler is the plugin service helper handler. Functions on this struct are called from Octant.
func (*Handler) Content ¶
func (p *Handler) Content(contentPath string) (component.ContentResponse, error)
Content creates content for a given content path.
func (*Handler) HandleAction ¶
HandleAction handles actions given a payload.
func (*Handler) Navigation ¶
func (p *Handler) Navigation() (navigation.Navigation, error)
Navigation creates navigation.
func (*Handler) ObjectStatus ¶
ObjectStatus creates status for an object.
type HandlerFuncs ¶
type HandlerFuncs struct {
Print func(dashboardClient Dashboard, object runtime.Object) (plugin.PrintResponse, error)
PrintTab func(dashboardClient Dashboard, object runtime.Object) (*component.Tab, error)
ObjectStatus func(dashboardClient Dashboard, object runtime.Object) (plugin.ObjectStatusResponse, error)
HandleAction func(dashboardClient Dashboard, payload action.Payload) error
Content func(dashboardClient Dashboard, contentPath string) (component.ContentResponse, error)
}
HandlerFuncs are functions for configuring a plugin.
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin is a plugin service helper.
func Register ¶
func Register(name, description string, capabilities *plugin.Capabilities, handlers HandlerFuncs, options ...PluginOption) (*Plugin, error)
Register registers a plugin with Octant.
type PluginOption ¶
type PluginOption func(p *Plugin)
PluginOption is an option for configuring Plugin.
Click to show internal directories.
Click to hide internal directories.