Documentation
¶
Index ¶
- Constants
- type PrefixStore
- type Syncer
- func (s *Syncer) Sync(ctx context.Context) (model.SourceStatus, error)
- func (s *Syncer) SyncASN(ctx context.Context, asn int64) (model.ASNSource, error)
- func (s *Syncer) SyncColos(ctx context.Context) (model.ColoSyncSummary, error)
- func (s *Syncer) SyncEnabledASNs(ctx context.Context) (model.ASNSyncSummary, error)
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 ¶
Sync refreshes Cloudflare's explicitly published reverse-proxy address ranges.
func (*Syncer) SyncASN ¶
SyncASN refreshes all currently announced prefixes for one managed origin ASN.
func (*Syncer) SyncColos ¶
SyncColos refreshes Cloudflare colo geography from Cloudflare's public status components.
func (*Syncer) SyncEnabledASNs ¶
SyncEnabledASNs refreshes every enabled ASN and retains per-ASN failures.
Click to show internal directories.
Click to hide internal directories.