lbexport

package
v1.5.10 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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