setter

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package setter implements the logic to update DNS records using api.Handle.

The idea is to reuse existing DNS records as much as possible, and only when that fails, create new DNS records and remove stall ones. The complexity of this package is due to the error handling of each API call.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Setter

type Setter interface {
	// Set sets a particular domain to the given IP address.
	Set(
		ctx context.Context,
		ppfmt pp.PP,
		Domain domain.Domain,
		IPNetwork ipnet.Type,
		IP netip.Addr,
		ttl api.TTL,
		proxied bool,
	) (bool, string)

	// Clear removes DNS records of a particular domain.
	Clear(
		ctx context.Context,
		ppfmt pp.PP,
		Domain domain.Domain,
		IPNetwork ipnet.Type,
	) (bool, string)
}

Setter uses api.Handle to update DNS records.

func New

func New(_ppfmt pp.PP, handle api.Handle) (Setter, bool)

New creates a new Setter.

Jump to

Keyboard shortcuts

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