cloudflare

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const SourceOfficial = "cloudflare_official"

Variables

This section is empty.

Functions

This section is empty.

Types

type PrefixStore

type PrefixStore interface {
	ReplaceCloudflarePrefixes(context.Context, []model.Prefix) (model.SourceStatus, error)
	RecordSourceError(context.Context, string, error) error
	ListASNSources(context.Context, bool) ([]model.ASNSource, error)
	ReplaceASNPrefixes(context.Context, int64, []model.Prefix) (model.ASNSource, error)
	RecordASNError(context.Context, int64, error) error
	ReplaceColoLocations(context.Context, []model.ColoLocation) (model.ColoSyncSummary, error)
}

type Syncer

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

func NewSyncer

func NewSyncer(store PrefixStore) *Syncer

func (*Syncer) Sync

func (s *Syncer) Sync(ctx context.Context) (model.SourceStatus, error)

Sync refreshes Cloudflare's explicitly published reverse-proxy address ranges.

func (*Syncer) SyncASN

func (s *Syncer) SyncASN(ctx context.Context, asn int64) (model.ASNSource, error)

SyncASN refreshes all currently announced prefixes for one managed origin ASN.

func (*Syncer) SyncColos

func (s *Syncer) SyncColos(ctx context.Context) (model.ColoSyncSummary, error)

SyncColos refreshes Cloudflare colo geography from Cloudflare's public status components.

func (*Syncer) SyncEnabledASNs

func (s *Syncer) SyncEnabledASNs(ctx context.Context) (model.ASNSyncSummary, error)

SyncEnabledASNs refreshes every enabled ASN and retains per-ASN failures.

Jump to

Keyboard shortcuts

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