Documentation ¶
Index ¶
- Constants
- func NewDefaultClient(url, key string, level logrus.Level, ...) (*resty.Client, error)
- type AKSInitDataRequest
- type AckClusterActionRequest
- type ActionApproveCSR
- type ActionChartRollback
- type ActionChartUninstall
- type ActionChartUpsert
- type ActionCheckNodeDeleted
- type ActionCheckNodeStatus
- type ActionCheckNodeStatus_Status
- type ActionCreate
- type ActionCreateEvent
- type ActionDelete
- type ActionDeleteNode
- type ActionDisconnectCluster
- type ActionDrainNode
- type ActionPatch
- type ActionPatchNode
- type ActionSendAKSInitData
- type ActionsClient
- type ChartSource
- type Client
- func (c *Client) AckAction(ctx context.Context, actionID string, req *AckClusterActionRequest) error
- func (c *Client) GetActions(ctx context.Context, k8sVersion string) ([]*ClusterAction, error)
- func (c *Client) SendAKSInitData(ctx context.Context, req *AKSInitDataRequest) error
- func (c *Client) SendLog(ctx context.Context, e *logEntry) error
- type ClusterAction
- type GetClusterActionsResponse
- type GroupVersionResource
- type LogEvent
- type LogExporter
- type NodeTaint
- type ObjectID
Constants ¶
View Source
const (
LabelNodeID = "provisioner.cast.ai/node-id"
)
Variables ¶
This section is empty.
Functions ¶
func NewDefaultClient ¶
func NewDefaultClient(url, key string, level logrus.Level, binVersion *config.ClusterControllerVersion, defaultTimeout time.Duration) (*resty.Client, error)
NewDefaultClient configures a default instance of the resty.Client used to do HTTP requests.
Types ¶
type AKSInitDataRequest ¶ added in v0.9.0
type AckClusterActionRequest ¶
type AckClusterActionRequest struct {
Error *string `json:"error"`
}
type ActionApproveCSR ¶ added in v0.5.0
type ActionChartRollback ¶ added in v0.20.0
type ActionChartUninstall ¶ added in v0.11.0
type ActionChartUpsert ¶ added in v0.6.0
type ActionCheckNodeDeleted ¶ added in v0.17.0
type ActionCheckNodeStatus ¶ added in v0.22.0
type ActionCheckNodeStatus struct { NodeName string `json:"nodeName"` NodeID string `json:"nodeId"` NodeStatus ActionCheckNodeStatus_Status `json:"nodeStatus,omitempty"` WaitTimeoutSeconds *int32 `json:"waitTimeoutSeconds,omitempty"` }
type ActionCheckNodeStatus_Status ¶ added in v0.22.0
type ActionCheckNodeStatus_Status string
const ( ActionCheckNodeStatus_READY ActionCheckNodeStatus_Status = "NodeStatus_READY" ActionCheckNodeStatus_DELETED ActionCheckNodeStatus_Status = "NodeStatus_DELETED" )
type ActionCreate ¶ added in v0.39.0
type ActionCreate struct { GroupVersionResource `json:",inline"` Object map[string]interface{} `json:"object,omitempty"` }
type ActionCreateEvent ¶ added in v0.4.0
type ActionDelete ¶ added in v0.39.0
type ActionDelete struct {
ID ObjectID `json:"id"`
}
type ActionDeleteNode ¶
type ActionDisconnectCluster ¶ added in v0.8.0
type ActionDisconnectCluster struct { }
type ActionDrainNode ¶
type ActionPatch ¶ added in v0.37.0
type ActionPatchNode ¶
type ActionPatchNode struct { NodeName string `json:"nodeName"` NodeID string `json:"nodeId"` Labels map[string]string `json:"labels"` Taints []NodeTaint `json:"taints"` Annotations map[string]string `json:"annotations"` Unschedulable *bool `json:"unschedulable"` // Capacity allows advertising extended resources for a Node. // More info: https://kubernetes.io/docs/tasks/administer-cluster/extended-resource-node/ Capacity v1.ResourceList `json:"capacity"` }
type ActionSendAKSInitData ¶ added in v0.9.0
type ActionSendAKSInitData struct { }
type ActionsClient ¶ added in v0.41.8
type ActionsClient interface { GetActions(ctx context.Context, k8sVersion string) ([]*ClusterAction, error) AckAction(ctx context.Context, actionID string, req *AckClusterActionRequest) error SendAKSInitData(ctx context.Context, req *AKSInitDataRequest) error }
ActionsClient lists functions used by actions package. TODO: move interface into actions package.
type ChartSource ¶ added in v0.6.0
type ChartSource struct { RepoURL string `json:"repoUrl"` Name string `json:"name"` Version string `json:"version"` }
func (*ChartSource) Validate ¶ added in v0.6.0
func (c *ChartSource) Validate() error
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client talks to Cast AI. It can poll and acknowledge actions and also inject logs.
func (*Client) GetActions ¶
func (*Client) SendAKSInitData ¶ added in v0.9.0
func (c *Client) SendAKSInitData(ctx context.Context, req *AKSInitDataRequest) error
type ClusterAction ¶
type ClusterAction struct { ID string `json:"id"` ActionDeleteNode *ActionDeleteNode `json:"actionDeleteNode,omitempty"` ActionDrainNode *ActionDrainNode `json:"actionDrainNode,omitempty"` ActionPatchNode *ActionPatchNode `json:"actionPatchNode,omitempty"` ActionCreateEvent *ActionCreateEvent `json:"actionCreateEvent,omitempty"` ActionApproveCSR *ActionApproveCSR `json:"actionApproveCsr,omitempty"` ActionChartUpsert *ActionChartUpsert `json:"actionChartUpsert,omitempty"` ActionChartUninstall *ActionChartUninstall `json:"actionChartUninstall,omitempty"` ActionChartRollback *ActionChartRollback `json:"actionChartRollback,omitempty"` ActionDisconnectCluster *ActionDisconnectCluster `json:"actionDisconnectCluster,omitempty"` ActionSendAKSInitData *ActionSendAKSInitData `json:"actionSendAksInitData,omitempty"` ActionCheckNodeDeleted *ActionCheckNodeDeleted `json:"actionCheckNodeDeleted,omitempty"` ActionCheckNodeStatus *ActionCheckNodeStatus `json:"actionCheckNodeStatus,omitempty"` ActionPatch *ActionPatch `json:"actionPatch,omitempty"` ActionCreate *ActionCreate `json:"actionCreate,omitempty"` ActionDelete *ActionDelete `json:"actionDelete,omitempty"` CreatedAt time.Time `json:"createdAt"` DoneAt *time.Time `json:"doneAt,omitempty"` Error *string `json:"error,omitempty"` }
func (*ClusterAction) Data ¶
func (c *ClusterAction) Data() interface{}
type GetClusterActionsResponse ¶
type GetClusterActionsResponse struct {
Items []*ClusterAction `json:"items"`
}
type GroupVersionResource ¶ added in v0.39.0
type GroupVersionResource struct { Group string `json:"group"` Version string `json:"version"` Resource string `json:"resource"` }
func (GroupVersionResource) String ¶ added in v0.39.0
func (r GroupVersionResource) String() string
type LogExporter ¶ added in v0.41.8
type LogExporter struct {
// contains filtered or unexported fields
}
LogExporter hooks into logrus and sends logs to Mothership.
func NewLogExporter ¶ added in v0.41.8
func NewLogExporter(logger *logrus.Logger, sender logSender) *LogExporter
NewLogExporter returns new exporter that can be hooked into logrus to inject logs into Cast AI.
func (*LogExporter) Fire ¶ added in v0.41.8
func (e *LogExporter) Fire(entry *logrus.Entry) error
Fire called by logrus with log entry that LogExporter sends out.
func (*LogExporter) Levels ¶ added in v0.41.8
func (e *LogExporter) Levels() []logrus.Level
Levels lists levels that tell logrus to trigger log injection.
func (*LogExporter) Wait ¶ added in v0.41.8
func (e *LogExporter) Wait()
Wait lets all pending log sends to finish.
type ObjectID ¶ added in v0.37.0
type ObjectID struct { GroupVersionResource `json:",inline"` Namespace *string `json:"namespace"` Name string `json:"name"` }
Click to show internal directories.
Click to hide internal directories.