Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) CreateCluster(createConfig CreateClusterConfig) (cluster Cluster, clientset *kubernetes.Clientset, err error)
- func (c *Client) DeleteCluster(clusterID string) (err error)
- func (c *Client) GetCluster(id string) (result Cluster, err error)
- func (c *Client) GetClusterClientset(id string) (result *kubernetes.Clientset, err error)
- func (c *Client) GetClusterKubeConfig(id string) (result []byte, err error)
- func (c *Client) GetClusters() (result []Cluster, err error)
- type ClientConfig
- type Cluster
- type CreateClusterConfig
Constants ¶
This section is empty.
Variables ¶
var FiveHours *int = getIntPointer(5)
var FourHours *int = getIntPointer(4)
var OneHour *int = getIntPointer(1)
var Permanent *int = nil
var SixHours *int = getIntPointer(6)
var ThreeHours *int = getIntPointer(3)
var TwoHours *int = getIntPointer(2)
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(config ClientConfig) *Client
NewClient creates a new Krucible client with the given connection information.
func (*Client) CreateCluster ¶
func (c *Client) CreateCluster(createConfig CreateClusterConfig) (cluster Cluster, clientset *kubernetes.Clientset, err error)
CreateCluster creates a Krucible cluster with the given configuration. Both a cluster, containing metadata about the created cluster, and a client, configured for connectivity to the cluster, are returned, both of which should be valid providing that the returned error is nil.
func (*Client) DeleteCluster ¶ added in v0.1.10
DeleteCluster deletes a Krucible cluster with the given ID.
func (*Client) GetCluster ¶
GetCluster fetches metadata about the given Krucible cluster.
func (*Client) GetClusterClientset ¶
func (c *Client) GetClusterClientset(id string) (result *kubernetes.Clientset, err error)
GetClusterClientset returns a set of clients for a given Krucible cluster. These can be used to connect to the cluster as usual.
func (*Client) GetClusterKubeConfig ¶ added in v0.1.8
GetClusterKubeConfig returns a cluster's kubeconfig as a byte array.
func (*Client) GetClusters ¶ added in v0.1.7
type ClientConfig ¶
type Cluster ¶
type Cluster struct { ID string `json:"id"` DisplayName string `json:"displayName"` State string `json:"state"` ConnectionDetails struct { Server string `json:"server"` CertificateAuthority string `json:"certificateAuthority"` ClusterAuthToken string `json:"clusterAuthToken"` } `json:"connectionDetails"` CreatedAt time.Time `json:"createdAt"` ExpiresAt time.Time `json:"expiresAt"` }
Cluster contains metadata about a Krucible cluster.
type CreateClusterConfig ¶
type CreateClusterConfig struct { DisplayName string `json:"displayName"` // DurationInHours is the number of hours the cluster should be available // for. If the cluster should run indefinitely then supply a nil pointer, // otherwise an integer between 1 and 6 should be provided. DurationInHours *int `json:"durationInHours"` // pointer because it could be null }