api

package
v0.0.357 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultKeychain oci.Keychain = defaultKeychain{}
View Source
var (
	Methods = MakeAPI()
)

Functions

func DestroyCluster

func DestroyCluster(ctx context.Context, api API, clusterId string) error

func DestroyVolume added in v0.0.334

func DestroyVolume(ctx context.Context, api API, id string) error

func DestroyVolumeByTag added in v0.0.299

func DestroyVolumeByTag(ctx context.Context, api API, tag string) error

func DialEndpoint added in v0.0.188

func DialEndpoint(ctx context.Context, endpoint string, opts ...Option) (net.Conn, error)

func DialEndpointWithToken added in v0.0.188

func DialEndpointWithToken(ctx context.Context, token fnapi.Token, endpoint string, opts ...Option) (net.Conn, error)

func DialHostedServiceWithToken added in v0.0.202

func DialHostedServiceWithToken(ctx context.Context, token fnapi.Token, cluster *KubernetesCluster, serviceName string, vars url.Values) (net.Conn, error)

func DialPort

func DialPort(ctx context.Context, cluster *KubernetesCluster, targetPort int) (net.Conn, error)

func DialPortWithToken added in v0.0.165

func DialPortWithToken(ctx context.Context, token fnapi.Token, cluster *KubernetesCluster, targetPort int) (net.Conn, error)

func EnsureBuildCluster added in v0.0.166

func EnsureBuildCluster(ctx context.Context, platform BuildPlatform) (*builderv1beta.EnsureBuildInstanceResponse, error)

func RegistryCreds added in v0.0.166

func RegistryCreds(ctx context.Context) (*authn.Basic, error)

func StartBackgroundRefreshing added in v0.0.215

func StartBackgroundRefreshing(ctx context.Context, clusterID string) func()

func StartRefreshing added in v0.0.181

func StartRefreshing(ctx context.Context, api API, clusterId string, handle func(error) error) error

func TailClusterLogs added in v0.0.168

func TailClusterLogs(ctx context.Context, api API, opts *LogsOpts, handle func(LogBlock) error) error

Types

type API added in v0.0.103

type API struct {
	StartCreateKubernetesCluster fnapi.Call[CreateKubernetesClusterRequest]
	CreateContainers             fnapi.Call[CreateContainersRequest]
	StartContainers              fnapi.Call[StartContainersRequest]
	GetKubernetesCluster         fnapi.Call[GetKubernetesClusterRequest]
	EnsureKubernetesCluster      fnapi.Call[EnsureKubernetesClusterRequest]
	WaitKubernetesCluster        fnapi.Call[WaitKubernetesClusterRequest]
	ListKubernetesClusters       fnapi.Call[ListKubernetesClustersRequest]
	DestroyKubernetesCluster     fnapi.Call[DestroyKubernetesClusterRequest]
	SuspendKubernetesCluster     fnapi.Call[SuspendKubernetesClusterRequest]
	ReleaseKubernetesCluster     fnapi.Call[ReleaseKubernetesClusterRequest]
	WakeKubernetesCluster        fnapi.Call[WakeKubernetesClusterRequest]
	RefreshKubernetesCluster     fnapi.Call[RefreshKubernetesClusterRequest]
	GetKubernetesClusterSummary  fnapi.Call[GetKubernetesClusterSummaryRequest]
	GetKubernetesConfig          fnapi.Call[GetKubernetesConfigRequest]
	GetImageRegistry             fnapi.Call[emptypb.Empty]
	TailClusterLogs              fnapi.Call[TailLogsRequest]
	GetClusterLogs               fnapi.Call[GetLogsRequest]
	GetProfile                   fnapi.Call[emptypb.Empty]
	RegisterIngress              fnapi.Call[RegisterIngressRequest]
	ListIngresses                fnapi.Call[ListIngressesRequest]
	ListVolumes                  fnapi.Call[emptypb.Empty]
	DestroyVolume                fnapi.Call[DestroyVolumeRequest]
	DestroyVolumeByTag           fnapi.Call[DestroyVolumeByTagRequest]
}

func MakeAPI added in v0.0.103

func MakeAPI() API

type Attachment added in v0.0.167

type Attachment struct {
	TypeURL string `json:"type_url,omitempty"`
	Content []byte `json:"content,omitempty"`
}

type BuildCluster

type BuildCluster struct {
	Colocated             *BuildCluster_ColocatedPort `json:"colocated,omitempty"`
	Resumable             bool                        `json:"resumable,omitempty"`
	DoesNotRequireRefresh bool                        `json:"does_not_require_refresh,omitempty"`
}

type BuildCluster_ColocatedPort

type BuildCluster_ColocatedPort struct {
	TargetPort int32  `json:"target_port,omitempty"`
	ClusterId  string `json:"cluster_id,omitempty"`
}

type BuildPlatform added in v0.0.221

type BuildPlatform string

func ParseBuildPlatform added in v0.0.221

func ParseBuildPlatform(value string) (BuildPlatform, error)

type ClusterShape

type ClusterShape struct {
	VirtualCpu      int32  `json:"virtual_cpu,omitempty"`
	MemoryMegabytes int32  `json:"memory_megabytes,omitempty"`
	MachineArch     string `json:"machine_arch,omitempty"`
}

type Cluster_ServiceState added in v0.0.188

type Cluster_ServiceState struct {
	Name     string `json:"name,omitempty"`
	Status   string `json:"status,omitempty"`
	Endpoint string `json:"endpoint,omitempty"` // Service-specific endpoint.
	Public   bool   `json:"public,omitempty"`
}

func ClusterService added in v0.0.188

func ClusterService(cluster *KubernetesCluster, name string) *Cluster_ServiceState

type ComposeRequest added in v0.0.203

type ComposeRequest struct {
	Contents []byte `json:"contents,omitempty"`
}

type Container added in v0.0.203

type Container struct {
	Id           string                             `json:"id,omitempty"`
	Name         string                             `json:"name,omitempty"`
	ExportedPort []*Container_ExportedContainerPort `json:"exported_port,omitempty"`
}

type ContainerPort added in v0.0.203

type ContainerPort struct {
	Proto         string                         `json:"proto,omitempty"`
	Port          int32                          `json:"port,omitempty"`
	HttpMatchRule []*ContainerPort_HttpMatchRule `json:"http_match_rule,omitempty"`
}

type ContainerPort_HttpMatch added in v0.0.223

type ContainerPort_HttpMatch struct {
	Method []string `json:"method,omitempty"` // If empty, matches any method.
	Path   string   `json:"path,omitempty"`   // If empty, matches any path.
}

type ContainerPort_HttpMatchRule added in v0.0.223

type ContainerPort_HttpMatchRule struct {
	Match              *ContainerPort_HttpMatch `json:"match,omitempty"`
	DoesNotRequireAuth bool                     `json:"does_not_require_auth,omitempty"`
}

type ContainerRequest added in v0.0.197

type ContainerRequest struct {
	Name           string            `json:"name,omitempty"`
	Image          string            `json:"image,omitempty"`
	Args           []string          `json:"args,omitempty"`
	Env            map[string]string `json:"env,omitempty"`
	Flag           []string          `json:"flag,omitempty"`
	ExportPort     []*ContainerPort  `json:"export_port,omitempty"`
	DockerSockPath string            `json:"docker_sock_path,omitempty"`
	NscStatePath   string            `json:"nsc_state_path,omitempty"`
	ExposeNscBins  string            `json:"expose_nsc_bins,omitempty"`
	Network        string            `json:"network,omitempty"`
	Experimental   any               `json:"experimental,omitempty"`
}

type Container_ExportedContainerPort added in v0.0.203

type Container_ExportedContainerPort struct {
	Proto         string                         `json:"proto,omitempty"`
	ContainerPort int32                          `json:"container_port,omitempty"`
	ExportedPort  int32                          `json:"exported_port,omitempty"` // Port exposed within the guest.
	IngressFqdn   string                         `json:"ingress_fqdn,omitempty"`
	HttpMatchRule []*ContainerPort_HttpMatchRule `json:"http_match_rule,omitempty"`
}

type CreateClusterOpts added in v0.0.135

type CreateClusterOpts struct {
	MachineType string

	// 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.
	KeepAtExit bool

	Purpose           string
	Features          []string
	AuthorizedSshKeys []string
	UniqueTag         string
	InternalExtra     string
	Labels            map[string]string
	Deadline          *timestamppb.Timestamp
	Experimental      any
	Volumes           []VolumeSpec
	SecretIDs         []string
	Interactive       bool

	WaitClusterOpts
}

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 WaitClusterReady added in v0.0.287

func WaitClusterReady(ctx context.Context, api API, clusterId string, opts WaitClusterOpts) (*CreateClusterResult, error)

type CreateContainersRequest added in v0.0.197

type CreateContainersRequest struct {
	MachineType     string                 `json:"machine_type,omitempty"`
	Container       []*ContainerRequest    `json:"container,omitempty"`
	Compose         []*ComposeRequest      `json:"compose,omitempty"`
	Interactive     bool                   `json:"interactive,omitempty"`
	DevelopmentMode bool                   `json:"development_mode,omitempty"`
	Feature         []string               `json:"feature,omitempty"`
	Label           []*LabelEntry          `json:"label,omitempty"`
	InternalExtra   string                 `json:"internal_extra,omitempty"`
	Deadline        *timestamppb.Timestamp `json:"deadline,omitempty"`
	Experimental    any                    `json:"experimental,omitempty"`
}

type CreateContainersResponse added in v0.0.197

type CreateContainersResponse struct {
	ClusterId  string       `json:"cluster_id,omitempty"`
	ClusterUrl string       `json:"cluster_url,omitempty"`
	Container  []*Container `json:"container,omitempty"`
}

type CreateKubernetesClusterRequest

type CreateKubernetesClusterRequest struct {
	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"`
	Interactive       bool                   `json:"interactive,omitempty"`
	Label             []*LabelEntry          `json:"label,omitempty"`
	UniqueTag         string                 `json:"unique_tag,omitempty"`
	InternalExtra     string                 `json:"internal_extra,omitempty"`
	Deadline          *timestamppb.Timestamp `json:"deadline,omitempty"`
	Experimental      any                    `json:"experimental,omitempty"`
	AvailableSecrets  []*SecretRef           `json:"available_secrets,omitempty"`
	Volumes           []VolumeSpec           `json:"volume,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 DestroyKubernetesClusterRequest

type DestroyKubernetesClusterRequest struct {
	ClusterId string `json:"cluster_id,omitempty"`
}

type DestroyVolumeByTagRequest added in v0.0.299

type DestroyVolumeByTagRequest struct {
	Tag string `json:"tag,omitempty"`
}

type DestroyVolumeRequest added in v0.0.334

type DestroyVolumeRequest struct {
	Id string `json:"volume_id,omitempty"`
}

type EnsureKubernetesClusterRequest added in v0.0.204

type EnsureKubernetesClusterRequest struct {
	ClusterId string `json:"cluster_id,omitempty"`
}

type ExportedInstancePort added in v0.0.271

type ExportedInstancePort struct {
	Proto         string                         `json:"proto,omitempty"`
	Port          int32                          `json:"port,omitempty"`
	IngressFqdn   string                         `json:"ingress_fqdn,omitempty"`
	HttpMatchRule []*ContainerPort_HttpMatchRule `json:"http_match_rule,omitempty"`
	Description   string                         `json:"description,omitempty"`
}

type GetImageRegistryResponse added in v0.0.183

type GetImageRegistryResponse struct {
	Registry      *ImageRegistry   `json:"registry,omitempty"`
	NSCR          *ImageRegistry   `json:"nscr,omitempty"`
	ExtraRegistry []*ImageRegistry `json:"extra_registry,omitempty"`
}

func GetImageRegistry added in v0.0.183

func GetImageRegistry(ctx context.Context, api API) (*GetImageRegistryResponse, error)

type GetKubernetesClusterRequest

type GetKubernetesClusterRequest struct {
	ClusterId string `json:"cluster_id,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 EnsureCluster added in v0.0.204

func EnsureCluster(ctx context.Context, api API, clusterId string) (*GetKubernetesClusterResponse, error)

func GetCluster

func GetCluster(ctx context.Context, api API, clusterId string) (*GetKubernetesClusterResponse, error)

type GetKubernetesClusterSummaryRequest added in v0.0.214

type GetKubernetesClusterSummaryRequest struct {
	ClusterId string   `json:"cluster_id,omitempty"`
	Resource  []string `json:"resource,omitempty"`
}

type GetKubernetesClusterSummaryResponse added in v0.0.214

type GetKubernetesClusterSummaryResponse struct {
	Summary []ResourceSummary `json:"summary,omitempty"`
}

func GetClusterSummary added in v0.0.214

func GetClusterSummary(ctx context.Context, api API, clusterId string, resources []string) (*GetKubernetesClusterSummaryResponse, error)

type GetKubernetesConfigRequest added in v0.0.197

type GetKubernetesConfigRequest struct {
	ClusterId string `json:"cluster_id,omitempty"`
}

type GetKubernetesConfigResponse added in v0.0.197

type GetKubernetesConfigResponse struct {
	Kubeconfig string `json:"kubeconfig,omitempty"`
}

func GetKubernetesConfig added in v0.0.197

func GetKubernetesConfig(ctx context.Context, api API, clusterId string) (*GetKubernetesConfigResponse, error)

type GetLogsRequest added in v0.0.168

type GetLogsRequest struct {
	ClusterID      string          `json:"cluster_id,omitempty"`
	UseBlockLabels bool            `json:"use_block_labels,omitempty"`
	StartTs        *time.Time      `json:"start_ts,omitempty"`
	EndTs          *time.Time      `json:"end_ts,omitempty"`
	Include        []*LogsSelector `json:"include,omitempty"`
	Exclude        []*LogsSelector `json:"exclude,omitempty"`
}

type GetLogsResponse added in v0.0.168

type GetLogsResponse struct {
	LogBlock []LogBlock `json:"log_block,omitempty"`
}

func GetClusterLogs added in v0.0.168

func GetClusterLogs(ctx context.Context, api API, opts *LogsOpts) (*GetLogsResponse, error)

type GetProfileResponse added in v0.0.198

type GetProfileResponse struct {
	ClusterPlatform []string `json:"cluster_platform,omitempty"`
}

func GetProfile added in v0.0.198

func GetProfile(ctx context.Context, api API) (*GetProfileResponse, error)

type GithubWorkflowInfo added in v0.0.175

type GithubWorkflowInfo struct {
	Repository string `json:"repository,omitempty"`
	RunId      string `json:"run_id,omitempty"`
	RunAttempt string `json:"run_attempt,omitempty"`
	Sha        string `json:"sha,omitempty"`
	Ref        string `json:"ref,omitempty"`
	Actor      string `json:"actor,omitempty"`
	Workflow   string `json:"workflow,omitempty"`
}

type ImageRegistry

type ImageRegistry struct {
	EndpointAddress string `json:"endpoint_address,omitempty"`
	Repository      string `json:"repository,omitempty"`
}

type IngressBackendEndpoint added in v0.0.200

type IngressBackendEndpoint struct {
	IpAddr string `json:"ip_addr,omitempty"`
	Port   int32  `json:"port,omitempty"`
}

type KubernetesCluster

type KubernetesCluster struct {
	AppURL            string        `json:"app_url,omitempty"`
	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"`

	CreatorId      string              `json:"creator_id,omitempty"`
	GithubWorkflow *GithubWorkflowInfo `json:"github_workflow,omitempty"`

	ServiceState []*Cluster_ServiceState `json:"service_state,omitempty"`

	TlsBackedPort []*KubernetesCluster_TlsBackedPort `json:"tls_backed_port,omitempty"`
}

type KubernetesClusterMetadata added in v0.0.176

type KubernetesClusterMetadata struct {
	ClusterId         string        `json:"cluster_id,omitempty"`
	Created           string        `json:"created,omitempty"`
	DestroyedAt       string        `json:"destroyed_at,omitempty"`
	Deadline          string        `json:"deadline,omitempty"`
	DocumentedPurpose string        `json:"documented_purpose,omitempty"`
	Shape             *ClusterShape `json:"shape,omitempty"`

	KubernetesDistribution string   `json:"kubernetes_distribution,omitempty"`
	Platform               []string `json:"platform,omitempty"`

	IngressDomain string `json:"ingress_domain,omitempty"`

	Label     []*LabelEntry     `json:"label,omitempty"`
	UserLabel map[string]string `json:"user_label,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`

	CreatorId      string              `json:"creator_id,omitempty"`
	GithubWorkflow *GithubWorkflowInfo `json:"github_workflow,omitempty"`
}

type KubernetesCluster_TlsBackedPort added in v0.0.246

type KubernetesCluster_TlsBackedPort struct {
	Name       string `json:"name,omitempty"`
	Port       int32  `json:"port,omitempty"`
	ServerName string `json:"server_name,omitempty"`
}

type LabelEntry

type LabelEntry struct {
	Name  string `json:"name,omitempty"`
	Value string `json:"value,omitempty"`
}

type LabelFilterEntry added in v0.0.207

type LabelFilterEntry struct {
	Name  string `json:"name,omitempty"`
	Value string `json:"value,omitempty"`
	Op    string `json:"op,omitempty"`
}

type ListIngressesRequest added in v0.0.271

type ListIngressesRequest struct {
	ClusterId string `json:"cluster_id,omitempty"`
}

type ListIngressesResponse added in v0.0.271

type ListIngressesResponse struct {
	ExportedInstancePort []*ExportedInstancePort `json:"exported_instance_port,omitempty"`
}

func ListIngresses added in v0.0.271

func ListIngresses(ctx context.Context, api API, clusterID string) (*ListIngressesResponse, error)

type ListKubernetesClustersRequest

type ListKubernetesClustersRequest struct {
	IncludePreviousRuns bool                `json:"include_previous_runs,omitempty"`
	PaginationCursor    []byte              `json:"pagination_cursor,omitempty"`
	MaxEntries          int64               `json:"max_entries,omitempty"`
	NotOlderThan        *time.Time          `json:"not_older_than,omitempty"`
	KindFilter          string              `json:"kind_filter,omitempty"`
	LabelFilter         []*LabelFilterEntry `json:"label_filter,omitempty"`
}

type ListKubernetesClustersResponse added in v0.0.176

type ListKubernetesClustersResponse struct {
	Clusters []KubernetesClusterMetadata `json:"cluster"`
}

func ListClusters

func ListClusters(ctx context.Context, api API, opts ListOpts) (*ListKubernetesClustersResponse, error)

type ListOpts added in v0.0.208

type ListOpts struct {
	PreviousRuns bool
	NotOlderThan *time.Time
	Labels       map[string]string
	All          bool
}

type ListVolumesResponse added in v0.0.299

type ListVolumesResponse struct {
	Volume []*Volume `json:"volume,omitempty"`
}

func ListVolumes added in v0.0.299

func ListVolumes(ctx context.Context, api API) (*ListVolumesResponse, error)

type LogBlock added in v0.0.168

type LogBlock struct {
	Line   []LogLine         `json:"line,omitempty"`
	Labels map[string]string `json:"labels,omitempty"`
}

type LogLine added in v0.0.168

type LogLine struct {
	Timestamp time.Time `json:"timestamp,omitempty"`
	Content   string    `json:"content,omitempty"`
	Stream    string    `json:"stream,omitempty"`
}

func (LogLine) String added in v0.0.168

func (l LogLine) String() string

type LogsOpts added in v0.0.168

type LogsOpts struct {
	ClusterID     string
	StartTs       *time.Time
	EndTs         *time.Time
	Include       []*LogsSelector
	Exclude       []*LogsSelector
	IngressDomain string
}

type LogsSelector added in v0.0.168

type LogsSelector struct {
	Source        string `json:"source,omitempty"`
	Namespace     string `json:"namespace,omitempty"`
	PodName       string `json:"pod_name,omitempty"`
	ContainerName string `json:"container_name,omitempty"`
	ContainerID   string `json:"container_id,omitempty"`
}

type Option added in v0.0.215

type Option func(*dialOptions)

func WithRefresh added in v0.0.215

func WithRefresh(clusterID string) Option

type RefreshKubernetesClusterRequest added in v0.0.181

type RefreshKubernetesClusterRequest struct {
	ClusterId         string `json:"cluster_id,omitempty"`
	ExtendBySecs      int32  `json:"extend_by_secs,omitempty"`
	EnsureMinimumSecs int32  `json:"ensure_minimum_secs,omitempty"`
}

type RefreshKubernetesClusterResponse added in v0.0.181

type RefreshKubernetesClusterResponse struct {
	NewDeadline string `json:"new_deadline,omitempty"`
}

func RefreshCluster added in v0.0.181

type RegisterIngressRequest added in v0.0.226

type RegisterIngressRequest struct {
	ClusterId       string                         `json:"cluster_id,omitempty"`
	Name            string                         `json:"name,omitempty"`
	BackendEndpoint *IngressBackendEndpoint        `json:"backend_endpoint,omitempty"`
	HttpMatchRule   []*ContainerPort_HttpMatchRule `json:"http_match_rule,omitempty"`
}

type RegisterIngressResponse added in v0.0.226

type RegisterIngressResponse struct {
	Fqdn string `json:"fqdn,omitempty"`
}

func RegisterIngress added in v0.0.226

func RegisterIngress(ctx context.Context, api API, req RegisterIngressRequest) (*RegisterIngressResponse, error)

type ReleaseKubernetesClusterRequest added in v0.0.187

type ReleaseKubernetesClusterRequest struct {
	ClusterId string `json:"cluster_id,omitempty"`
}

type Resource added in v0.0.214

type Resource struct {
	Namespace    string                          `json:"namespace,omitempty"`
	Name         string                          `json:"name,omitempty"`
	Uid          string                          `json:"uid,omitempty"` // Union value - depends on resource type.
	Parent       []*ResourceSummary_Resource_Ref `json:"parent,omitempty"`
	CreationTime *time.Time                      `json:"creation_time,omitempty"`
	UpdatedTime  *time.Time                      `json:"updated_time,omitempty"`
	Tombstone    *time.Time                      `json:"tombstone,omitempty"` // If set, the resource has been removed.
	// For pods.
	Container []*ResourceSummary_Resource_Container `json:"container,omitempty"`
	Phase     string                                `json:"phase,omitempty"`
	// For apps.
	ReplicaCount       string `json:"replica_count,omitempty"`
	ReplicaUpdated     string `json:"replica_updated,omitempty"`
	ReplicaReady       string `json:"replica_ready,omitempty"`
	ReplicaAvailable   string `json:"replica_available,omitempty"`
	ObservedGeneration string `json:"observed_generation,omitempty"`
	// For ingress.
	HttpMatchRule      []*ContainerPort_HttpMatchRule `json:"http_match_rule,omitempty"`
	TargetExportedPort int32                          `json:"target_exported_port,omitempty"`
}

type ResourceSummary added in v0.0.214

type ResourceSummary struct {
	Resource    string              `json:"resource,omitempty"`
	PerResource map[string]Resource `json:"per_resource,omitempty"`
	GenVersion  int32               `json:"gen_version,omitempty"`
}

type ResourceSummary_Resource_Container added in v0.0.230

type ResourceSummary_Resource_Container struct {
	Id               string                             `json:"id,omitempty"`
	Name             string                             `json:"name,omitempty"`
	StartedAt        *time.Time                         `json:"started_at,omitempty"`
	TerminatedAt     *time.Time                         `json:"terminated_at,omitempty"`
	Ready            bool                               `json:"ready,omitempty"`
	RestartCount     int64                              `json:"restart_count,omitempty"`
	Status           string                             `json:"status,omitempty"`
	NotRunningReason string                             `json:"not_running_reason,omitempty"`
	ExportedPort     []*Container_ExportedContainerPort `json:"exported_port,omitempty"`
}

type ResourceSummary_Resource_Ref added in v0.0.230

type ResourceSummary_Resource_Ref struct {
	Resource string `json:"resource,omitempty"`
	Name     string `json:"name,omitempty"`
	Uid      string `json:"uid,omitempty"`
}

type SecretRef added in v0.0.283

type SecretRef struct {
	SecretID string `json:"secret_id"`
}

type StartContainersRequest added in v0.0.203

type StartContainersRequest struct {
	Id        string              `json:"id,omitempty"`
	Container []*ContainerRequest `json:"container,omitempty"`
}

type StartContainersResponse added in v0.0.203

type StartContainersResponse struct {
	Container []*Container `json:"container,omitempty"`
}

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"`
}

type SuspendKubernetesClusterRequest added in v0.0.230

type SuspendKubernetesClusterRequest struct {
	ClusterId string `json:"cluster_id,omitempty"`
}

type TailLogsRequest added in v0.0.168

type TailLogsRequest struct {
	ClusterID      string          `json:"cluster_id,omitempty"`
	UseBlockLabels bool            `json:"use_block_labels,omitempty"`
	Include        []*LogsSelector `json:"include,omitempty"`
	Exclude        []*LogsSelector `json:"exclude,omitempty"`
}

type Volume added in v0.0.299

type Volume struct {
	Id             string     `json:"id,omitempty"`
	AttachedTo     string     `json:"attached_to,omitempty"`
	SizeMb         uint32     `json:"size_mb,omitempty"`
	LastAttachedAt *time.Time `json:"last_attached_at,omitempty"`
	Tag            string     `json:"tag,omitempty"`
}

type VolumeSpec added in v0.0.354

type VolumeSpec struct {
	MountPoint      string                     `json:"mount_point,omitempty"`
	Tag             string                     `json:"tag,omitempty"`
	SizeMb          int64                      `json:"size_mb,omitempty"`
	PersistencyKind VolumeSpec_PersistencyKind `json:"persistency_kind,omitempty"`
	Labels          map[string]string          `json:"labels,omitempty"`
}

type VolumeSpec_PersistencyKind added in v0.0.354

type VolumeSpec_PersistencyKind int32
const (
	VolumeSpec_PERSISTENCY_UNKNOWN VolumeSpec_PersistencyKind = 0
	VolumeSpec_PERSISTENT          VolumeSpec_PersistencyKind = 1
	VolumeSpec_CACHE               VolumeSpec_PersistencyKind = 2
)

type WaitClusterOpts added in v0.0.188

type WaitClusterOpts struct {
	CreateLabel string // Used as human-facing label, e.g. "Creating Environment: ..."

	WaitKind string // One of kubernetes, buildcluster, or something else.

	WaitForService string
}

type WaitKubernetesClusterRequest

type WaitKubernetesClusterRequest struct {
	ClusterId string `json:"cluster_id,omitempty"`
}

type WakeKubernetesClusterRequest added in v0.0.202

type WakeKubernetesClusterRequest struct {
	ClusterId string `json:"cluster_id,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL