Documentation
¶
Overview ¶
Package v2 is the new Exoscale client API binding. Reference: https://openapi-v2.exoscale.com/
Index ¶
- Variables
- type AntiAffinityGroup
- type Client
- func (c *Client) CreateAntiAffinityGroup(ctx context.Context, zone string, antiAffinityGroup *AntiAffinityGroup) (*AntiAffinityGroup, error)
- func (c *Client) CreateElasticIP(ctx context.Context, zone string, elasticIP *ElasticIP) (*ElasticIP, error)
- func (c *Client) CreateInstancePool(ctx context.Context, zone string, instancePool *InstancePool) (*InstancePool, error)
- func (c *Client) CreateNetworkLoadBalancer(ctx context.Context, zone string, nlb *NetworkLoadBalancer) (*NetworkLoadBalancer, error)
- func (c *Client) CreatePrivateNetwork(ctx context.Context, zone string, privateNetwork *PrivateNetwork) (*PrivateNetwork, error)
- func (c *Client) CreateSKSCluster(ctx context.Context, zone string, cluster *SKSCluster) (*SKSCluster, error)
- func (c *Client) CreateSecurityGroup(ctx context.Context, zone string, securityGroup *SecurityGroup) (*SecurityGroup, error)
- func (c *Client) DeleteAntiAffinityGroup(ctx context.Context, zone, id string) error
- func (c *Client) DeleteElasticIP(ctx context.Context, zone, id string) error
- func (c *Client) DeleteInstancePool(ctx context.Context, zone, id string) error
- func (c *Client) DeleteNetworkLoadBalancer(ctx context.Context, zone, id string) error
- func (c *Client) DeletePrivateNetwork(ctx context.Context, zone, id string) error
- func (c *Client) DeleteSKSCluster(ctx context.Context, zone, id string) error
- func (c *Client) DeleteSecurityGroup(ctx context.Context, zone, id string) error
- func (c *Client) GetAntiAffinityGroup(ctx context.Context, zone, id string) (*AntiAffinityGroup, error)
- func (c *Client) GetElasticIP(ctx context.Context, zone, id string) (*ElasticIP, error)
- func (c *Client) GetInstancePool(ctx context.Context, zone, id string) (*InstancePool, error)
- func (c *Client) GetNetworkLoadBalancer(ctx context.Context, zone, id string) (*NetworkLoadBalancer, error)
- func (c *Client) GetPrivateNetwork(ctx context.Context, zone, id string) (*PrivateNetwork, error)
- func (c *Client) GetSKSCluster(ctx context.Context, zone, id string) (*SKSCluster, error)
- func (c *Client) GetSecurityGroup(ctx context.Context, zone, id string) (*SecurityGroup, error)
- func (c *Client) ListAntiAffinityGroups(ctx context.Context, zone string) ([]*AntiAffinityGroup, error)
- func (c *Client) ListElasticIPs(ctx context.Context, zone string) ([]*ElasticIP, error)
- func (c *Client) ListInstancePools(ctx context.Context, zone string) ([]*InstancePool, error)
- func (c *Client) ListNetworkLoadBalancers(ctx context.Context, zone string) ([]*NetworkLoadBalancer, error)
- func (c *Client) ListPrivateNetworks(ctx context.Context, zone string) ([]*PrivateNetwork, error)
- func (c *Client) ListSKSClusterVersions(ctx context.Context) ([]string, error)
- func (c *Client) ListSKSClusters(ctx context.Context, zone string) ([]*SKSCluster, error)
- func (c *Client) ListSecurityGroups(ctx context.Context, zone string) ([]*SecurityGroup, error)
- func (c *Client) ListZones(ctx context.Context) ([]string, error)
- func (c *Client) SetHTTPClient(client *http.Client)
- func (c *Client) SetTimeout(v time.Duration)
- func (c *Client) SetTrace(enabled bool)
- func (c *Client) UpdateElasticIP(ctx context.Context, zone string, elasticIP *ElasticIP) error
- func (c *Client) UpdateInstancePool(ctx context.Context, zone string, instancePool *InstancePool) error
- func (c *Client) UpdateNetworkLoadBalancer(ctx context.Context, zone string, nlb *NetworkLoadBalancer) (*NetworkLoadBalancer, error)
- func (c *Client) UpdatePrivateNetwork(ctx context.Context, zone string, privateNetwork *PrivateNetwork) error
- func (c *Client) UpdateSKSCluster(ctx context.Context, zone string, cluster *SKSCluster) error
- func (c *Client) UpgradeSKSCluster(ctx context.Context, zone, id, version string) error
- type ClientOpt
- type ElasticIP
- type ElasticIPHealthcheck
- type InstancePool
- type NetworkLoadBalancer
- func (nlb *NetworkLoadBalancer) AddService(ctx context.Context, svc *NetworkLoadBalancerService) (*NetworkLoadBalancerService, error)
- func (nlb *NetworkLoadBalancer) DeleteService(ctx context.Context, svc *NetworkLoadBalancerService) error
- func (nlb *NetworkLoadBalancer) UpdateService(ctx context.Context, svc *NetworkLoadBalancerService) error
- type NetworkLoadBalancerServerStatus
- type NetworkLoadBalancerService
- type NetworkLoadBalancerServiceHealthcheck
- type PrivateNetwork
- type SKSCluster
- func (c *SKSCluster) AddNodepool(ctx context.Context, np *SKSNodepool) (*SKSNodepool, error)
- func (c *SKSCluster) AuthorityCert(ctx context.Context, authority string) (string, error)
- func (c *SKSCluster) DeleteNodepool(ctx context.Context, np *SKSNodepool) error
- func (c *SKSCluster) EvictNodepoolMembers(ctx context.Context, np *SKSNodepool, members []string) error
- func (c *SKSCluster) RequestKubeconfig(ctx context.Context, user string, groups []string, d time.Duration) (string, error)
- func (c *SKSCluster) ResetField(ctx context.Context, field interface{}) error
- func (c *SKSCluster) ResetNodepoolField(ctx context.Context, np *SKSNodepool, field interface{}) error
- func (c *SKSCluster) RotateCCMCredentials(ctx context.Context) error
- func (c *SKSCluster) ScaleNodepool(ctx context.Context, np *SKSNodepool, nodes int64) error
- func (c *SKSCluster) UpdateNodepool(ctx context.Context, np *SKSNodepool) error
- type SKSNodepool
- type SecurityGroup
- type SecurityGroupRule
Constants ¶
This section is empty.
Variables ¶
var ErrClientConfig = errors.New("client configuration error")
Functions ¶
This section is empty.
Types ¶
type AntiAffinityGroup ¶ added in v0.44.0
AntiAffinityGroup represents an Anti-Affinity Group.
type Client ¶
type Client struct {
*papi.ClientWithResponses
// contains filtered or unexported fields
}
Client represents an Exoscale API client.
func NewClient ¶
NewClient returns a new Exoscale API client, or an error if one couldn't be initialized.
func (*Client) CreateAntiAffinityGroup ¶ added in v0.44.0
func (c *Client) CreateAntiAffinityGroup(ctx context.Context, zone string, antiAffinityGroup *AntiAffinityGroup) (*AntiAffinityGroup, error)
CreateAntiAffinityGroup creates an Anti-Affinity Group in the specified zone.
func (*Client) CreateElasticIP ¶ added in v0.45.0
func (c *Client) CreateElasticIP(ctx context.Context, zone string, elasticIP *ElasticIP) (*ElasticIP, error)
CreateElasticIP creates an Elastic IP in the specified zone.
func (*Client) CreateInstancePool ¶ added in v0.44.0
func (c *Client) CreateInstancePool(ctx context.Context, zone string, instancePool *InstancePool) (*InstancePool, error)
CreateInstancePool creates an Instance Pool in the specified zone.
func (*Client) CreateNetworkLoadBalancer ¶
func (c *Client) CreateNetworkLoadBalancer(ctx context.Context, zone string, nlb *NetworkLoadBalancer) (*NetworkLoadBalancer, error)
CreateNetworkLoadBalancer creates a Network Load Balancer instance in the specified zone.
func (*Client) CreatePrivateNetwork ¶ added in v0.44.0
func (c *Client) CreatePrivateNetwork(ctx context.Context, zone string, privateNetwork *PrivateNetwork) (*PrivateNetwork, error)
CreatePrivateNetwork creates a Private Network in the specified zone.
func (*Client) CreateSKSCluster ¶
func (c *Client) CreateSKSCluster(ctx context.Context, zone string, cluster *SKSCluster) (*SKSCluster, error)
CreateSKSCluster creates a SKS cluster in the specified zone.
func (*Client) CreateSecurityGroup ¶ added in v0.44.0
func (c *Client) CreateSecurityGroup(ctx context.Context, zone string, securityGroup *SecurityGroup) (*SecurityGroup, error)
CreateSecurityGroup creates a Security Group.
func (*Client) DeleteAntiAffinityGroup ¶ added in v0.44.0
DeleteAntiAffinityGroup deletes the specified Anti-Affinity Group in the specified zone.
func (*Client) DeleteElasticIP ¶ added in v0.45.0
DeleteElasticIP deletes the specified Elastic IP in the specified zone.
func (*Client) DeleteInstancePool ¶ added in v0.44.0
DeleteInstancePool deletes the specified Instance Pool in the specified zone.
func (*Client) DeleteNetworkLoadBalancer ¶
DeleteNetworkLoadBalancer deletes the specified Network Load Balancer instance in the specified zone.
func (*Client) DeletePrivateNetwork ¶ added in v0.44.0
DeletePrivateNetwork deletes the specified Private Network in the specified zone.
func (*Client) DeleteSKSCluster ¶
DeleteSKSCluster deletes the specified SKS cluster in the specified zone.
func (*Client) DeleteSecurityGroup ¶ added in v0.44.0
DeleteSecurityGroup deletes the specified Security Group in the specified zone.
func (*Client) GetAntiAffinityGroup ¶ added in v0.44.0
func (c *Client) GetAntiAffinityGroup(ctx context.Context, zone, id string) (*AntiAffinityGroup, error)
GetAntiAffinityGroup returns the Anti-Affinity Group corresponding to the specified ID in the specified zone.
func (*Client) GetElasticIP ¶ added in v0.45.0
GetElasticIP returns the Elastic IP corresponding to the specified ID in the specified zone.
func (*Client) GetInstancePool ¶ added in v0.44.0
GetInstancePool returns the Instance Pool corresponding to the specified ID in the specified zone.
func (*Client) GetNetworkLoadBalancer ¶
func (c *Client) GetNetworkLoadBalancer(ctx context.Context, zone, id string) (*NetworkLoadBalancer, error)
GetNetworkLoadBalancer returns the Network Load Balancer instance corresponding to the specified ID in the specified zone.
func (*Client) GetPrivateNetwork ¶ added in v0.44.0
GetPrivateNetwork returns the Private Network corresponding to the specified ID in the specified zone.
func (*Client) GetSKSCluster ¶
GetSKSCluster returns the SKS cluster corresponding to the specified ID in the specified zone.
func (*Client) GetSecurityGroup ¶ added in v0.44.0
GetSecurityGroup returns the Security Group corresponding to the specified ID in the specified zone.
func (*Client) ListAntiAffinityGroups ¶ added in v0.44.0
func (c *Client) ListAntiAffinityGroups(ctx context.Context, zone string) ([]*AntiAffinityGroup, error)
ListAntiAffinityGroups returns the list of existing Anti-Affinity Groups in the specified zone.
func (*Client) ListElasticIPs ¶ added in v0.45.0
ListElasticIPs returns the list of existing Elastic IPs in the specified zone.
func (*Client) ListInstancePools ¶ added in v0.44.0
ListInstancePools returns the list of existing Instance Pools in the specified zone.
func (*Client) ListNetworkLoadBalancers ¶
func (c *Client) ListNetworkLoadBalancers(ctx context.Context, zone string) ([]*NetworkLoadBalancer, error)
ListNetworkLoadBalancers returns the list of existing Network Load Balancers in the specified zone.
func (*Client) ListPrivateNetworks ¶ added in v0.44.0
ListPrivateNetworks returns the list of existing Private Networks in the specified zone.
func (*Client) ListSKSClusterVersions ¶
ListSKSClusterVersions returns the list of Kubernetes versions supported during SKS cluster creation.
func (*Client) ListSKSClusters ¶
ListSKSClusters returns the list of existing SKS clusters in the specified zone.
func (*Client) ListSecurityGroups ¶ added in v0.44.0
ListSecurityGroups returns the list of existing Security Groups.
func (*Client) SetHTTPClient ¶ added in v0.47.0
SetHTTPClient overrides the current HTTP client.
func (*Client) SetTimeout ¶ added in v0.47.0
SetTimeout overrides the current client timeout value.
func (*Client) SetTrace ¶ added in v0.47.0
SetTrace enables or disables HTTP request/reponse tracing.
func (*Client) UpdateElasticIP ¶ added in v0.45.0
UpdateElasticIP updates the specified Elastic IP in the specified zone.
func (*Client) UpdateInstancePool ¶ added in v0.44.0
func (c *Client) UpdateInstancePool(ctx context.Context, zone string, instancePool *InstancePool) error
UpdateInstancePool updates the specified Instance Pool in the specified zone.
func (*Client) UpdateNetworkLoadBalancer ¶
func (c *Client) UpdateNetworkLoadBalancer(ctx context.Context, zone string, nlb *NetworkLoadBalancer) (*NetworkLoadBalancer, error)
UpdateNetworkLoadBalancer updates the specified Network Load Balancer instance in the specified zone.
func (*Client) UpdatePrivateNetwork ¶ added in v0.44.0
func (c *Client) UpdatePrivateNetwork(ctx context.Context, zone string, privateNetwork *PrivateNetwork) error
UpdatePrivateNetwork updates the specified Private Network in the specified zone.
func (*Client) UpdateSKSCluster ¶
UpdateSKSCluster updates the specified SKS cluster in the specified zone.
type ClientOpt ¶
ClientOpt represents a function setting Exoscale API client option.
func ClientOptCond ¶ added in v0.44.0
ClientOptCond returns the specified ClientOpt if the fc function bool result evaluates to true, otherwise returns a no-op ClientOpt.
func ClientOptWithAPIEndpoint ¶
ClientOptWithAPIEndpoint returns a ClientOpt overriding the default Exoscale API endpoint.
func ClientOptWithHTTPClient ¶
ClientOptWithHTTPClient returns a ClientOpt overriding the default http.Client. Note: the Exoscale API client will chain additional middleware (http.RoundTripper) on the HTTP client internally, which can alter the HTTP requests and responses. If you don't want any other middleware than the ones currently set to your HTTP client, you should duplicate it and pass a copy instead.
func ClientOptWithTimeout ¶
ClientOptWithTimeout returns a ClientOpt overriding the default client timeout.
func ClientOptWithTrace ¶ added in v0.44.0
func ClientOptWithTrace() ClientOpt
ClientOptWithTrace returns a ClientOpt enabling HTTP request/reponse tracing.
type ElasticIP ¶ added in v0.45.0
type ElasticIP struct {
Description string `reset:"description"`
Healthcheck *ElasticIPHealthcheck
ID string
IPAddress net.IP
// contains filtered or unexported fields
}
ElasticIP represents an Elastic IP.
type ElasticIPHealthcheck ¶ added in v0.45.0
type ElasticIPHealthcheck struct {
Interval time.Duration
Mode string
Port uint16
StrikesFail int64
StrikesOK int64
TLSSNI string
TLSSkipVerify bool
Timeout time.Duration
URI string
}
ElasticIPHealthcheck represents an Elastic IP healthcheck.
type InstancePool ¶ added in v0.44.0
type InstancePool struct {
AntiAffinityGroupIDs []string `reset:"anti-affinity-groups"`
Description string `reset:"description"`
DiskSize int64
ElasticIPIDs []string `reset:"elastic-ips"`
ID string
IPv6Enabled bool
InstanceIDs []string
InstanceTypeID string
ManagerID string
Name string
PrivateNetworkIDs []string `reset:"private-networks"`
SSHKey string `reset:"ssh-key"`
SecurityGroupIDs []string `reset:"security-groups"`
Size int64
State string
TemplateID string
UserData string `reset:"user-data"`
// contains filtered or unexported fields
}
InstancePool represents an Instance Pool.
func (*InstancePool) EvictMembers ¶ added in v0.44.0
func (i *InstancePool) EvictMembers(ctx context.Context, members []string) error
EvictMembers evicts the specified members (identified by their Compute instance ID) from the Instance Pool.
func (*InstancePool) ResetField ¶ added in v0.44.0
func (i *InstancePool) ResetField(ctx context.Context, field interface{}) error
ResetField resets the specified Instance Pool field to its default value. The value expected for the field parameter is a pointer to the InstancePool field to reset.
type NetworkLoadBalancer ¶
type NetworkLoadBalancer struct {
CreatedAt time.Time
Description string
ID string
IPAddress net.IP
Name string
Services []*NetworkLoadBalancerService
State string
// contains filtered or unexported fields
}
NetworkLoadBalancer represents a Network Load Balancer instance.
func (*NetworkLoadBalancer) AddService ¶
func (nlb *NetworkLoadBalancer) AddService(ctx context.Context, svc *NetworkLoadBalancerService) (*NetworkLoadBalancerService, error)
AddService adds a service to the Network Load Balancer instance.
func (*NetworkLoadBalancer) DeleteService ¶
func (nlb *NetworkLoadBalancer) DeleteService(ctx context.Context, svc *NetworkLoadBalancerService) error
DeleteService deletes the specified service from the Network Load Balancer instance.
func (*NetworkLoadBalancer) UpdateService ¶
func (nlb *NetworkLoadBalancer) UpdateService(ctx context.Context, svc *NetworkLoadBalancerService) error
UpdateService updates the specified Network Load Balancer service.
type NetworkLoadBalancerServerStatus ¶
NetworkLoadBalancerServerStatus represents a Network Load Balancer service target server status.
type NetworkLoadBalancerService ¶
type NetworkLoadBalancerService struct {
Description string
Healthcheck NetworkLoadBalancerServiceHealthcheck
HealthcheckStatus []*NetworkLoadBalancerServerStatus
ID string
InstancePoolID string
Name string
Port uint16
Protocol string
State string
Strategy string
TargetPort uint16
}
NetworkLoadBalancerService represents a Network Load Balancer service.
type NetworkLoadBalancerServiceHealthcheck ¶
type NetworkLoadBalancerServiceHealthcheck struct {
Interval time.Duration
Mode string
Port uint16
Retries int64
TLSSNI string
Timeout time.Duration
URI string
}
NetworkLoadBalancerServiceHealthcheck represents a Network Load Balancer service healthcheck.
type PrivateNetwork ¶ added in v0.44.0
type PrivateNetwork struct {
Description string
EndIP net.IP
ID string
Name string
Netmask net.IP
StartIP net.IP
}
PrivateNetwork represents a Private Network.
type SKSCluster ¶
type SKSCluster struct {
AddOns []string
CNI string
CreatedAt time.Time
Description string `reset:"description"`
Endpoint string
ID string
Name string
Nodepools []*SKSNodepool
ServiceLevel string
State string
Version string
// contains filtered or unexported fields
}
SKSCluster represents a SKS cluster.
func (*SKSCluster) AddNodepool ¶
func (c *SKSCluster) AddNodepool(ctx context.Context, np *SKSNodepool) (*SKSNodepool, error)
AddNodepool adds a Nodepool to the SKS cluster.
func (*SKSCluster) AuthorityCert ¶ added in v0.46.0
AuthorityCert returns the SKS cluster base64-encoded certificate content for the specified authority.
func (*SKSCluster) DeleteNodepool ¶
func (c *SKSCluster) DeleteNodepool(ctx context.Context, np *SKSNodepool) error
DeleteNodepool deletes the specified Nodepool from the SKS cluster.
func (*SKSCluster) EvictNodepoolMembers ¶
func (c *SKSCluster) EvictNodepoolMembers(ctx context.Context, np *SKSNodepool, members []string) error
EvictNodepoolMembers evicts the specified members (identified by their Compute instance ID) from the SKS cluster Nodepool.
func (*SKSCluster) RequestKubeconfig ¶
func (c *SKSCluster) RequestKubeconfig(ctx context.Context, user string, groups []string, d time.Duration) (string, error)
RequestKubeconfig returns a base64-encoded kubeconfig content for the specified user name, optionally associated to specified groups for a duration d (default API-set TTL applies if not specified). Fore more information: https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/
func (*SKSCluster) ResetField ¶ added in v0.44.0
func (c *SKSCluster) ResetField(ctx context.Context, field interface{}) error
ResetField resets the specified SKS cluster field to its default value. The value expected for the field parameter is a pointer to the SKSCluster field to reset.
func (*SKSCluster) ResetNodepoolField ¶ added in v0.44.0
func (c *SKSCluster) ResetNodepoolField(ctx context.Context, np *SKSNodepool, field interface{}) error
ResetNodepoolField resets the specified SKS Nodepool field to its default value. The value expected for the field parameter is a pointer to the SKSNodepool field to reset.
func (*SKSCluster) RotateCCMCredentials ¶ added in v0.46.0
func (c *SKSCluster) RotateCCMCredentials(ctx context.Context) error
RotateCCMCredentials rotates the Exoscale IAM credentials managed by the SKS control plane for the Kubernetes Exoscale Cloud Controller Manager.
func (*SKSCluster) ScaleNodepool ¶
func (c *SKSCluster) ScaleNodepool(ctx context.Context, np *SKSNodepool, nodes int64) error
ScaleNodepool scales the SKS cluster Nodepool to the specified number of Kubernetes Nodes.
func (*SKSCluster) UpdateNodepool ¶
func (c *SKSCluster) UpdateNodepool(ctx context.Context, np *SKSNodepool) error
UpdateNodepool updates the specified SKS cluster Nodepool.
type SKSNodepool ¶
type SKSNodepool struct {
AntiAffinityGroupIDs []string `reset:"anti-affinity-groups"`
CreatedAt time.Time
Description string `reset:"description"`
DiskSize int64
ID string
InstancePoolID string
InstanceTypeID string
Name string
SecurityGroupIDs []string `reset:"security-groups"`
Size int64
State string
TemplateID string
Version string
}
SKSNodepool represents a SKS Nodepool.
type SecurityGroup ¶ added in v0.44.0
type SecurityGroup struct {
Description string
ID string
Name string
Rules []*SecurityGroupRule
// contains filtered or unexported fields
}
SecurityGroup represents a Security Group.
func (*SecurityGroup) AddRule ¶ added in v0.44.0
func (s *SecurityGroup) AddRule(ctx context.Context, rule *SecurityGroupRule) (*SecurityGroupRule, error)
AddRule adds a rule to the Security Group.
func (*SecurityGroup) DeleteRule ¶ added in v0.44.0
func (s *SecurityGroup) DeleteRule(ctx context.Context, rule *SecurityGroupRule) error
DeleteRule deletes the specified rule from the Security Group.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package api implements low-level primitives for interacting with the Exoscale API.
|
Package api implements low-level primitives for interacting with the Exoscale API. |
|
internal
|
|
|
public-api
Package publicapi provides primitives to interact the openapi HTTP API.
|
Package publicapi provides primitives to interact the openapi HTTP API. |