Documentation
¶
Index ¶
- Constants
- type ClusterAvailabilityNewParams
- type ClusterAvailabilityService
- type ClusterAvailabilityUpdateParams
- type ClusterControllerListParams
- type ClusterControllerService
- func (r *ClusterControllerService) Get(ctx context.Context, clusterID string, controllerID string, ...) (res *NKSController, err error)
- func (r *ClusterControllerService) List(ctx context.Context, clusterID string, query ClusterControllerListParams, ...) (res *pagination.Cursor[NKSController], err error)
- func (r *ClusterControllerService) ListAutoPaging(ctx context.Context, clusterID string, query ClusterControllerListParams, ...) *pagination.CursorAutoPager[NKSController]
- type ClusterControllerVolumeListParams
- type ClusterControllerVolumeService
- func (r *ClusterControllerVolumeService) Get(ctx context.Context, clusterID string, controllerID string, volumeID string, ...) (res *NKSControllerVolume, err error)
- func (r *ClusterControllerVolumeService) List(ctx context.Context, clusterID string, controllerID string, ...) (res *pagination.Cursor[NKSControllerVolume], err error)
- func (r *ClusterControllerVolumeService) ListAutoPaging(ctx context.Context, clusterID string, controllerID string, ...) *pagination.CursorAutoPager[NKSControllerVolume]
- type ClusterKubeconfigService
- type ClusterListParams
- type ClusterLoadBalancerListParams
- type ClusterLoadBalancerService
- func (r *ClusterLoadBalancerService) Get(ctx context.Context, clusterID string, loadBalancerID string, ...) (res *NKSLoadBalancer, err error)
- func (r *ClusterLoadBalancerService) List(ctx context.Context, clusterID string, query ClusterLoadBalancerListParams, ...) (res *pagination.Cursor[NKSLoadBalancer], err error)
- func (r *ClusterLoadBalancerService) ListAutoPaging(ctx context.Context, clusterID string, query ClusterLoadBalancerListParams, ...) *pagination.CursorAutoPager[NKSLoadBalancer]
- func (r *ClusterLoadBalancerService) Update(ctx context.Context, clusterID string, loadBalancerID string, ...) (res *operations.Operation, err error)
- type ClusterLoadBalancerUpdateParams
- type ClusterNewParams
- type ClusterPersistentVolumeClaimListParams
- type ClusterPersistentVolumeClaimService
- func (r *ClusterPersistentVolumeClaimService) Get(ctx context.Context, clusterID string, persistentVolumeClaimID string, ...) (res *PersistentVolumeClaim, err error)
- func (r *ClusterPersistentVolumeClaimService) List(ctx context.Context, clusterID string, ...) (res *pagination.Cursor[PersistentVolumeClaim], err error)
- func (r *ClusterPersistentVolumeClaimService) ListAutoPaging(ctx context.Context, clusterID string, ...) *pagination.CursorAutoPager[PersistentVolumeClaim]
- type ClusterPoolAvailabilityNewParams
- type ClusterPoolAvailabilityService
- type ClusterPoolAvailabilityUpdateParams
- type ClusterPoolAvailabilityUpdateParamsNodeConfig
- type ClusterPoolListParams
- type ClusterPoolNewParams
- type ClusterPoolNodeListParams
- type ClusterPoolNodeService
- func (r *ClusterPoolNodeService) Delete(ctx context.Context, clusterID string, poolID string, nodeID string, ...) (res *operations.Operation, err error)
- func (r *ClusterPoolNodeService) Get(ctx context.Context, clusterID string, poolID string, nodeID string, ...) (res *NKSNode, err error)
- func (r *ClusterPoolNodeService) List(ctx context.Context, clusterID string, poolID string, ...) (res *pagination.Cursor[NKSNode], err error)
- func (r *ClusterPoolNodeService) ListAutoPaging(ctx context.Context, clusterID string, poolID string, ...) *pagination.CursorAutoPager[NKSNode]
- type ClusterPoolNodeVolumeListParams
- type ClusterPoolNodeVolumeService
- func (r *ClusterPoolNodeVolumeService) Get(ctx context.Context, clusterID string, poolID string, nodeID string, ...) (res *NKSNodeVolume, err error)
- func (r *ClusterPoolNodeVolumeService) List(ctx context.Context, clusterID string, poolID string, nodeID string, ...) (res *pagination.Cursor[NKSNodeVolume], err error)
- func (r *ClusterPoolNodeVolumeService) ListAutoPaging(ctx context.Context, clusterID string, poolID string, nodeID string, ...) *pagination.CursorAutoPager[NKSNodeVolume]
- type ClusterPoolService
- func (r *ClusterPoolService) Delete(ctx context.Context, clusterID string, poolID string, ...) (res *operations.Operation, err error)
- func (r *ClusterPoolService) Get(ctx context.Context, clusterID string, poolID string, ...) (res *NKSNodePool, err error)
- func (r *ClusterPoolService) List(ctx context.Context, clusterID string, query ClusterPoolListParams, ...) (res *pagination.Cursor[NKSNodePool], err error)
- func (r *ClusterPoolService) ListAutoPaging(ctx context.Context, clusterID string, query ClusterPoolListParams, ...) *pagination.CursorAutoPager[NKSNodePool]
- func (r *ClusterPoolService) New(ctx context.Context, clusterID string, body ClusterPoolNewParams, ...) (res *operations.Operation, err error)
- func (r *ClusterPoolService) Update(ctx context.Context, clusterID string, poolID string, ...) (res *operations.Operation, err error)
- type ClusterPoolUpdateParams
- type ClusterPoolUpdateParamsNodeConfig
- type ClusterService
- func (r *ClusterService) Delete(ctx context.Context, clusterID string, opts ...option.RequestOption) (res *operations.Operation, err error)
- func (r *ClusterService) Get(ctx context.Context, clusterID string, opts ...option.RequestOption) (res *NKSCluster, err error)
- func (r *ClusterService) List(ctx context.Context, query ClusterListParams, opts ...option.RequestOption) (res *pagination.Cursor[NKSCluster], err error)
- func (r *ClusterService) ListAutoPaging(ctx context.Context, query ClusterListParams, opts ...option.RequestOption) *pagination.CursorAutoPager[NKSCluster]
- func (r *ClusterService) New(ctx context.Context, body ClusterNewParams, opts ...option.RequestOption) (res *operations.Operation, err error)
- func (r *ClusterService) Update(ctx context.Context, clusterID string, body ClusterUpdateParams, ...) (res *NKSCluster, err error)
- type ClusterUpdateParams
- type Error
- type Kubeconfig
- type NKSCluster
- type NKSClusterList
- type NKSController
- type NKSControllerList
- type NKSControllerVolume
- type NKSControllerVolumeList
- type NKSLoadBalancer
- type NKSLoadBalancerList
- type NKSNode
- type NKSNodeList
- type NKSNodePool
- type NKSNodePoolBootVolumeParam
- type NKSNodePoolBootVolumeResponse
- type NKSNodePoolList
- type NKSNodePoolNodeConfigParam
- type NKSNodePoolNodeConfigResponse
- type NKSNodeVolume
- type NKSNodeVolumeList
- type NKSService
- type Pagination
- type PersistentVolumeClaim
- type PersistentVolumeClaimList
- type RegionName
- type ResourceStatus
- type SourceIPRuleParam
- type SourceIPRuleResponse
Constants ¶
const RegionNameUsChi1 = shared.RegionNameUsChi1
Equals "us-chi-1"
const RegionNameUsSva1 = shared.RegionNameUsSva1
Equals "us-sva-1"
const RegionNameUsSva2 = shared.RegionNameUsSva2
Equals "us-sva-2"
const ResourceStatusCreating = shared.ResourceStatusCreating
Equals "creating"
const ResourceStatusDeleted = shared.ResourceStatusDeleted
Equals "deleted"
const ResourceStatusDeleting = shared.ResourceStatusDeleting
Equals "deleting"
const ResourceStatusError = shared.ResourceStatusError
Equals "error"
const ResourceStatusPending = shared.ResourceStatusPending
Equals "pending"
const ResourceStatusReady = shared.ResourceStatusReady
Equals "ready"
const ResourceStatusUpdating = shared.ResourceStatusUpdating
Equals "updating"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterAvailabilityNewParams ¶
type ClusterAvailabilityNewParams struct {
// Name of the Cluster.
Name string `json:"name" api:"required"`
// Project ID to create the Cluster in.
ProjectID string `json:"project_id" api:"required"`
// Region the resource is in.
//
// Any of "us-sva-1", "us-sva-2", "us-chi-1".
Region shared.RegionName `json:"region,omitzero" api:"required"`
// ID of the VPC to use for the Cluster.
VPCID string `json:"vpc_id" api:"required"`
// Tags to attach to the Cluster.
Tags []string `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (ClusterAvailabilityNewParams) MarshalJSON ¶
func (r ClusterAvailabilityNewParams) MarshalJSON() (data []byte, err error)
func (*ClusterAvailabilityNewParams) UnmarshalJSON ¶
func (r *ClusterAvailabilityNewParams) UnmarshalJSON(data []byte) error
type ClusterAvailabilityService ¶
type ClusterAvailabilityService struct {
Options []option.RequestOption
}
ClusterAvailabilityService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewClusterAvailabilityService method instead.
func NewClusterAvailabilityService ¶
func NewClusterAvailabilityService(opts ...option.RequestOption) (r ClusterAvailabilityService)
NewClusterAvailabilityService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ClusterAvailabilityService) New ¶
func (r *ClusterAvailabilityService) New(ctx context.Context, body ClusterAvailabilityNewParams, opts ...option.RequestOption) (err error)
Check if an NKS cluster can be created
func (*ClusterAvailabilityService) Update ¶
func (r *ClusterAvailabilityService) Update(ctx context.Context, clusterID string, body ClusterAvailabilityUpdateParams, opts ...option.RequestOption) (err error)
Check if an NKS cluster can be updated
type ClusterAvailabilityUpdateParams ¶
type ClusterAvailabilityUpdateParams struct {
// Name of the Cluster.
Name param.Opt[string] `json:"name,omitzero"`
// Tags to attach to the Cluster.
Tags []string `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (ClusterAvailabilityUpdateParams) MarshalJSON ¶
func (r ClusterAvailabilityUpdateParams) MarshalJSON() (data []byte, err error)
func (*ClusterAvailabilityUpdateParams) UnmarshalJSON ¶
func (r *ClusterAvailabilityUpdateParams) UnmarshalJSON(data []byte) error
type ClusterControllerListParams ¶ added in v1.57.0
type ClusterControllerListParams struct {
// Pagination cursor returned by a previous request
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ClusterControllerListParams) URLQuery ¶ added in v1.57.0
func (r ClusterControllerListParams) URLQuery() (v url.Values, err error)
URLQuery serializes ClusterControllerListParams's query parameters as `url.Values`.
type ClusterControllerService ¶ added in v1.57.0
type ClusterControllerService struct {
Options []option.RequestOption
Volumes ClusterControllerVolumeService
}
ClusterControllerService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewClusterControllerService method instead.
func NewClusterControllerService ¶ added in v1.57.0
func NewClusterControllerService(opts ...option.RequestOption) (r ClusterControllerService)
NewClusterControllerService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ClusterControllerService) Get ¶ added in v1.57.0
func (r *ClusterControllerService) Get(ctx context.Context, clusterID string, controllerID string, opts ...option.RequestOption) (res *NKSController, err error)
Get details about an NKS controller
func (*ClusterControllerService) List ¶ added in v1.57.0
func (r *ClusterControllerService) List(ctx context.Context, clusterID string, query ClusterControllerListParams, opts ...option.RequestOption) (res *pagination.Cursor[NKSController], err error)
List all controllers in an NKS cluster
func (*ClusterControllerService) ListAutoPaging ¶ added in v1.57.0
func (r *ClusterControllerService) ListAutoPaging(ctx context.Context, clusterID string, query ClusterControllerListParams, opts ...option.RequestOption) *pagination.CursorAutoPager[NKSController]
List all controllers in an NKS cluster
type ClusterControllerVolumeListParams ¶ added in v1.57.0
type ClusterControllerVolumeListParams struct {
// Pagination cursor returned by a previous request
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ClusterControllerVolumeListParams) URLQuery ¶ added in v1.57.0
func (r ClusterControllerVolumeListParams) URLQuery() (v url.Values, err error)
URLQuery serializes ClusterControllerVolumeListParams's query parameters as `url.Values`.
type ClusterControllerVolumeService ¶ added in v1.57.0
type ClusterControllerVolumeService struct {
Options []option.RequestOption
}
ClusterControllerVolumeService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewClusterControllerVolumeService method instead.
func NewClusterControllerVolumeService ¶ added in v1.57.0
func NewClusterControllerVolumeService(opts ...option.RequestOption) (r ClusterControllerVolumeService)
NewClusterControllerVolumeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ClusterControllerVolumeService) Get ¶ added in v1.57.0
func (r *ClusterControllerVolumeService) Get(ctx context.Context, clusterID string, controllerID string, volumeID string, opts ...option.RequestOption) (res *NKSControllerVolume, err error)
Get details about a volume attached to an NKS controller
func (*ClusterControllerVolumeService) List ¶ added in v1.57.0
func (r *ClusterControllerVolumeService) List(ctx context.Context, clusterID string, controllerID string, query ClusterControllerVolumeListParams, opts ...option.RequestOption) (res *pagination.Cursor[NKSControllerVolume], err error)
List all volumes attached to an NKS controller
func (*ClusterControllerVolumeService) ListAutoPaging ¶ added in v1.57.0
func (r *ClusterControllerVolumeService) ListAutoPaging(ctx context.Context, clusterID string, controllerID string, query ClusterControllerVolumeListParams, opts ...option.RequestOption) *pagination.CursorAutoPager[NKSControllerVolume]
List all volumes attached to an NKS controller
type ClusterKubeconfigService ¶
type ClusterKubeconfigService struct {
Options []option.RequestOption
}
ClusterKubeconfigService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewClusterKubeconfigService method instead.
func NewClusterKubeconfigService ¶
func NewClusterKubeconfigService(opts ...option.RequestOption) (r ClusterKubeconfigService)
NewClusterKubeconfigService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ClusterKubeconfigService) Get ¶
func (r *ClusterKubeconfigService) Get(ctx context.Context, clusterID string, opts ...option.RequestOption) (res *Kubeconfig, err error)
Get the kubeconfig for an NKS cluster
type ClusterListParams ¶
type ClusterListParams struct {
// Project ID of resources to request
ProjectID string `query:"project_id" api:"required" json:"-"`
// Pagination cursor returned by a previous request
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ClusterListParams) URLQuery ¶
func (r ClusterListParams) URLQuery() (v url.Values, err error)
URLQuery serializes ClusterListParams's query parameters as `url.Values`.
type ClusterLoadBalancerListParams ¶ added in v1.58.0
type ClusterLoadBalancerListParams struct {
// Pagination cursor returned by a previous request
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ClusterLoadBalancerListParams) URLQuery ¶ added in v1.58.0
func (r ClusterLoadBalancerListParams) URLQuery() (v url.Values, err error)
URLQuery serializes ClusterLoadBalancerListParams's query parameters as `url.Values`.
type ClusterLoadBalancerService ¶ added in v1.58.0
type ClusterLoadBalancerService struct {
Options []option.RequestOption
}
ClusterLoadBalancerService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewClusterLoadBalancerService method instead.
func NewClusterLoadBalancerService ¶ added in v1.58.0
func NewClusterLoadBalancerService(opts ...option.RequestOption) (r ClusterLoadBalancerService)
NewClusterLoadBalancerService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ClusterLoadBalancerService) Get ¶ added in v1.58.0
func (r *ClusterLoadBalancerService) Get(ctx context.Context, clusterID string, loadBalancerID string, opts ...option.RequestOption) (res *NKSLoadBalancer, err error)
Get details about an NKS load balancer
func (*ClusterLoadBalancerService) List ¶ added in v1.58.0
func (r *ClusterLoadBalancerService) List(ctx context.Context, clusterID string, query ClusterLoadBalancerListParams, opts ...option.RequestOption) (res *pagination.Cursor[NKSLoadBalancer], err error)
List all load balancers in an NKS cluster
func (*ClusterLoadBalancerService) ListAutoPaging ¶ added in v1.58.0
func (r *ClusterLoadBalancerService) ListAutoPaging(ctx context.Context, clusterID string, query ClusterLoadBalancerListParams, opts ...option.RequestOption) *pagination.CursorAutoPager[NKSLoadBalancer]
List all load balancers in an NKS cluster
func (*ClusterLoadBalancerService) Update ¶ added in v1.74.0
func (r *ClusterLoadBalancerService) Update(ctx context.Context, clusterID string, loadBalancerID string, body ClusterLoadBalancerUpdateParams, opts ...option.RequestOption) (res *operations.Operation, err error)
Update an NKS load balancer
type ClusterLoadBalancerUpdateParams ¶ added in v1.74.0
type ClusterLoadBalancerUpdateParams struct {
// Whether to enable a public IP for this load balancer.
PublicIPEnabled bool `json:"public_ip_enabled" api:"required"`
// contains filtered or unexported fields
}
func (ClusterLoadBalancerUpdateParams) MarshalJSON ¶ added in v1.74.0
func (r ClusterLoadBalancerUpdateParams) MarshalJSON() (data []byte, err error)
func (*ClusterLoadBalancerUpdateParams) UnmarshalJSON ¶ added in v1.74.0
func (r *ClusterLoadBalancerUpdateParams) UnmarshalJSON(data []byte) error
type ClusterNewParams ¶
type ClusterNewParams struct {
// Name of the Cluster.
Name string `json:"name" api:"required"`
// Project ID to create the Cluster in.
ProjectID string `json:"project_id" api:"required"`
// Region the resource is in.
//
// Any of "us-sva-1", "us-sva-2", "us-chi-1".
Region shared.RegionName `json:"region,omitzero" api:"required"`
// ID of the VPC to use for the Cluster.
VPCID string `json:"vpc_id" api:"required"`
// Tags to attach to the Cluster.
Tags []string `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (ClusterNewParams) MarshalJSON ¶
func (r ClusterNewParams) MarshalJSON() (data []byte, err error)
func (*ClusterNewParams) UnmarshalJSON ¶
func (r *ClusterNewParams) UnmarshalJSON(data []byte) error
type ClusterPersistentVolumeClaimListParams ¶ added in v1.68.0
type ClusterPersistentVolumeClaimListParams struct {
// Pagination cursor returned by a previous request
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ClusterPersistentVolumeClaimListParams) URLQuery ¶ added in v1.68.0
func (r ClusterPersistentVolumeClaimListParams) URLQuery() (v url.Values, err error)
URLQuery serializes ClusterPersistentVolumeClaimListParams's query parameters as `url.Values`.
type ClusterPersistentVolumeClaimService ¶ added in v1.68.0
type ClusterPersistentVolumeClaimService struct {
Options []option.RequestOption
}
ClusterPersistentVolumeClaimService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewClusterPersistentVolumeClaimService method instead.
func NewClusterPersistentVolumeClaimService ¶ added in v1.68.0
func NewClusterPersistentVolumeClaimService(opts ...option.RequestOption) (r ClusterPersistentVolumeClaimService)
NewClusterPersistentVolumeClaimService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ClusterPersistentVolumeClaimService) Get ¶ added in v1.68.0
func (r *ClusterPersistentVolumeClaimService) Get(ctx context.Context, clusterID string, persistentVolumeClaimID string, opts ...option.RequestOption) (res *PersistentVolumeClaim, err error)
Get details about an NKS persistent volume claim
func (*ClusterPersistentVolumeClaimService) List ¶ added in v1.68.0
func (r *ClusterPersistentVolumeClaimService) List(ctx context.Context, clusterID string, query ClusterPersistentVolumeClaimListParams, opts ...option.RequestOption) (res *pagination.Cursor[PersistentVolumeClaim], err error)
List all persistent volume claims in an NKS cluster
func (*ClusterPersistentVolumeClaimService) ListAutoPaging ¶ added in v1.68.0
func (r *ClusterPersistentVolumeClaimService) ListAutoPaging(ctx context.Context, clusterID string, query ClusterPersistentVolumeClaimListParams, opts ...option.RequestOption) *pagination.CursorAutoPager[PersistentVolumeClaim]
List all persistent volume claims in an NKS cluster
type ClusterPoolAvailabilityNewParams ¶
type ClusterPoolAvailabilityNewParams struct {
// Name of the node pool.
Name string `json:"name" api:"required"`
// Node configuration.
NodeConfig NKSNodePoolNodeConfigParam `json:"node_config,omitzero" api:"required"`
// Number of nodes. Must be between 1 and 100.
NodeCount int64 `json:"node_count" api:"required"`
// Tags to attach to the node pool.
Tags []string `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (ClusterPoolAvailabilityNewParams) MarshalJSON ¶
func (r ClusterPoolAvailabilityNewParams) MarshalJSON() (data []byte, err error)
func (*ClusterPoolAvailabilityNewParams) UnmarshalJSON ¶
func (r *ClusterPoolAvailabilityNewParams) UnmarshalJSON(data []byte) error
type ClusterPoolAvailabilityService ¶
type ClusterPoolAvailabilityService struct {
Options []option.RequestOption
}
ClusterPoolAvailabilityService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewClusterPoolAvailabilityService method instead.
func NewClusterPoolAvailabilityService ¶
func NewClusterPoolAvailabilityService(opts ...option.RequestOption) (r ClusterPoolAvailabilityService)
NewClusterPoolAvailabilityService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ClusterPoolAvailabilityService) New ¶
func (r *ClusterPoolAvailabilityService) New(ctx context.Context, clusterID string, body ClusterPoolAvailabilityNewParams, opts ...option.RequestOption) (err error)
Check if a node pool can be created in an NKS cluster
func (*ClusterPoolAvailabilityService) Update ¶
func (r *ClusterPoolAvailabilityService) Update(ctx context.Context, clusterID string, poolID string, body ClusterPoolAvailabilityUpdateParams, opts ...option.RequestOption) (err error)
Check if an NKS node pool can be updated
type ClusterPoolAvailabilityUpdateParams ¶
type ClusterPoolAvailabilityUpdateParams struct {
// Name of the node pool.
Name param.Opt[string] `json:"name,omitzero"`
// Number of nodes.
NodeCount param.Opt[int64] `json:"node_count,omitzero"`
// Partial node configuration update.
NodeConfig ClusterPoolAvailabilityUpdateParamsNodeConfig `json:"node_config,omitzero"`
// Tags to attach to the node pool.
Tags []string `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (ClusterPoolAvailabilityUpdateParams) MarshalJSON ¶
func (r ClusterPoolAvailabilityUpdateParams) MarshalJSON() (data []byte, err error)
func (*ClusterPoolAvailabilityUpdateParams) UnmarshalJSON ¶
func (r *ClusterPoolAvailabilityUpdateParams) UnmarshalJSON(data []byte) error
type ClusterPoolAvailabilityUpdateParamsNodeConfig ¶ added in v1.77.0
type ClusterPoolAvailabilityUpdateParamsNodeConfig struct {
// Kubernetes labels to apply to each node in the pool. Each entry is "key=value".
// When provided, the list fully replaces the current labels on the pool and on
// live nodes.
Labels []string `json:"labels,omitzero"`
// contains filtered or unexported fields
}
Partial node configuration update.
func (ClusterPoolAvailabilityUpdateParamsNodeConfig) MarshalJSON ¶ added in v1.77.0
func (r ClusterPoolAvailabilityUpdateParamsNodeConfig) MarshalJSON() (data []byte, err error)
func (*ClusterPoolAvailabilityUpdateParamsNodeConfig) UnmarshalJSON ¶ added in v1.77.0
func (r *ClusterPoolAvailabilityUpdateParamsNodeConfig) UnmarshalJSON(data []byte) error
type ClusterPoolListParams ¶
type ClusterPoolListParams struct {
// Pagination cursor returned by a previous request
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ClusterPoolListParams) URLQuery ¶
func (r ClusterPoolListParams) URLQuery() (v url.Values, err error)
URLQuery serializes ClusterPoolListParams's query parameters as `url.Values`.
type ClusterPoolNewParams ¶
type ClusterPoolNewParams struct {
// Name of the node pool.
Name string `json:"name" api:"required"`
// Node configuration.
NodeConfig NKSNodePoolNodeConfigParam `json:"node_config,omitzero" api:"required"`
// Number of nodes. Must be between 1 and 100.
NodeCount int64 `json:"node_count" api:"required"`
// Tags to attach to the node pool.
Tags []string `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (ClusterPoolNewParams) MarshalJSON ¶
func (r ClusterPoolNewParams) MarshalJSON() (data []byte, err error)
func (*ClusterPoolNewParams) UnmarshalJSON ¶
func (r *ClusterPoolNewParams) UnmarshalJSON(data []byte) error
type ClusterPoolNodeListParams ¶
type ClusterPoolNodeListParams struct {
// Pagination cursor returned by a previous request
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ClusterPoolNodeListParams) URLQuery ¶
func (r ClusterPoolNodeListParams) URLQuery() (v url.Values, err error)
URLQuery serializes ClusterPoolNodeListParams's query parameters as `url.Values`.
type ClusterPoolNodeService ¶
type ClusterPoolNodeService struct {
Options []option.RequestOption
Volumes ClusterPoolNodeVolumeService
}
ClusterPoolNodeService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewClusterPoolNodeService method instead.
func NewClusterPoolNodeService ¶
func NewClusterPoolNodeService(opts ...option.RequestOption) (r ClusterPoolNodeService)
NewClusterPoolNodeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ClusterPoolNodeService) Delete ¶ added in v1.61.0
func (r *ClusterPoolNodeService) Delete(ctx context.Context, clusterID string, poolID string, nodeID string, opts ...option.RequestOption) (res *operations.Operation, err error)
Delete a single node from an NKS node pool
func (*ClusterPoolNodeService) Get ¶
func (r *ClusterPoolNodeService) Get(ctx context.Context, clusterID string, poolID string, nodeID string, opts ...option.RequestOption) (res *NKSNode, err error)
Get details about an NKS node
func (*ClusterPoolNodeService) List ¶
func (r *ClusterPoolNodeService) List(ctx context.Context, clusterID string, poolID string, query ClusterPoolNodeListParams, opts ...option.RequestOption) (res *pagination.Cursor[NKSNode], err error)
List all nodes in an NKS node pool
func (*ClusterPoolNodeService) ListAutoPaging ¶
func (r *ClusterPoolNodeService) ListAutoPaging(ctx context.Context, clusterID string, poolID string, query ClusterPoolNodeListParams, opts ...option.RequestOption) *pagination.CursorAutoPager[NKSNode]
List all nodes in an NKS node pool
type ClusterPoolNodeVolumeListParams ¶
type ClusterPoolNodeVolumeListParams struct {
// Pagination cursor returned by a previous request
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ClusterPoolNodeVolumeListParams) URLQuery ¶
func (r ClusterPoolNodeVolumeListParams) URLQuery() (v url.Values, err error)
URLQuery serializes ClusterPoolNodeVolumeListParams's query parameters as `url.Values`.
type ClusterPoolNodeVolumeService ¶
type ClusterPoolNodeVolumeService struct {
Options []option.RequestOption
}
ClusterPoolNodeVolumeService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewClusterPoolNodeVolumeService method instead.
func NewClusterPoolNodeVolumeService ¶
func NewClusterPoolNodeVolumeService(opts ...option.RequestOption) (r ClusterPoolNodeVolumeService)
NewClusterPoolNodeVolumeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ClusterPoolNodeVolumeService) Get ¶
func (r *ClusterPoolNodeVolumeService) Get(ctx context.Context, clusterID string, poolID string, nodeID string, volumeID string, opts ...option.RequestOption) (res *NKSNodeVolume, err error)
Get details about a volume attached to an NKS node
func (*ClusterPoolNodeVolumeService) List ¶
func (r *ClusterPoolNodeVolumeService) List(ctx context.Context, clusterID string, poolID string, nodeID string, query ClusterPoolNodeVolumeListParams, opts ...option.RequestOption) (res *pagination.Cursor[NKSNodeVolume], err error)
List all volumes attached to an NKS node
func (*ClusterPoolNodeVolumeService) ListAutoPaging ¶
func (r *ClusterPoolNodeVolumeService) ListAutoPaging(ctx context.Context, clusterID string, poolID string, nodeID string, query ClusterPoolNodeVolumeListParams, opts ...option.RequestOption) *pagination.CursorAutoPager[NKSNodeVolume]
List all volumes attached to an NKS node
type ClusterPoolService ¶
type ClusterPoolService struct {
Options []option.RequestOption
Availability ClusterPoolAvailabilityService
Nodes ClusterPoolNodeService
}
ClusterPoolService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewClusterPoolService method instead.
func NewClusterPoolService ¶
func NewClusterPoolService(opts ...option.RequestOption) (r ClusterPoolService)
NewClusterPoolService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ClusterPoolService) Delete ¶
func (r *ClusterPoolService) Delete(ctx context.Context, clusterID string, poolID string, opts ...option.RequestOption) (res *operations.Operation, err error)
Delete an NKS node pool
func (*ClusterPoolService) Get ¶
func (r *ClusterPoolService) Get(ctx context.Context, clusterID string, poolID string, opts ...option.RequestOption) (res *NKSNodePool, err error)
Get details about an NKS node pool
func (*ClusterPoolService) List ¶
func (r *ClusterPoolService) List(ctx context.Context, clusterID string, query ClusterPoolListParams, opts ...option.RequestOption) (res *pagination.Cursor[NKSNodePool], err error)
List all node pools in an NKS cluster
func (*ClusterPoolService) ListAutoPaging ¶
func (r *ClusterPoolService) ListAutoPaging(ctx context.Context, clusterID string, query ClusterPoolListParams, opts ...option.RequestOption) *pagination.CursorAutoPager[NKSNodePool]
List all node pools in an NKS cluster
func (*ClusterPoolService) New ¶
func (r *ClusterPoolService) New(ctx context.Context, clusterID string, body ClusterPoolNewParams, opts ...option.RequestOption) (res *operations.Operation, err error)
Create a node pool in an NKS cluster
func (*ClusterPoolService) Update ¶
func (r *ClusterPoolService) Update(ctx context.Context, clusterID string, poolID string, body ClusterPoolUpdateParams, opts ...option.RequestOption) (res *operations.Operation, err error)
Update an NKS node pool
type ClusterPoolUpdateParams ¶
type ClusterPoolUpdateParams struct {
// Name of the node pool.
Name param.Opt[string] `json:"name,omitzero"`
// Number of nodes.
NodeCount param.Opt[int64] `json:"node_count,omitzero"`
// Partial node configuration update.
NodeConfig ClusterPoolUpdateParamsNodeConfig `json:"node_config,omitzero"`
// Tags to attach to the node pool.
Tags []string `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (ClusterPoolUpdateParams) MarshalJSON ¶
func (r ClusterPoolUpdateParams) MarshalJSON() (data []byte, err error)
func (*ClusterPoolUpdateParams) UnmarshalJSON ¶
func (r *ClusterPoolUpdateParams) UnmarshalJSON(data []byte) error
type ClusterPoolUpdateParamsNodeConfig ¶ added in v1.77.0
type ClusterPoolUpdateParamsNodeConfig struct {
// Kubernetes labels to apply to each node in the pool. Each entry is "key=value".
// When provided, the list fully replaces the current labels on the pool and on
// live nodes.
Labels []string `json:"labels,omitzero"`
// contains filtered or unexported fields
}
Partial node configuration update.
func (ClusterPoolUpdateParamsNodeConfig) MarshalJSON ¶ added in v1.77.0
func (r ClusterPoolUpdateParamsNodeConfig) MarshalJSON() (data []byte, err error)
func (*ClusterPoolUpdateParamsNodeConfig) UnmarshalJSON ¶ added in v1.77.0
func (r *ClusterPoolUpdateParamsNodeConfig) UnmarshalJSON(data []byte) error
type ClusterService ¶
type ClusterService struct {
Options []option.RequestOption
Availability ClusterAvailabilityService
PersistentVolumeClaims ClusterPersistentVolumeClaimService
Kubeconfig ClusterKubeconfigService
Controllers ClusterControllerService
LoadBalancers ClusterLoadBalancerService
Pools ClusterPoolService
}
ClusterService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewClusterService method instead.
func NewClusterService ¶
func NewClusterService(opts ...option.RequestOption) (r ClusterService)
NewClusterService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ClusterService) Delete ¶
func (r *ClusterService) Delete(ctx context.Context, clusterID string, opts ...option.RequestOption) (res *operations.Operation, err error)
Delete an NKS cluster
func (*ClusterService) Get ¶
func (r *ClusterService) Get(ctx context.Context, clusterID string, opts ...option.RequestOption) (res *NKSCluster, err error)
Get details about an NKS cluster
func (*ClusterService) List ¶
func (r *ClusterService) List(ctx context.Context, query ClusterListParams, opts ...option.RequestOption) (res *pagination.Cursor[NKSCluster], err error)
List all NKS clusters
func (*ClusterService) ListAutoPaging ¶
func (r *ClusterService) ListAutoPaging(ctx context.Context, query ClusterListParams, opts ...option.RequestOption) *pagination.CursorAutoPager[NKSCluster]
List all NKS clusters
func (*ClusterService) New ¶
func (r *ClusterService) New(ctx context.Context, body ClusterNewParams, opts ...option.RequestOption) (res *operations.Operation, err error)
Create an NKS Cluster
func (*ClusterService) Update ¶
func (r *ClusterService) Update(ctx context.Context, clusterID string, body ClusterUpdateParams, opts ...option.RequestOption) (res *NKSCluster, err error)
Update an NKS cluster
type ClusterUpdateParams ¶
type ClusterUpdateParams struct {
// Name of the Cluster.
Name param.Opt[string] `json:"name,omitzero"`
// Tags to attach to the Cluster.
Tags []string `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (ClusterUpdateParams) MarshalJSON ¶
func (r ClusterUpdateParams) MarshalJSON() (data []byte, err error)
func (*ClusterUpdateParams) UnmarshalJSON ¶
func (r *ClusterUpdateParams) UnmarshalJSON(data []byte) error
type Kubeconfig ¶
type Kubeconfig struct {
// Kubeconfig content for the Cluster.
Kubeconfig string `json:"kubeconfig" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Kubeconfig respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Kubeconfig for an NKS Cluster.
func (Kubeconfig) RawJSON ¶
func (r Kubeconfig) RawJSON() string
Returns the unmodified JSON received from the API
func (*Kubeconfig) UnmarshalJSON ¶
func (r *Kubeconfig) UnmarshalJSON(data []byte) error
type NKSCluster ¶
type NKSCluster struct {
// Unique identifier for the Cluster.
ID string `json:"id" api:"required"`
// When the Cluster was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Name of the Cluster.
Name string `json:"name" api:"required"`
// IDs of pools belonging to this Cluster.
PoolIDs []string `json:"pool_ids" api:"required"`
// Private IP (VIP) of the Cluster.
PrivateIP string `json:"private_ip" api:"required"`
// Project ID the Cluster belongs to.
ProjectID string `json:"project_id" api:"required"`
// Public IP of the Cluster.
PublicIP string `json:"public_ip" api:"required"`
// Region the resource is in.
//
// Any of "us-sva-1", "us-sva-2", "us-chi-1".
Region shared.RegionName `json:"region" api:"required"`
// Status of the resource.
//
// Any of "pending", "creating", "updating", "ready", "deleting", "deleted",
// "error".
Status shared.ResourceStatus `json:"status" api:"required"`
// Tags attached to the Cluster.
Tags []string `json:"tags" api:"required"`
// When the Cluster was last updated.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// ID of the VPC the Cluster is in.
VPCID string `json:"vpc_id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Name respjson.Field
PoolIDs respjson.Field
PrivateIP respjson.Field
ProjectID respjson.Field
PublicIP respjson.Field
Region respjson.Field
Status respjson.Field
Tags respjson.Field
UpdatedAt respjson.Field
VPCID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
NKS Cluster details.
func (NKSCluster) RawJSON ¶
func (r NKSCluster) RawJSON() string
Returns the unmodified JSON received from the API
func (*NKSCluster) UnmarshalJSON ¶
func (r *NKSCluster) UnmarshalJSON(data []byte) error
type NKSClusterList ¶
type NKSClusterList struct {
Items []NKSCluster `json:"items" api:"required"`
// Pagination response details.
Pagination shared.Pagination `json:"pagination" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
Pagination respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NKSClusterList) RawJSON ¶
func (r NKSClusterList) RawJSON() string
Returns the unmodified JSON received from the API
func (*NKSClusterList) UnmarshalJSON ¶
func (r *NKSClusterList) UnmarshalJSON(data []byte) error
type NKSController ¶ added in v1.57.0
type NKSController struct {
// Unique identifier for the controller.
ID string `json:"id" api:"required"`
// When the controller was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Instance type name.
InstanceType string `json:"instance_type" api:"required"`
// Name of the controller.
Name string `json:"name" api:"required"`
// Private IP address of the controller.
PrivateIP string `json:"private_ip" api:"required"`
// Status of the resource.
//
// Any of "pending", "creating", "updating", "ready", "deleting", "deleted",
// "error".
Status shared.ResourceStatus `json:"status" api:"required"`
// When the controller was last updated.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
InstanceType respjson.Field
Name respjson.Field
PrivateIP respjson.Field
Status respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
NKS controller details.
func (NKSController) RawJSON ¶ added in v1.57.0
func (r NKSController) RawJSON() string
Returns the unmodified JSON received from the API
func (*NKSController) UnmarshalJSON ¶ added in v1.57.0
func (r *NKSController) UnmarshalJSON(data []byte) error
type NKSControllerList ¶ added in v1.57.0
type NKSControllerList struct {
Items []NKSController `json:"items" api:"required"`
// Pagination response details.
Pagination shared.Pagination `json:"pagination" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
Pagination respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NKSControllerList) RawJSON ¶ added in v1.57.0
func (r NKSControllerList) RawJSON() string
Returns the unmodified JSON received from the API
func (*NKSControllerList) UnmarshalJSON ¶ added in v1.57.0
func (r *NKSControllerList) UnmarshalJSON(data []byte) error
type NKSControllerVolume ¶ added in v1.57.0
type NKSControllerVolume struct {
// Unique identifier for the volume.
ID string `json:"id" api:"required"`
// When the volume was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Volume kind.
//
// Any of "boot", "data".
Kind compute.VolumeKind `json:"kind" api:"required"`
// Name of the volume.
Name string `json:"name" api:"required"`
// Size of the volume in GB.
Size int64 `json:"size" api:"required"`
// Status of the resource.
//
// Any of "pending", "creating", "updating", "ready", "deleting", "deleted",
// "error".
Status shared.ResourceStatus `json:"status" api:"required"`
// Type of the Volume.
//
// Any of "nvme", "abs".
Type compute.VolumeType `json:"type" api:"required"`
// When the volume was last updated.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Kind respjson.Field
Name respjson.Field
Size respjson.Field
Status respjson.Field
Type respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
NKS controller volume details.
func (NKSControllerVolume) RawJSON ¶ added in v1.57.0
func (r NKSControllerVolume) RawJSON() string
Returns the unmodified JSON received from the API
func (*NKSControllerVolume) UnmarshalJSON ¶ added in v1.57.0
func (r *NKSControllerVolume) UnmarshalJSON(data []byte) error
type NKSControllerVolumeList ¶ added in v1.57.0
type NKSControllerVolumeList struct {
Items []NKSControllerVolume `json:"items" api:"required"`
// Pagination response details.
Pagination shared.Pagination `json:"pagination" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
Pagination respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NKSControllerVolumeList) RawJSON ¶ added in v1.57.0
func (r NKSControllerVolumeList) RawJSON() string
Returns the unmodified JSON received from the API
func (*NKSControllerVolumeList) UnmarshalJSON ¶ added in v1.57.0
func (r *NKSControllerVolumeList) UnmarshalJSON(data []byte) error
type NKSLoadBalancer ¶ added in v1.58.0
type NKSLoadBalancer struct {
// Unique identifier for the load balancer.
ID string `json:"id" api:"required"`
// Cluster this load balancer belongs to.
ClusterID string `json:"cluster_id" api:"required"`
// When the load balancer was first discovered.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Kubernetes namespace of the load balancer.
Namespace string `json:"namespace" api:"required"`
// Private IP address of the load balancer.
PrivateIP string `json:"private_ip" api:"required"`
// Public IP address assigned to this load balancer.
PublicIP string `json:"public_ip" api:"required"`
// Whether a public IP is enabled for this load balancer.
PublicIPEnabled bool `json:"public_ip_enabled" api:"required"`
// Kubernetes service name of the load balancer.
ServiceName string `json:"service_name" api:"required"`
// Status of the resource.
//
// Any of "pending", "creating", "updating", "ready", "deleting", "deleted",
// "error".
Status shared.ResourceStatus `json:"status" api:"required"`
// When the load balancer was last updated.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ClusterID respjson.Field
CreatedAt respjson.Field
Namespace respjson.Field
PrivateIP respjson.Field
PublicIP respjson.Field
PublicIPEnabled respjson.Field
ServiceName respjson.Field
Status respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
NKS load balancer details.
func (NKSLoadBalancer) RawJSON ¶ added in v1.58.0
func (r NKSLoadBalancer) RawJSON() string
Returns the unmodified JSON received from the API
func (*NKSLoadBalancer) UnmarshalJSON ¶ added in v1.58.0
func (r *NKSLoadBalancer) UnmarshalJSON(data []byte) error
type NKSLoadBalancerList ¶ added in v1.58.0
type NKSLoadBalancerList struct {
Items []NKSLoadBalancer `json:"items" api:"required"`
// Pagination response details.
Pagination shared.Pagination `json:"pagination" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
Pagination respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NKSLoadBalancerList) RawJSON ¶ added in v1.58.0
func (r NKSLoadBalancerList) RawJSON() string
Returns the unmodified JSON received from the API
func (*NKSLoadBalancerList) UnmarshalJSON ¶ added in v1.58.0
func (r *NKSLoadBalancerList) UnmarshalJSON(data []byte) error
type NKSNode ¶
type NKSNode struct {
// Unique identifier for the node.
ID string `json:"id" api:"required"`
// When the node was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Name of the node.
Name string `json:"name" api:"required"`
// Private IP address of the node.
PrivateIP string `json:"private_ip" api:"required"`
// Status of the resource.
//
// Any of "pending", "creating", "updating", "ready", "deleting", "deleted",
// "error".
Status shared.ResourceStatus `json:"status" api:"required"`
// When the node was last updated.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Name respjson.Field
PrivateIP respjson.Field
Status respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
NKS node details.
func (*NKSNode) UnmarshalJSON ¶
type NKSNodeList ¶
type NKSNodeList struct {
Items []NKSNode `json:"items" api:"required"`
// Pagination response details.
Pagination shared.Pagination `json:"pagination" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
Pagination respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NKSNodeList) RawJSON ¶
func (r NKSNodeList) RawJSON() string
Returns the unmodified JSON received from the API
func (*NKSNodeList) UnmarshalJSON ¶
func (r *NKSNodeList) UnmarshalJSON(data []byte) error
type NKSNodePool ¶
type NKSNodePool struct {
// Unique identifier for the node pool.
ID string `json:"id" api:"required"`
// ID of the Cluster this node pool belongs to.
ClusterID string `json:"cluster_id" api:"required"`
// When the node pool was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Name of the node pool.
Name string `json:"name" api:"required"`
// Node configuration.
NodeConfig NKSNodePoolNodeConfigResponse `json:"node_config" api:"required"`
// Number of nodes.
NodeCount int64 `json:"node_count" api:"required"`
// Status of the resource.
//
// Any of "pending", "creating", "updating", "ready", "deleting", "deleted",
// "error".
Status shared.ResourceStatus `json:"status" api:"required"`
// Tags attached to the node pool.
Tags []string `json:"tags" api:"required"`
// When the node pool was last updated.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ClusterID respjson.Field
CreatedAt respjson.Field
Name respjson.Field
NodeConfig respjson.Field
NodeCount respjson.Field
Status respjson.Field
Tags respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
NKS node pool details.
func (NKSNodePool) RawJSON ¶
func (r NKSNodePool) RawJSON() string
Returns the unmodified JSON received from the API
func (*NKSNodePool) UnmarshalJSON ¶
func (r *NKSNodePool) UnmarshalJSON(data []byte) error
type NKSNodePoolBootVolumeParam ¶ added in v1.56.0
type NKSNodePoolBootVolumeParam struct {
// Size of the boot volume in GB.
Size int64 `json:"size" api:"required"`
// Type of the Volume.
//
// Any of "nvme", "abs".
Type compute.VolumeType `json:"type,omitzero" api:"required"`
// contains filtered or unexported fields
}
Boot volume configuration.
The properties Size, Type are required.
func (NKSNodePoolBootVolumeParam) MarshalJSON ¶ added in v1.56.0
func (r NKSNodePoolBootVolumeParam) MarshalJSON() (data []byte, err error)
func (*NKSNodePoolBootVolumeParam) UnmarshalJSON ¶ added in v1.56.0
func (r *NKSNodePoolBootVolumeParam) UnmarshalJSON(data []byte) error
type NKSNodePoolBootVolumeResponse ¶ added in v1.56.0
type NKSNodePoolBootVolumeResponse struct {
// Size of the boot volume in GB.
Size int64 `json:"size" api:"required"`
// Type of the Volume.
//
// Any of "nvme", "abs".
Type compute.VolumeType `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Size respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Boot volume configuration.
func (NKSNodePoolBootVolumeResponse) RawJSON ¶ added in v1.56.0
func (r NKSNodePoolBootVolumeResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*NKSNodePoolBootVolumeResponse) UnmarshalJSON ¶ added in v1.56.0
func (r *NKSNodePoolBootVolumeResponse) UnmarshalJSON(data []byte) error
type NKSNodePoolList ¶
type NKSNodePoolList struct {
Items []NKSNodePool `json:"items" api:"required"`
// Pagination response details.
Pagination shared.Pagination `json:"pagination" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
Pagination respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NKSNodePoolList) RawJSON ¶
func (r NKSNodePoolList) RawJSON() string
Returns the unmodified JSON received from the API
func (*NKSNodePoolList) UnmarshalJSON ¶
func (r *NKSNodePoolList) UnmarshalJSON(data []byte) error
type NKSNodePoolNodeConfigParam ¶ added in v1.56.0
type NKSNodePoolNodeConfigParam struct {
// Boot volume configuration.
BootVolume NKSNodePoolBootVolumeParam `json:"boot_volume,omitzero" api:"required"`
// Instance type name used for worker nodes.
InstanceType string `json:"instance_type" api:"required"`
// Kubernetes labels to apply to each node in the pool. Each entry is "key=value".
// Keys under kubernetes.io, k8s.io, and nirvanalabs.io prefixes are reserved.
Labels []string `json:"labels,omitzero"`
// contains filtered or unexported fields
}
Node configuration.
The properties BootVolume, InstanceType are required.
func (NKSNodePoolNodeConfigParam) MarshalJSON ¶ added in v1.56.0
func (r NKSNodePoolNodeConfigParam) MarshalJSON() (data []byte, err error)
func (*NKSNodePoolNodeConfigParam) UnmarshalJSON ¶ added in v1.56.0
func (r *NKSNodePoolNodeConfigParam) UnmarshalJSON(data []byte) error
type NKSNodePoolNodeConfigResponse ¶ added in v1.56.0
type NKSNodePoolNodeConfigResponse struct {
// Boot volume configuration.
BootVolume NKSNodePoolBootVolumeResponse `json:"boot_volume" api:"required"`
// Instance type name.
InstanceType string `json:"instance_type" api:"required"`
// Kubernetes labels applied to each node in the pool. Each entry is "key=value".
Labels []string `json:"labels" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BootVolume respjson.Field
InstanceType respjson.Field
Labels respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Node configuration.
func (NKSNodePoolNodeConfigResponse) RawJSON ¶ added in v1.56.0
func (r NKSNodePoolNodeConfigResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*NKSNodePoolNodeConfigResponse) UnmarshalJSON ¶ added in v1.56.0
func (r *NKSNodePoolNodeConfigResponse) UnmarshalJSON(data []byte) error
type NKSNodeVolume ¶
type NKSNodeVolume struct {
// Unique identifier for the volume.
ID string `json:"id" api:"required"`
// When the volume was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Volume kind.
//
// Any of "boot", "data".
Kind compute.VolumeKind `json:"kind" api:"required"`
// Name of the volume.
Name string `json:"name" api:"required"`
// Size of the volume in GB.
Size int64 `json:"size" api:"required"`
// Status of the resource.
//
// Any of "pending", "creating", "updating", "ready", "deleting", "deleted",
// "error".
Status shared.ResourceStatus `json:"status" api:"required"`
// Type of the Volume.
//
// Any of "nvme", "abs".
Type compute.VolumeType `json:"type" api:"required"`
// When the volume was last updated.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Kind respjson.Field
Name respjson.Field
Size respjson.Field
Status respjson.Field
Type respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
NKS node volume details.
func (NKSNodeVolume) RawJSON ¶
func (r NKSNodeVolume) RawJSON() string
Returns the unmodified JSON received from the API
func (*NKSNodeVolume) UnmarshalJSON ¶
func (r *NKSNodeVolume) UnmarshalJSON(data []byte) error
type NKSNodeVolumeList ¶
type NKSNodeVolumeList struct {
Items []NKSNodeVolume `json:"items" api:"required"`
// Pagination response details.
Pagination shared.Pagination `json:"pagination" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
Pagination respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NKSNodeVolumeList) RawJSON ¶
func (r NKSNodeVolumeList) RawJSON() string
Returns the unmodified JSON received from the API
func (*NKSNodeVolumeList) UnmarshalJSON ¶
func (r *NKSNodeVolumeList) UnmarshalJSON(data []byte) error
type NKSService ¶
type NKSService struct {
Options []option.RequestOption
Clusters ClusterService
}
NKSService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewNKSService method instead.
func NewNKSService ¶
func NewNKSService(opts ...option.RequestOption) (r NKSService)
NewNKSService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type Pagination ¶
type Pagination = shared.Pagination
Pagination response details.
This is an alias to an internal type.
type PersistentVolumeClaim ¶ added in v1.68.0
type PersistentVolumeClaim struct {
// Unique identifier for the persistent volume claim.
ID string `json:"id" api:"required"`
// Cluster this persistent volume claim belongs to.
ClusterID string `json:"cluster_id" api:"required"`
// When the persistent volume claim was first discovered.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Name of the persistent volume claim.
Name string `json:"name" api:"required"`
// Size of the persistent volume claim in GB.
Size int64 `json:"size" api:"required"`
// Status of the resource.
//
// Any of "pending", "creating", "updating", "ready", "deleting", "deleted",
// "error".
Status shared.ResourceStatus `json:"status" api:"required"`
// Type of the Volume.
//
// Any of "nvme", "abs".
Type compute.VolumeType `json:"type" api:"required"`
// When the persistent volume claim was last updated.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ClusterID respjson.Field
CreatedAt respjson.Field
Name respjson.Field
Size respjson.Field
Status respjson.Field
Type respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
NKS persistent volume claim details.
func (PersistentVolumeClaim) RawJSON ¶ added in v1.68.0
func (r PersistentVolumeClaim) RawJSON() string
Returns the unmodified JSON received from the API
func (*PersistentVolumeClaim) UnmarshalJSON ¶ added in v1.68.0
func (r *PersistentVolumeClaim) UnmarshalJSON(data []byte) error
type PersistentVolumeClaimList ¶ added in v1.68.0
type PersistentVolumeClaimList struct {
Items []PersistentVolumeClaim `json:"items" api:"required"`
// Pagination response details.
Pagination shared.Pagination `json:"pagination" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
Pagination respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (PersistentVolumeClaimList) RawJSON ¶ added in v1.68.0
func (r PersistentVolumeClaimList) RawJSON() string
Returns the unmodified JSON received from the API
func (*PersistentVolumeClaimList) UnmarshalJSON ¶ added in v1.68.0
func (r *PersistentVolumeClaimList) UnmarshalJSON(data []byte) error
type RegionName ¶
type RegionName = shared.RegionName
Region the resource is in.
This is an alias to an internal type.
type ResourceStatus ¶
type ResourceStatus = shared.ResourceStatus
Status of the resource.
This is an alias to an internal type.
type SourceIPRuleParam ¶
type SourceIPRuleParam = shared.SourceIPRuleParam
IP filter rules.
This is an alias to an internal type.
type SourceIPRuleResponse ¶ added in v1.54.0
type SourceIPRuleResponse = shared.SourceIPRuleResponse
IP filter rules.
This is an alias to an internal type.