server

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2026 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main()

func NewServer

func NewServer(cli *Cli) (*fuego.Server, net.Listener, error)

func RegisterEndpoints

func RegisterEndpoints(srv *fuego.Server, htp htpasswd.HTPasswd, zctl zone.Controller)

Types

type ACMEUpdateRequest

type ACMEUpdateRequest struct {
	Subdomain string `json:"subdomain" validate:"required"`
	TXT       string `json:"txt" validate:"required"`
}

type ACMEUpdateResponse

type ACMEUpdateResponse struct {
	TXT string `json:"txt"`
}

type Cli

type Cli struct {
	Listen             string           `name:"listen" default:"localhost:9999" help:"Server listen address"`
	AcceptProxy        bool             `name:"accept-proxy" help:"Accept PROXY protocol"`
	ProxyHeaderTimeout time.Duration    `name:"proxy-header-timeout" default:"10s" help:"Timeout for PROXY headers"`
	HTPasswdFile       string           `short:"p" name:"htpasswd" required:"" type:"existingfile" placeholder:"FILE" help:"Passwords file (bcrypt only)"`
	ZoneFiles          []string         `short:"z" name:"zone" required:"" type:"existingfile" placeholder:"FILE,..." help:"Zone files to update"`
	AcmeTTL            int              `name:"acme-ttl" default:"0" help:"TTL (seconds) for ACME challenge TXT records; 0 = use zone $TTL"`
	Debug              bool             `name:"debug" help:"Enable debug logging"`
	Version            kong.VersionFlag `help:"Print version and exit"`

	OTEL OTelConfig `embed:"" prefix:"otel-"`
}

type LegoHttpDefaultRequest

type LegoHttpDefaultRequest struct {
	Fqdn  string `json:"fqdn" validate:"required"`
	Value string `json:"value"`
}

type LegoHttpDefaultResponse added in v0.8.0

type LegoHttpDefaultResponse struct {
	Fqdn  string `json:"fqdn"`
	Value string `json:"value"`
}

NOTE: LEGO do not check responses, but acme.sh acmeproxy - expect to see copy of original message

type OTelConfig added in v0.13.0

type OTelConfig struct {
	Endpoint        string            `name:"endpoint" placeholder:"URL" help:"Shared OTLP/HTTP endpoint URL for enabled signals (typically collector URL)"`
	Headers         map[string]string `name:"header" help:"Additional HTTP headers for all OTLP exporters, repeatable (e.g. Authorization=Bearer token)"`
	TracesEnabled   bool              `name:"enable-traces" help:"Enable OpenTelemetry traces signal"`
	TracesEndpoint  string            `name:"traces-endpoint" placeholder:"URL" help:"OTLP/HTTP traces endpoint URL (e.g. http://127.0.0.1:4318/v1/traces)"`
	MetricsEnabled  bool              `name:"enable-metrics" help:"Enable OpenTelemetry metrics signal"`
	MetricsEndpoint string            `name:"metrics-endpoint" placeholder:"URL" help:"OTLP/HTTP metrics endpoint URL (e.g. http://127.0.0.1:4318/v1/metrics)"`
	LogsEnabled     bool              `name:"enable-logs" help:"Enable OpenTelemetry logs signal"`
	LogsEndpoint    string            `name:"logs-endpoint" placeholder:"URL" help:"OTLP/HTTP logs endpoint URL (e.g. http://127.0.0.1:4318/v1/logs)"`
	LogsLevel       string            `` /* 154-byte string literal not displayed */
	ServiceName     string            `name:"service-name" default:"zoneomatic" help:"OpenTelemetry service name"`
}

type ZMUpdateRequest added in v0.9.0

type ZMUpdateRequest struct {
	Fqdn   string   `json:"fqdn" validate:"required"`
	Type   string   `json:"type" validate:"required"`
	TTL    int      `json:"ttl,omitempty"`
	Values []string `json:"values" validate:"required"`
}

type ZMUpdateResponse added in v0.9.0

type ZMUpdateResponse struct {
	Fqdn    string `json:"fqdn"`
	Changed bool   `json:"changed"`
}

Jump to

Keyboard shortcuts

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