Documentation
¶
Overview ¶
Package platform is the controller's client for the platform internal API (/internal/v1/*). It authenticates with the controller's own ServiceAccount token, re-read from the in-cluster token file on every request because the kubelet rotates it.
Index ¶
- Constants
- func IsNotFound(err error) bool
- type API
- type Client
- func (c *Client) DeleteOrganization(ctx context.Context, orgID, retention string) error
- func (c *Client) Fence(ctx context.Context, seatID string, gen int64) error
- func (c *Client) GetProbe(ctx context.Context, seatID, probeID string) (*runtimeapi.ProbeResponse, error)
- func (c *Client) Runtime(ctx context.Context, orgID string) (*runtimeapi.RuntimeResponse, error)
- func (c *Client) StartProbe(ctx context.Context, seatID string) (*runtimeapi.ProbeResponse, error)
- func (c *Client) Sync(ctx context.Context, req runtimeapi.SyncRequest) (*runtimeapi.SyncResponse, error)
- func (c *Client) TaskRunAction(ctx context.Context, seatID, id, action string) error
- func (c *Client) TaskRuns(ctx context.Context, seatID string) ([]runtimeapi.TaskRun, error)
- func (c *Client) Verify(ctx context.Context, orgID string) (*runtimeapi.VerifyResponse, error)
- type Error
- type TaskRunsAPI
Constants ¶
View Source
const DefaultTokenFile = "/var/run/secrets/kubernetes.io/serviceaccount/token"
DefaultTokenFile is the in-cluster ServiceAccount token.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶
type API interface {
Sync(ctx context.Context, req runtimeapi.SyncRequest) (*runtimeapi.SyncResponse, error)
Runtime(ctx context.Context, orgID string) (*runtimeapi.RuntimeResponse, error)
Verify(ctx context.Context, orgID string) (*runtimeapi.VerifyResponse, error)
Fence(ctx context.Context, seatID string, expectedGeneration int64) error
StartProbe(ctx context.Context, seatID string) (*runtimeapi.ProbeResponse, error)
GetProbe(ctx context.Context, seatID, probeID string) (*runtimeapi.ProbeResponse, error)
// DeleteOrganization revokes the organisation's capabilities and retires
// its seats. With retention "retain" durable rows are kept (A19).
DeleteOrganization(ctx context.Context, orgID, retention string) error
}
API is the subset of the internal API the controller uses.
type Client ¶
Client implements API over HTTP.
func (*Client) DeleteOrganization ¶
func (*Client) GetProbe ¶
func (c *Client) GetProbe(ctx context.Context, seatID, probeID string) (*runtimeapi.ProbeResponse, error)
func (*Client) Runtime ¶
func (c *Client) Runtime(ctx context.Context, orgID string) (*runtimeapi.RuntimeResponse, error)
func (*Client) StartProbe ¶
func (c *Client) StartProbe(ctx context.Context, seatID string) (*runtimeapi.ProbeResponse, error)
func (*Client) Sync ¶
func (c *Client) Sync(ctx context.Context, req runtimeapi.SyncRequest) (*runtimeapi.SyncResponse, error)
func (*Client) TaskRunAction ¶ added in v0.6.0
func (*Client) Verify ¶
func (c *Client) Verify(ctx context.Context, orgID string) (*runtimeapi.VerifyResponse, error)
Click to show internal directories.
Click to hide internal directories.