watcher

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DNSRecord

type DNSRecord struct {
	cloudflare.DNSRecord
}

func (DNSRecord) IsEqual

func (rr DNSRecord) IsEqual(o DNSRecord) bool

func (DNSRecord) IsProxied

func (rr DNSRecord) IsProxied() bool

func (DNSRecord) MarshalZerologObject

func (rr DNSRecord) MarshalZerologObject(e *zerolog.Event)

type Option

type Option func(*Watcher)

func WithCloudflareAPI

func WithCloudflareAPI(cfc *cloudflare.API) Option

func WithDNSName

func WithDNSName(name string) Option

func WithIPv4

func WithIPv4(enabled bool) Option

func WithIPv6

func WithIPv6(enabled bool) Option

func WithProxied

func WithProxied(proxied bool) Option

func WithTTL

func WithTTL(ttl time.Duration) Option

func WithZoneID

func WithZoneID(zoneID string) Option

type UpdateSet

type UpdateSet struct {
	ToAdd    []DNSRecord
	ToUpdate []DNSRecord
	ToDelete []DNSRecord
}

func BuildUpdateSet

func BuildUpdateSet(actual, expected []DNSRecord) UpdateSet

func (UpdateSet) IsEmpty added in v0.9.1

func (u UpdateSet) IsEmpty() bool

type Watcher

type Watcher struct {
	// contains filtered or unexported fields
}

func NewWatcher

func NewWatcher(opts ...Option) (*Watcher, error)

func (*Watcher) Shutdown

func (w *Watcher) Shutdown(ctx context.Context)

func (*Watcher) Sync

func (w *Watcher) Sync(ctx context.Context) error

func (*Watcher) Watch

func (w *Watcher) Watch() error

Jump to

Keyboard shortcuts

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