Documentation ¶
Index ¶
- Constants
- func DestroyCluster(ctx context.Context, api API, clusterId string) error
- func DialPort(ctx context.Context, cluster *KubernetesCluster, targetPort int) (net.Conn, error)
- func DialPortWithToken(ctx context.Context, token *auth.Token, cluster *KubernetesCluster, ...) (net.Conn, error)
- func FetchTenantToken(ctx context.Context) (*auth.Token, error)
- func Register()
- func RegistryCreds(ctx context.Context) (*authn.Basic, error)
- func SetupFlags(flags *pflag.FlagSet, hide bool)
- func TailClusterLogs(ctx context.Context, api API, opts *LogsOpts, w io.Writer) error
- func UserSSHKeys() (compute.Computable[[]string], error)
- type API
- type Attachment
- type BuildCluster
- type BuildCluster_ColocatedPort
- type ClusterShape
- type CreateClusterOpts
- type CreateClusterResult
- type CreateKubernetesClusterRequest
- type CreateKubernetesClusterResponse
- type DestroyKubernetesClusterRequest
- type GetKubernetesClusterRequest
- type GetKubernetesClusterResponse
- type GetLogsRequest
- type GetLogsResponse
- type ImageRegistry
- type KubernetesCluster
- type KubernetesClusterList
- type LabelEntry
- type ListKubernetesClustersRequest
- type LogBlock
- type LogLine
- type LogsOpts
- type LogsSelector
- type StartCreateKubernetesClusterResponse
- type TailLogsRequest
- type WaitKubernetesClusterRequest
Constants ¶
View Source
const AdminScope = "admin"
Variables ¶
This section is empty.
Functions ¶
func DialPortWithToken ¶ added in v0.0.165
func FetchTenantToken ¶ added in v0.0.165
func RegistryCreds ¶ added in v0.0.166
func SetupFlags ¶ added in v0.0.164
func TailClusterLogs ¶ added in v0.0.168
func UserSSHKeys ¶
func UserSSHKeys() (compute.Computable[[]string], error)
Types ¶
type API ¶ added in v0.0.103
type API struct { StartCreateKubernetesCluster fnapi.Call[CreateKubernetesClusterRequest] GetKubernetesCluster fnapi.Call[GetKubernetesClusterRequest] WaitKubernetesCluster fnapi.Call[WaitKubernetesClusterRequest] ListKubernetesClusters fnapi.Call[ListKubernetesClustersRequest] DestroyKubernetesCluster fnapi.Call[DestroyKubernetesClusterRequest] TailClusterLogs fnapi.Call[TailLogsRequest] GetClusterLogs fnapi.Call[GetLogsRequest] }
var Endpoint API
type Attachment ¶ added in v0.0.167
type BuildCluster ¶
type BuildCluster struct {
Colocated *BuildCluster_ColocatedPort `json:"colocated,omitempty"`
}
type ClusterShape ¶
type CreateClusterOpts ¶ added in v0.0.135
type CreateClusterOpts struct { MachineType string Ephemeral bool // Whether to keep the cluster alive, regardless of it being ephemeral. // This is typically needed if you want to execute multiple ns commands on an ephemeral cluster. KeepAlive bool Purpose string Features []string AuthorizedSshKeys []string }
type CreateClusterResult ¶
type CreateClusterResult struct { ClusterId string Cluster *KubernetesCluster Registry *ImageRegistry BuildCluster *BuildCluster Deadline *time.Time }
func CreateAndWaitCluster ¶
func CreateAndWaitCluster(ctx context.Context, api API, opts CreateClusterOpts) (*CreateClusterResult, error)
func EnsureBuildCluster ¶ added in v0.0.166
func EnsureBuildCluster(ctx context.Context, api API) (*CreateClusterResult, error)
func WaitCluster ¶
type CreateKubernetesClusterRequest ¶
type CreateKubernetesClusterRequest struct { OpaqueUserAuth []byte `json:"opaque_user_auth,omitempty"` Ephemeral bool `json:"ephemeral,omitempty"` DocumentedPurpose string `json:"documented_purpose,omitempty"` AuthorizedSshKeys []string `json:"authorized_ssh_keys,omitempty"` MachineType string `json:"machine_type,omitempty"` Feature []string `json:"feature,omitempty"` Attachment []Attachment `json:"attachment,omitempty"` }
type CreateKubernetesClusterResponse ¶
type CreateKubernetesClusterResponse struct { Status string `json:"status,omitempty"` ClusterId string `json:"cluster_id,omitempty"` Cluster *KubernetesCluster `json:"cluster,omitempty"` Registry *ImageRegistry `json:"registry,omitempty"` BuildCluster *BuildCluster `json:"build_cluster,omitempty"` Deadline string `json:"deadline,omitempty"` }
type GetKubernetesClusterResponse ¶
type GetKubernetesClusterResponse struct { Cluster *KubernetesCluster `json:"cluster,omitempty"` Registry *ImageRegistry `json:"registry,omitempty"` BuildCluster *BuildCluster `json:"build_cluster,omitempty"` Deadline string `json:"deadline,omitempty"` }
func GetCluster ¶
type GetLogsRequest ¶ added in v0.0.168
type GetLogsResponse ¶ added in v0.0.168
type GetLogsResponse struct {
LogBlock []LogBlock `json:"log_block,omitempty"`
}
func GetClusterLogs ¶ added in v0.0.168
type ImageRegistry ¶
type KubernetesCluster ¶
type KubernetesCluster struct { ClusterId string `json:"cluster_id,omitempty"` Created string `json:"created,omitempty"` DestroyedAt string `json:"destroyed_at,omitempty"` Deadline string `json:"deadline,omitempty"` SSHProxyEndpoint string `json:"ssh_proxy_endpoint,omitempty"` SshPrivateKey []byte `json:"ssh_private_key,omitempty"` DocumentedPurpose string `json:"documented_purpose,omitempty"` Shape *ClusterShape `json:"shape,omitempty"` EndpointAddress string `json:"endpoint_address,omitempty"` CertificateAuthorityData []byte `json:"certificate_authority_data,omitempty"` ClientCertificateData []byte `json:"client_certificate_data,omitempty"` ClientKeyData []byte `json:"client_key_data,omitempty"` KubernetesDistribution string `json:"kubernetes_distribution,omitempty"` Platform []string `json:"platform,omitempty"` IngressDomain string `json:"ingress_domain,omitempty"` Label []*LabelEntry `json:"label,omitempty"` }
type KubernetesClusterList ¶
type KubernetesClusterList struct {
Clusters []KubernetesCluster `json:"cluster"`
}
func ListClusters ¶
type LabelEntry ¶
type LogLine ¶ added in v0.0.168
type LogsSelector ¶ added in v0.0.168
type StartCreateKubernetesClusterResponse ¶
type StartCreateKubernetesClusterResponse struct { ClusterId string `json:"cluster_id,omitempty"` ClusterFragment *KubernetesCluster `json:"cluster_fragment,omitempty"` Registry *ImageRegistry `json:"registry,omitempty"` Deadline string `json:"deadline,omitempty"` }
func CreateCluster ¶
func CreateCluster(ctx context.Context, api API, opts CreateClusterOpts) (*StartCreateKubernetesClusterResponse, error)
type TailLogsRequest ¶ added in v0.0.168
type TailLogsRequest struct { ClusterID string `json:"cluster_id,omitempty"` Selector *LogsSelector `json:"selector,omitempty"` }
Click to show internal directories.
Click to hide internal directories.