domain

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package domain provides DNS propagation polling and nginx server block generation for custom domain provisioning.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NginxServerBlock

func NginxServerBlock(domain, upstream, sslDir string, hasSSL bool) string

NginxServerBlock generates an nginx server block configuration for a custom domain.

func PollDNS

func PollDNS(ctx context.Context, domain, expectedIP string, interval time.Duration) error

PollDNS checks whether the domain resolves to the expected IP address. It polls every interval until the context is cancelled or the domain resolves. Returns nil on success, context.DeadlineExceeded on timeout.

Types

type DNSRecord

type DNSRecord struct {
	Type  string // A, CNAME, AAAA
	Name  string // hostname
	Value string // IP or target
}

DNSRecord describes a required DNS record for domain verification.

func RequiredRecords

func RequiredRecords(domain, serverIP string) []DNSRecord

RequiredRecords returns the DNS records a user must create for a custom domain.

Jump to

Keyboard shortcuts

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