Help us shape the future of Go! Take the 2026 Go Developer Survey

exposure

package
v0.4.25 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Destroy

func Destroy(ctx context.Context, compose bhruntime.RuntimeProvider, runtime application.RuntimeFiles) error

func Load

func Load(runtime application.RuntimeFiles) (State, Files, error)

func ProjectName

func ProjectName(m application.Manifest) string

func ProjectNameForRuntime added in v0.4.16

func ProjectNameForRuntime(m application.Manifest, runtime application.RuntimeFiles) string

func RetireRuntime added in v0.4.25

RetireRuntime preserves the canonical route/configuration owner for retry and re-add. The application exposure network belongs to the workload owner.

func Stop

Types

type CaddyRealization added in v0.4.19

type CaddyRealization struct {
	// contains filtered or unexported fields
}

CaddyRealization adapts the current Docker/Podman Caddy implementation to the runtime-neutral Lifecycle without exposing Compose vocabulary upward.

func NewCaddyRealization added in v0.4.19

func NewCaddyRealization(driver *Driver) *CaddyRealization

func (*CaddyRealization) Apply added in v0.4.19

func (r *CaddyRealization) Apply(ctx context.Context, planned []PlannedRoute) (PublishedState, error)

func (*CaddyRealization) Reconcile added in v0.4.19

func (r *CaddyRealization) Reconcile(ctx context.Context, planned []PlannedRoute) (PublishedState, error)

func (*CaddyRealization) Rollback added in v0.4.19

func (r *CaddyRealization) Rollback(ctx context.Context) error

func (*CaddyRealization) Verify added in v0.4.19

func (r *CaddyRealization) Verify(ctx context.Context, route Route) error

type Deployment

type Deployment struct {
	Hostname string
	TLSMode  string
	TLSDir   string
}

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

func NewDriver

func NewDriver(compose bhruntime.RuntimeProvider, m application.Manifest, runtime application.RuntimeFiles, deployment Deployment) *Driver

func (*Driver) Bind

func (d *Driver) Bind(ctx context.Context, resource capability.Resource, binding capability.Binding) error

func (*Driver) Descriptor

func (d *Driver) Descriptor() capability.Provider

func (*Driver) IntegrationDescriptor

func (d *Driver) IntegrationDescriptor() capability.IntegrationDescriptor

func (*Driver) Preflight

func (d *Driver) Preflight(ctx context.Context, resource capability.Resource, binding capability.Binding) error

func (*Driver) Provision

func (d *Driver) Provision(ctx context.Context, resource capability.Resource, binding capability.Binding) error

func (*Driver) ReconcileWorkloadTransport added in v0.4.17

func (d *Driver) ReconcileWorkloadTransport(ctx context.Context) error

func (*Driver) Rollback

func (d *Driver) Rollback(ctx context.Context) error

func (*Driver) State

func (d *Driver) State() State

func (*Driver) Verify

func (d *Driver) Verify(ctx context.Context, resource capability.Resource, binding capability.Binding) error

type Files

type Files struct {
	Dir     string
	Compose string
	Env     string
	State   string
}

func FilesFor

func FilesFor(runtime application.RuntimeFiles) Files

type Lifecycle added in v0.4.19

type Lifecycle struct {
	// contains filtered or unexported fields
}

Lifecycle is the frozen semantic exposure driver.

func NewLifecycle added in v0.4.19

func NewLifecycle(hostname, tlsMode string, realization Realization) *Lifecycle

func (*Lifecycle) Bind added in v0.4.19

func (d *Lifecycle) Bind(_ context.Context, resource capability.Resource, binding capability.Binding) error

func (*Lifecycle) Descriptor added in v0.4.19

func (d *Lifecycle) Descriptor() capability.Provider

func (*Lifecycle) IntegrationDescriptor added in v0.4.19

func (d *Lifecycle) IntegrationDescriptor() capability.IntegrationDescriptor

func (*Lifecycle) Preflight added in v0.4.19

func (d *Lifecycle) Preflight(_ context.Context, resource capability.Resource, binding capability.Binding) error

func (*Lifecycle) Provision added in v0.4.19

func (*Lifecycle) ReconcileWorkloadTransport added in v0.4.19

func (d *Lifecycle) ReconcileWorkloadTransport(ctx context.Context) error

func (*Lifecycle) Rollback added in v0.4.19

func (d *Lifecycle) Rollback(ctx context.Context) error

func (*Lifecycle) State added in v0.4.19

func (d *Lifecycle) State() PublishedState

func (*Lifecycle) Verify added in v0.4.19

func (d *Lifecycle) Verify(ctx context.Context, resource capability.Resource, _ capability.Binding) error

type PlannedRoute added in v0.4.19

type PlannedRoute struct {
	Name       string
	Service    string
	TargetPort int
	Protocol   string
	Visibility string
}

PlannedRoute is the runtime-neutral exposure intent handed to a realization.

type PublishedState added in v0.4.19

type PublishedState struct {
	Host   string
	Routes []Route
}

PublishedState is the runtime-neutral exposure result consumed by Core and user/agent surfaces. Runtime-native project/network/resource identity stays below the realization boundary.

type Realization added in v0.4.19

type Realization interface {
	Apply(context.Context, []PlannedRoute) (PublishedState, error)
	Reconcile(context.Context, []PlannedRoute) (PublishedState, error)
	Verify(context.Context, Route) error
	Rollback(context.Context) error
}

Realization owns provider/runtime-specific delivery. Docker/Podman may use Caddy, Kubernetes may use Gateway API, OpenShift may use Route, and cloud targets may use a managed ingress implementation without changing Core.

type Route

type Route struct {
	Name             string `json:"name"`
	Service          string `json:"service"`
	TargetPort       int    `json:"target_port"`
	Protocol         string `json:"protocol"`
	ProviderProtocol string `json:"provider_protocol,omitempty"`
	WorkloadProtocol string `json:"workload_protocol,omitempty"`
	Visibility       string `json:"visibility"`
	PublishedPort    int    `json:"published_port"`
	TLSFingerprint   string `json:"tls_fingerprint,omitempty"`
}

type RuntimeInventory added in v0.4.25

type RuntimeInventory struct {
	State     State
	Files     Files
	Resources []bhruntime.ProjectResource
}

RuntimeInventory observes the existing renderer owner. It does not allocate ports, rewrite routes, issue certificates or introduce an ownership record.

func ExistingRuntimeInventory added in v0.4.25

func ExistingRuntimeInventory(m application.Manifest, runtime application.RuntimeFiles) (RuntimeInventory, error)

type State

type State struct {
	Version int     `json:"version"`
	Project string  `json:"project"`
	Network string  `json:"network"`
	Host    string  `json:"host"`
	Routes  []Route `json:"routes"`
}

Jump to

Keyboard shortcuts

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