Documentation ¶
Index ¶
- type API
- type Client
- func (c *Client) CancelPortForward(ctx context.Context, id string)
- func (c *Client) Close() error
- func (c *Client) ForceFrontendUpdate(ctx context.Context) error
- func (c *Client) Get(ctx context.Context, key store.Key) (*unstructured.Unstructured, error)
- func (c *Client) List(ctx context.Context, key store.Key) (*unstructured.UnstructuredList, error)
- func (c *Client) PortForward(ctx context.Context, req PortForwardRequest) (PortForwardResponse, error)
- func (c *Client) Update(ctx context.Context, object *unstructured.Unstructured) error
- type ClientOption
- type DashboardConnection
- type FrontendProxy
- type FrontendUpdateController
- type GRPCService
- func (s *GRPCService) CancelPortForward(ctx context.Context, id string)
- func (s *GRPCService) ForceFrontendUpdate(ctx context.Context) error
- func (s *GRPCService) Get(ctx context.Context, key store.Key) (*unstructured.Unstructured, error)
- func (s *GRPCService) List(ctx context.Context, key store.Key) (*unstructured.UnstructuredList, error)
- func (s *GRPCService) PortForward(ctx context.Context, req PortForwardRequest) (PortForwardResponse, error)
- func (s *GRPCService) Update(ctx context.Context, object *unstructured.Unstructured) error
- type PortForwardRequest
- type PortForwardResponse
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface { // Addr is the address of the API service. Addr() string // Start starts the API. To stop the API, cancel the context. Start(context.Context) error }
API controlls the dashboard API service.
type Client ¶
type Client struct {
DashboardConnection DashboardConnection
}
Client is a dashboard service API client.
func NewClient ¶
func NewClient(address string, options ...ClientOption) (*Client, error)
NewClient creates an instance of the API client. It requires the address of the API.
func (*Client) CancelPortForward ¶
CancelPortForward cancels a port forward.
func (*Client) ForceFrontendUpdate ¶
ForceFrontendUpdate forces the frontend to update itself.
func (*Client) Get ¶
func (c *Client) Get(ctx context.Context, key store.Key) (*unstructured.Unstructured, error)
Get retrieves an object from the dashboard's objectStore.
func (*Client) List ¶
func (c *Client) List(ctx context.Context, key store.Key) (*unstructured.UnstructuredList, error)
List lists objects in the dashboard's object store.
func (*Client) PortForward ¶
func (c *Client) PortForward(ctx context.Context, req PortForwardRequest) (PortForwardResponse, error)
PortForward creates a port forward.
func (*Client) Update ¶
func (c *Client) Update(ctx context.Context, object *unstructured.Unstructured) error
Update updates an object in the store.
type ClientOption ¶
type ClientOption func(c *Client)
type DashboardConnection ¶
type DashboardConnection interface { Close() error Client() proto.DashboardClient }
type FrontendProxy ¶
type FrontendProxy struct {
FrontendUpdateController FrontendUpdateController
}
FrontendProxy is a proxy for messaging the frontend.
func (*FrontendProxy) ForceFrontendUpdate ¶
func (proxy *FrontendProxy) ForceFrontendUpdate() error
ForceFrontendUpdate forces the frontend to update
type FrontendUpdateController ¶
type FrontendUpdateController interface {
ForceUpdate() error
}
FrontendUpdateController can control the frontend. ie. the web gui
type GRPCService ¶
type GRPCService struct { ObjectStore store.Store PortForwarder portforward.PortForwarder FrontendProxy FrontendProxy }
GRPCService is an implementation of the dashboard service based on GRPC.
func (*GRPCService) CancelPortForward ¶
func (s *GRPCService) CancelPortForward(ctx context.Context, id string)
CancelPortForward cancels a port forward
func (*GRPCService) ForceFrontendUpdate ¶
func (s *GRPCService) ForceFrontendUpdate(ctx context.Context) error
func (*GRPCService) Get ¶
func (s *GRPCService) Get(ctx context.Context, key store.Key) (*unstructured.Unstructured, error)
Get retrieves an object.
func (*GRPCService) List ¶
func (s *GRPCService) List(ctx context.Context, key store.Key) (*unstructured.UnstructuredList, error)
List lists objects.
func (*GRPCService) PortForward ¶
func (s *GRPCService) PortForward(ctx context.Context, req PortForwardRequest) (PortForwardResponse, error)
PortForward creates a port forward.
func (*GRPCService) Update ¶
func (s *GRPCService) Update(ctx context.Context, object *unstructured.Unstructured) error
type PortForwardRequest ¶
PortForwardRequest describes a port forward request.
type PortForwardResponse ¶
PortForwardResponse is the response from a port forward request.
type Service ¶
type Service interface { List(ctx context.Context, key store.Key) (*unstructured.UnstructuredList, error) Get(ctx context.Context, key store.Key) (*unstructured.Unstructured, error) PortForward(ctx context.Context, req PortForwardRequest) (PortForwardResponse, error) CancelPortForward(ctx context.Context, id string) Update(ctx context.Context, object *unstructured.Unstructured) error ForceFrontendUpdate(ctx context.Context) error }
Service is the dashboard service.