server

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: Apache-2.0 Imports: 36 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"`
	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" help:"Shared OTLP/HTTP endpoint URL for enabled signals (typically collector URL)"`
	TracesEnabled   bool   `name:"enable-traces" help:"Enable OpenTelemetry traces signal"`
	TracesEndpoint  string `name:"traces-endpoint" 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" 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" help:"OTLP/HTTP logs endpoint URL (e.g. http://127.0.0.1:4318/v1/logs)"`
	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"`
	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