hosted

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package hosted exports ctrlplane-compatible workload contracts without account-side mutation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Factory

func Factory(_ execx.Runner, root string) provider.Provider

Types

type Export

type Export struct {
	Schema      string     `json:"schema"`
	Project     string     `json:"project"`
	Environment string     `json:"environment"`
	Workloads   []Workload `json:"workloads"`
}

Export carries provider-compatible fields. The hosted authority supplies account identity and applies bindings.

type HealthCheck

type HealthCheck struct {
	Path     string `json:"path,omitempty"`
	Port     int    `json:"port"`
	Interval int64  `json:"interval"`
	Timeout  int64  `json:"timeout"`
	Retries  int    `json:"retries"`
}

type Hosted

type Hosted struct{ provider.ExportOnly }

func New

func New(_ string) *Hosted

func (*Hosted) Capabilities

func (*Hosted) Capabilities(context.Context, spec.Target) (model.Capabilities, error)

func (*Hosted) Operations

func (*Hosted) Render

func (p *Hosted) Render(ctx context.Context, d *model.Deployment) (*render.Bundle, error)

func (*Hosted) Validate

func (p *Hosted) Validate(ctx context.Context, d *model.Deployment) output.Diagnostics

type Port

type Port struct {
	Container int    `json:"container"`
	Protocol  string `json:"protocol"`
}

type Resources

type Resources struct {
	CPUMillis int `json:"cpu_millis"`
	MemoryMB  int `json:"memory_mb"`
	Replicas  int `json:"replicas"`
}

type SecretBinding

type SecretBinding struct {
	VarName string    `json:"var_name"`
	EnvKey  string    `json:"env_key"`
	Ref     SecretRef `json:"ref"`
}

type SecretRef

type SecretRef struct {
	Key  string `json:"key"`
	Type string `json:"type"`
}

type Service

type Service struct {
	Name        string             `json:"name"`
	Image       string             `json:"image"`
	Role        string             `json:"role"`
	Resources   Resources          `json:"resources"`
	Env         map[string]string  `json:"env,omitempty"`
	Ports       []Port             `json:"ports,omitempty"`
	HealthCheck *HealthCheck       `json:"health_check,omitempty"`
	Secrets     []SecretRef        `json:"secrets,omitempty"`
	ConfigFiles []model.ConfigFile `json:"config_files,omitempty"`
	Annotations map[string]string  `json:"annotations,omitempty"`
}

type Workload

type Workload struct {
	Name           string          `json:"name"`
	Kind           string          `json:"kind"`
	Services       []Service       `json:"services"`
	SecretBindings []SecretBinding `json:"secret_bindings,omitempty"`
}

Jump to

Keyboard shortcuts

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