lbexport

package
v0.2.1 Latest Latest
Warning

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

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

Documentation

Overview

Package lbexport renders a load balancer config as Terraform, CDK, CloudFormation, Caddyfile or Caddy JSON. It never calls any cloud API.

Index

Constants

View Source
const (
	FormatTerraform      = "terraform"
	FormatCDK            = "cdk"
	FormatCloudFormation = "cloudformation"
	FormatCaddy          = "caddy"
	FormatCaddyJSON      = "caddy-json"
)

Export formats accepted by Export.

Variables

This section is empty.

Functions

func ExportFormats

func ExportFormats() []string

ExportFormats lists every supported format.

Types

type Artifact

type Artifact struct {
	Format      string   `json:"format"`
	Filename    string   `json:"filename"`
	ContentType string   `json:"content_type"`
	Body        string   `json:"body"`
	Warnings    []string `json:"warnings,omitempty"`
}

Artifact is one generated file.

func Export

func Export(format string, in ExportInput) (Artifact, error)

Export renders in as the requested format. It never contacts any cloud API.

type ExportInput

type ExportInput struct {
	Service string
	Port    int
	Domains []string
	Config  loadbalancer.Config
	// Upstreams are the current dial addresses; used by the Caddy formats only.
	Upstreams []string
}

ExportInput is everything a generator needs about one service.

Jump to

Keyboard shortcuts

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