Documentation ¶
Index ¶
- Constants
- Variables
- func AddRecord(targetsets dns.RecordSets, ty string, host string, ttl int64)
- func AlwaysRateLimiter() flowcontrol.RateLimiter
- func Create(c controller.Interface, factory DNSHandlerFactory) (reconcile.Interface, error)
- func CreateFactoryOptionSource(factory DNSHandlerFactory, prefix string) config.OptionSource
- func DNSController(name string, factory DNSHandlerFactory) controller.Configuration
- func DNSReconcilerType(factory DNSHandlerFactory) controller.ReconcilerType
- func FactoryOptionSourceCreator(factory DNSHandlerFactory) extension.OptionSourceCreator
- func HandlerStringMapper(name string) func(s string) string
- func Match(zone DNSHostedZone, dnsname string) int
- func NewDNSState(ctx Context, ownerresc resources.Interface, classes *controller.Classes, ...) *state
- func Provider(p DNSProvider) string
- func StatusMessage(s string) *string
- func StatusMessagef(msgfmt string, args ...interface{}) *string
- type AccountCache
- func (this *AccountCache) Get(logger logger.LogContext, provider *dnsutils.DNSProviderObject, ...) (*DNSAccount, error)
- func (this *AccountCache) Hash(props utils.Properties, ptype string, extension *runtime.RawExtension) string
- func (this *AccountCache) Release(logger logger.LogContext, a *DNSAccount, name resources.ObjectName)
- type ChangeGroup
- type ChangeModel
- func (this *ChangeModel) AddTargets(set *dns.DNSSet, base *dns.DNSSet, provider DNSProvider, targets ...Target) *dns.DNSSet
- func (this *ChangeModel) Apply(name string, createdAt time.Time, done DoneHandler, targets ...Target) ChangeResult
- func (this *ChangeModel) Check(name string, createdAt time.Time, done DoneHandler, targets ...Target) ChangeResult
- func (this *ChangeModel) Cleanup(logger logger.LogContext) bool
- func (this *ChangeModel) Delete(name string, createdAt time.Time, done DoneHandler) ChangeResult
- func (this *ChangeModel) Domain() string
- func (this *ChangeModel) Exec(apply bool, delete bool, name string, createdAt time.Time, done DoneHandler, ...) ChangeResult
- func (this *ChangeModel) IsFailed(dnsName string) bool
- func (this *ChangeModel) IsForeign(set *dns.DNSSet) bool
- func (this *ChangeModel) IsStale(dns string) *Entry
- func (this *ChangeModel) Owns(set *dns.DNSSet) bool
- func (this *ChangeModel) Setup() error
- func (this *ChangeModel) Update(logger logger.LogContext) error
- func (this *ChangeModel) ZoneId() string
- type ChangeRequest
- type ChangeRequests
- type ChangeResult
- type CompoundFactory
- func (this *CompoundFactory) Add(f DNSHandlerFactory, finalizer ...string) error
- func (this *CompoundFactory) Create(typecode string, cfg *DNSHandlerConfig) (DNSHandler, error)
- func (this *CompoundFactory) CreateOptionSource() (config.OptionSource, *GenericFactoryOptions)
- func (this *CompoundFactory) Finalizers() utils.StringSet
- func (this *CompoundFactory) IsResponsibleFor(object *dnsutils.DNSProviderObject) bool
- func (this *CompoundFactory) Name() string
- func (this *CompoundFactory) SupportZoneStateCache(typecode string) (bool, error)
- func (this *CompoundFactory) TypeCodes() utils.StringSet
- type Config
- type Context
- type DNSAccount
- func (this *DNSAccount) AddGenericRequests(requestType string, n int)
- func (this *DNSAccount) AddZoneRequests(zoneID, requestType string, n int)
- func (this *DNSAccount) ExecuteRequests(logger logger.LogContext, zone DNSHostedZone, state DNSZoneState, ...) error
- func (this *DNSAccount) GetZoneState(zone DNSHostedZone) (DNSZoneState, error)
- func (this *DNSAccount) GetZones() (DNSHostedZones, error)
- func (this *DNSAccount) Hash() string
- func (this *DNSAccount) MapTarget(t Target) Target
- func (this *DNSAccount) ProviderType() string
- func (this *DNSAccount) Release()
- func (this *DNSAccount) ReportZoneStateConflict(zone DNSHostedZone, err error) bool
- type DNSHandler
- type DNSHandlerConfig
- func (c *DNSHandlerConfig) FillDefaultedBoolProperty(target **bool, def bool, prop string, alt ...string) error
- func (c *DNSHandlerConfig) FillDefaultedIntProperty(target **int, def int, prop string, alt ...string) error
- func (c *DNSHandlerConfig) FillDefaultedProperty(target **string, def string, prop string, alt ...string) error
- func (c *DNSHandlerConfig) FillRequiredIntProperty(target **int, prop string, alt ...string) error
- func (c *DNSHandlerConfig) FillRequiredProperty(target **string, prop string, alt ...string) error
- func (c *DNSHandlerConfig) GetDefaultedBoolProperty(key string, def bool, altKeys ...string) (bool, error)
- func (c *DNSHandlerConfig) GetDefaultedIntProperty(key string, def int, altKeys ...string) (int, error)
- func (c *DNSHandlerConfig) GetDefaultedProperty(key string, def string, altKeys ...string) string
- func (c *DNSHandlerConfig) GetProperty(key string, altKeys ...string) string
- func (c *DNSHandlerConfig) GetRequiredBoolProperty(key string, altKeys ...string) (bool, error)
- func (c *DNSHandlerConfig) GetRequiredIntProperty(key string, altKeys ...string) (int, error)
- func (c *DNSHandlerConfig) GetRequiredProperty(key string, altKeys ...string) (string, error)
- type DNSHandlerCreatorFunction
- type DNSHandlerFactory
- type DNSHandlerOptionSource
- type DNSHostedZone
- type DNSHostedZones
- type DNSNames
- type DNSProvider
- type DNSProviders
- type DNSZoneState
- type DefaultContext
- func (this *DefaultContext) Enqueue(obj resources.Object) error
- func (this *DefaultContext) EnqueueCommand(cmd string) error
- func (this *DefaultContext) EnqueueKey(key resources.ClusterObjectKey) error
- func (this *DefaultContext) GetByExample(obj runtime.Object) (resources.Interface, error)
- func (this *DefaultContext) GetContext() context.Context
- func (this *DefaultContext) GetIntOption(name string) (int, error)
- func (this *DefaultContext) GetPoolPeriod(name string) *time.Duration
- func (this *DefaultContext) GetSecretPropertiesByRef(src resources.ResourcesSource, ref *corev1.SecretReference) (utils.Properties, *resources.SecretObject, error)
- func (this *DefaultContext) GetStringOption(name string) (string, error)
- func (this *DefaultContext) HasFinalizer(obj resources.Object) bool
- func (this *DefaultContext) IsReady() bool
- func (this *DefaultContext) RemoveFinalizer(obj resources.Object) error
- func (this *DefaultContext) SetFinalizer(obj resources.Object) error
- func (this *DefaultContext) Synchronize(log logger.LogContext, name string, obj resources.Object) (bool, error)
- type DefaultDNSHandler
- type DefaultDNSHostedZone
- func (this *DefaultDNSHostedZone) Domain() string
- func (this *DefaultDNSHostedZone) ForwardedDomains() []string
- func (this *DefaultDNSHostedZone) Id() string
- func (this *DefaultDNSHostedZone) IsPrivate() bool
- func (this *DefaultDNSHostedZone) Key() string
- func (this *DefaultDNSHostedZone) Match(dnsname string) int
- func (this *DefaultDNSHostedZone) ProviderType() string
- type DefaultDNSZoneState
- type DoneHandler
- type DumpDNSHostedZone
- type Entries
- type Entry
- func (this *Entry) Before(e *Entry) bool
- func (this *Entry) CreatedAt() time.Time
- func (this *Entry) IsActive() bool
- func (this *Entry) IsModified() bool
- func (this *Entry) RemoveFinalizer() error
- func (this *Entry) Trigger(logger logger.LogContext)
- func (this *Entry) Update(logger logger.LogContext, new *EntryVersion) *Entry
- type EntryList
- type EntryPremise
- type EntryVersion
- func (this *EntryVersion) ClusterKey() resources.ClusterObjectKey
- func (this *EntryVersion) DNSName() string
- func (this *EntryVersion) Description() string
- func (this *EntryVersion) Interval() int64
- func (this *EntryVersion) IsDeleting() bool
- func (this *EntryVersion) IsResponsible() bool
- func (this *EntryVersion) IsValid() bool
- func (this *EntryVersion) KeepRecords() bool
- func (this *EntryVersion) Message() string
- func (this *EntryVersion) Object() *dnsutils.DNSEntryObject
- func (this *EntryVersion) ObjectName() resources.ObjectName
- func (this *EntryVersion) OwnerId() string
- func (this *EntryVersion) ProviderName() resources.ObjectName
- func (this *EntryVersion) ProviderType() string
- func (this *EntryVersion) RequiresUpdateFor(e *EntryVersion) (reasons []string)
- func (this *EntryVersion) Setup(logger logger.LogContext, state *state, p *EntryPremise, op string, err error, ...) reconcile.Status
- func (this *EntryVersion) State() string
- func (this *EntryVersion) TTL() int64
- func (this *EntryVersion) Targets() Targets
- func (this *EntryVersion) UpdateStatus(logger logger.LogContext, state string, msg string) (bool, error)
- func (this *EntryVersion) ZoneId() string
- type Factory
- func (this *Factory) Create(typecode string, config *DNSHandlerConfig) (DNSHandler, error)
- func (this *Factory) CreateOptionSource() (config.OptionSource, *GenericFactoryOptions)
- func (this *Factory) IsResponsibleFor(object *dnsutils.DNSProviderObject) bool
- func (this *Factory) Name() string
- func (this *Factory) SetGenericFactoryOptionDefaults(defaults ...GenericFactoryOptions) *Factory
- func (this *Factory) SetOptionSourceByExample(proto config.OptionSource, defaults ...GenericFactoryOptions) *Factory
- func (this *Factory) SetOptionSourceCreator(creator extension.OptionSourceCreator, defaults ...GenericFactoryOptions) *Factory
- func (this *Factory) SupportZoneStateCache(typecode string) (bool, error)
- func (this *Factory) TypeCodes() utils.StringSet
- type FactoryOptions
- type FinalizerHandler
- type Finalizers
- type ForwardedDomainsHandlerData
- func (hd *ForwardedDomainsHandlerData) DeleteZone(zoneID string)
- func (hd *ForwardedDomainsHandlerData) GetForwardedDomains(zoneid string) []string
- func (hd *ForwardedDomainsHandlerData) Marshal(zoneID string) (*PersistentHandlerData, error)
- func (hd *ForwardedDomainsHandlerData) SetForwardedDomains(zoneid string, value []string)
- func (hd *ForwardedDomainsHandlerData) Unmarshal(zoneID string, data *PersistentHandlerData) error
- type FullDump
- type GenericFactoryOptions
- type HandlerData
- type InMemory
- func (m *InMemory) AddZone(zone DNSHostedZone) bool
- func (m *InMemory) Apply(zoneID string, request *ChangeRequest, metrics Metrics) error
- func (m *InMemory) BuildFullDump() *FullDump
- func (m *InMemory) CloneZoneState(zone DNSHostedZone) (DNSZoneState, error)
- func (m *InMemory) DeleteZone(zone DNSHostedZone)
- func (m *InMemory) FindHostedZone(zoneid string) DNSHostedZone
- func (m *InMemory) GetZones() DNSHostedZones
- func (m *InMemory) SetZone(zone DNSHostedZone, zoneState DNSZoneState)
- type Metrics
- type NullMetrics
- type OwnerCache
- func (this *OwnerCache) DeleteOwner(key resources.ObjectKey) (changeset utils.StringSet, activeset utils.StringSet)
- func (this *OwnerCache) GetIds() utils.StringSet
- func (this *OwnerCache) IsResponsibleFor(id string) bool
- func (this *OwnerCache) IsResponsiblePendingFor(id string) bool
- func (this *OwnerCache) SetPending(id string)
- func (this *OwnerCache) UpdateCountsWith(statistic statistic.OwnerStatistic, types utils.StringSet) OwnerCounts
- func (this *OwnerCache) UpdateOwner(owner *dnsutils.DNSOwnerObject) (changeset utils.StringSet, activeset utils.StringSet)
- type OwnerCounts
- type OwnerIDInfo
- type OwnerIDInfos
- type OwnerName
- type OwnerObjectInfo
- type OwnerObjectInfos
- type PersistentHandlerData
- type PersistentZone
- type PersistentZoneState
- type ProviderTypeCounts
- type RateLimiterConfig
- type RateLimiterOptions
- func (this *RateLimiterOptions) AddOptionsToSet(set config.OptionSet)
- func (c *RateLimiterOptions) GetRateLimiterConfig() *RateLimiterConfig
- func (c RateLimiterOptions) SetBurst(burst int) RateLimiterOptions
- func (c RateLimiterOptions) SetEnabled(enabled bool) RateLimiterOptions
- func (c RateLimiterOptions) SetQPS(qps int) RateLimiterOptions
- type References
- type StatusUpdate
- type Target
- type Targets
- type ZoneCache
- type ZoneCacheConfig
- type ZoneCacheStateUpdater
- type ZoneCacheZoneUpdater
- type ZoneDump
Constants ¶
View Source
const ( R_CREATE = "create" R_UPDATE = "update" R_DELETE = "delete" )
View Source
const ( OPT_IDENTIFIER = "identifier" OPT_CLASS = source.OPT_CLASS OPT_DRYRUN = "dry-run" OPT_TTL = "ttl" OPT_CACHE_TTL = "cache-ttl" OPT_CACHE_DIR = "cache-dir" OPT_SETUP = dns.OPT_SETUP OPT_DNSDELAY = "dns-delay" OPT_RESCHEDULEDELAY = "reschedule-delay" OPT_DISABLE_ZONE_STATE_CACHING = "disable-zone-state-caching" OPT_PROVIDERTYPES = "provider-types" OPT_RATELIMITER_ENABLED = "ratelimiter.enabled" OPT_RATELIMITER_QPS = "ratelimiter.qps" OPT_RATELIMITER_BURST = "ratelimiter.burst" CMD_HOSTEDZONE_PREFIX = "hostedzone:" CMD_STATISTIC = "statistic" )
View Source
const ( M_LISTZONES = "list_zones" M_PLISTZONES = "list_zones_pages" M_LISTRECORDS = "list_records" M_PLISTRECORDS = "list_records_pages" M_UPDATERECORDS = "update_records" M_PUPDATEREORDS = "update_records_pages" M_CREATERECORDS = "create_records" M_DELETERECORDS = "delete_records" M_CACHED_GETZONES = "cached_getzones" M_CACHED_GETZONESTATE = "cached_getzonestate" )
View Source
const CONTROLLER_GROUP_DNS_CONTROLLERS = dns.CONTROLLER_GROUP_DNS_CONTROLLERS
View Source
const FACTORY_OPTIONS = "factory"
View Source
const KEY_STATE = "dns-state"
View Source
const MSG_PRESERVED = "errorneous entry preserved in provider"
View Source
const PROVIDER_CLUSTER = "provider"
View Source
const SYNC_ENTRIES = "entries"
View Source
const TARGET_CLUSTER = source.TARGET_CLUSTER
View Source
const TempSuffix = ".~.tmp"
View Source
const ZoneCachePrefix = "zc-"
Variables ¶
View Source
var GenericFactoryOptionDefaults = GenericFactoryOptions{ RateLimiterOptionDefaults, }
View Source
var RateLimiterOptionDefaults = RateLimiterOptions{ Enabled: true, QPS: 10, Burst: 20, }
Functions ¶
func AlwaysRateLimiter ¶ added in v0.7.12
func AlwaysRateLimiter() flowcontrol.RateLimiter
func Create ¶
func Create(c controller.Interface, factory DNSHandlerFactory) (reconcile.Interface, error)
func CreateFactoryOptionSource ¶ added in v0.7.12
func CreateFactoryOptionSource(factory DNSHandlerFactory, prefix string) config.OptionSource
func DNSController ¶
func DNSController(name string, factory DNSHandlerFactory) controller.Configuration
func DNSReconcilerType ¶
func DNSReconcilerType(factory DNSHandlerFactory) controller.ReconcilerType
func FactoryOptionSourceCreator ¶ added in v0.7.12
func FactoryOptionSourceCreator(factory DNSHandlerFactory) extension.OptionSourceCreator
func HandlerStringMapper ¶ added in v0.7.12
func Match ¶ added in v0.8.1
func Match(zone DNSHostedZone, dnsname string) int
func NewDNSState ¶
func Provider ¶
func Provider(p DNSProvider) string
func StatusMessage ¶
func StatusMessagef ¶
Types ¶
type AccountCache ¶
type AccountCache struct {
// contains filtered or unexported fields
}
func NewAccountCache ¶
func NewAccountCache(ttl time.Duration, dir string, opts *FactoryOptions) *AccountCache
func (*AccountCache) Get ¶
func (this *AccountCache) Get(logger logger.LogContext, provider *dnsutils.DNSProviderObject, props utils.Properties, state *state) (*DNSAccount, error)
func (*AccountCache) Hash ¶
func (this *AccountCache) Hash(props utils.Properties, ptype string, extension *runtime.RawExtension) string
func (*AccountCache) Release ¶
func (this *AccountCache) Release(logger logger.LogContext, a *DNSAccount, name resources.ObjectName)
type ChangeGroup ¶
type ChangeGroup struct {
// contains filtered or unexported fields
}
type ChangeModel ¶
type ChangeModel struct { logger.LogContext // contains filtered or unexported fields }
func NewChangeModel ¶
func NewChangeModel(logger logger.LogContext, owners utils.StringSet, req *zoneReconciliation, config Config) *ChangeModel
func (*ChangeModel) AddTargets ¶
func (this *ChangeModel) AddTargets(set *dns.DNSSet, base *dns.DNSSet, provider DNSProvider, targets ...Target) *dns.DNSSet
func (*ChangeModel) Apply ¶
func (this *ChangeModel) Apply(name string, createdAt time.Time, done DoneHandler, targets ...Target) ChangeResult
func (*ChangeModel) Check ¶
func (this *ChangeModel) Check(name string, createdAt time.Time, done DoneHandler, targets ...Target) ChangeResult
func (*ChangeModel) Cleanup ¶
func (this *ChangeModel) Cleanup(logger logger.LogContext) bool
func (*ChangeModel) Delete ¶
func (this *ChangeModel) Delete(name string, createdAt time.Time, done DoneHandler) ChangeResult
func (*ChangeModel) Domain ¶
func (this *ChangeModel) Domain() string
func (*ChangeModel) Exec ¶
func (this *ChangeModel) Exec(apply bool, delete bool, name string, createdAt time.Time, done DoneHandler, targets ...Target) ChangeResult
func (*ChangeModel) IsFailed ¶ added in v0.8.2
func (this *ChangeModel) IsFailed(dnsName string) bool
func (*ChangeModel) IsStale ¶
func (this *ChangeModel) IsStale(dns string) *Entry
func (*ChangeModel) Setup ¶
func (this *ChangeModel) Setup() error
func (*ChangeModel) Update ¶
func (this *ChangeModel) Update(logger logger.LogContext) error
func (*ChangeModel) ZoneId ¶
func (this *ChangeModel) ZoneId() string
type ChangeRequest ¶
type ChangeRequest struct { Action string Type string Addition *dns.DNSSet Deletion *dns.DNSSet Done DoneHandler }
func NewChangeRequest ¶
func NewChangeRequest(action string, rtype string, del, add *dns.DNSSet, done DoneHandler) *ChangeRequest
type ChangeRequests ¶
type ChangeRequests []*ChangeRequest
type ChangeResult ¶
type CompoundFactory ¶
type CompoundFactory struct {
// contains filtered or unexported fields
}
func NewDNSHandlerCompoundFactory ¶
func NewDNSHandlerCompoundFactory(name string) *CompoundFactory
func (*CompoundFactory) Add ¶
func (this *CompoundFactory) Add(f DNSHandlerFactory, finalizer ...string) error
func (*CompoundFactory) Create ¶
func (this *CompoundFactory) Create(typecode string, cfg *DNSHandlerConfig) (DNSHandler, error)
func (*CompoundFactory) CreateOptionSource ¶ added in v0.7.12
func (this *CompoundFactory) CreateOptionSource() (config.OptionSource, *GenericFactoryOptions)
func (*CompoundFactory) Finalizers ¶ added in v0.7.12
func (this *CompoundFactory) Finalizers() utils.StringSet
func (*CompoundFactory) IsResponsibleFor ¶
func (this *CompoundFactory) IsResponsibleFor(object *dnsutils.DNSProviderObject) bool
func (*CompoundFactory) Name ¶
func (this *CompoundFactory) Name() string
func (*CompoundFactory) SupportZoneStateCache ¶
func (this *CompoundFactory) SupportZoneStateCache(typecode string) (bool, error)
func (*CompoundFactory) TypeCodes ¶
func (this *CompoundFactory) TypeCodes() utils.StringSet
type Config ¶
type Config struct { TTL int64 CacheTTL time.Duration CacheDir string RescheduleDelay time.Duration Ident string Dryrun bool ZoneStateCaching bool Delay time.Duration Enabled utils.StringSet Options *FactoryOptions Factory DNSHandlerFactory }
func NewConfigForController ¶
func NewConfigForController(c controller.Interface, factory DNSHandlerFactory) (*Config, error)
type Context ¶
type Context interface { logger.LogContext GetContext() context.Context IsReady() bool GetByExample(runtime.Object) (resources.Interface, error) GetStringOption(name string) (string, error) GetIntOption(name string) (int, error) Synchronize(log logger.LogContext, name string, initiator resources.Object) (bool, error) Enqueue(obj resources.Object) error EnqueueCommand(cmd string) error EnqueueKey(key resources.ClusterObjectKey) error SetFinalizer(resources.Object) error RemoveFinalizer(resources.Object) error HasFinalizer(resources.Object) bool GetSecretPropertiesByRef(src resources.ResourcesSource, ref *corev1.SecretReference) (utils.Properties, *resources.SecretObject, error) GetPoolPeriod(name string) *time.Duration }
func NewDefaultContext ¶
func NewDefaultContext(controller controller.Interface) Context
type DNSAccount ¶
type DNSAccount struct { *dnsutils.RateLimiter // contains filtered or unexported fields }
func NewDNSAccount ¶ added in v0.7.9
func NewDNSAccount(config utils.Properties, handler DNSHandler, hash string) *DNSAccount
func (*DNSAccount) AddGenericRequests ¶ added in v0.8.4
func (this *DNSAccount) AddGenericRequests(requestType string, n int)
func (*DNSAccount) AddZoneRequests ¶ added in v0.8.4
func (this *DNSAccount) AddZoneRequests(zoneID, requestType string, n int)
func (*DNSAccount) ExecuteRequests ¶
func (this *DNSAccount) ExecuteRequests(logger logger.LogContext, zone DNSHostedZone, state DNSZoneState, reqs []*ChangeRequest) error
func (*DNSAccount) GetZoneState ¶
func (this *DNSAccount) GetZoneState(zone DNSHostedZone) (DNSZoneState, error)
func (*DNSAccount) GetZones ¶
func (this *DNSAccount) GetZones() (DNSHostedZones, error)
func (*DNSAccount) Hash ¶
func (this *DNSAccount) Hash() string
func (*DNSAccount) MapTarget ¶
func (this *DNSAccount) MapTarget(t Target) Target
func (*DNSAccount) ProviderType ¶
func (this *DNSAccount) ProviderType() string
func (*DNSAccount) Release ¶
func (this *DNSAccount) Release()
func (*DNSAccount) ReportZoneStateConflict ¶
func (this *DNSAccount) ReportZoneStateConflict(zone DNSHostedZone, err error) bool
type DNSHandler ¶
type DNSHandler interface { ProviderType() string GetZones() (DNSHostedZones, error) GetZoneState(DNSHostedZone) (DNSZoneState, error) ReportZoneStateConflict(zone DNSHostedZone, err error) bool ExecuteRequests(logger logger.LogContext, zone DNSHostedZone, state DNSZoneState, reqs []*ChangeRequest) error MapTarget(t Target) Target Release() }
type DNSHandlerConfig ¶
type DNSHandlerConfig struct { Logger logger.LogContext Properties utils.Properties Config *runtime.RawExtension DryRun bool Context context.Context CacheConfig ZoneCacheConfig Options *FactoryOptions Metrics Metrics RateLimiter flowcontrol.RateLimiter }
func (*DNSHandlerConfig) FillDefaultedBoolProperty ¶ added in v0.7.21
func (*DNSHandlerConfig) FillDefaultedIntProperty ¶ added in v0.7.7
func (*DNSHandlerConfig) FillDefaultedProperty ¶ added in v0.7.14
func (*DNSHandlerConfig) FillRequiredIntProperty ¶ added in v0.7.7
func (c *DNSHandlerConfig) FillRequiredIntProperty(target **int, prop string, alt ...string) error
func (*DNSHandlerConfig) FillRequiredProperty ¶ added in v0.7.7
func (c *DNSHandlerConfig) FillRequiredProperty(target **string, prop string, alt ...string) error
func (*DNSHandlerConfig) GetDefaultedBoolProperty ¶ added in v0.7.21
func (*DNSHandlerConfig) GetDefaultedIntProperty ¶ added in v0.7.7
func (*DNSHandlerConfig) GetDefaultedProperty ¶ added in v0.7.7
func (c *DNSHandlerConfig) GetDefaultedProperty(key string, def string, altKeys ...string) string
func (*DNSHandlerConfig) GetProperty ¶
func (c *DNSHandlerConfig) GetProperty(key string, altKeys ...string) string
func (*DNSHandlerConfig) GetRequiredBoolProperty ¶ added in v0.7.21
func (c *DNSHandlerConfig) GetRequiredBoolProperty(key string, altKeys ...string) (bool, error)
func (*DNSHandlerConfig) GetRequiredIntProperty ¶ added in v0.7.7
func (c *DNSHandlerConfig) GetRequiredIntProperty(key string, altKeys ...string) (int, error)
func (*DNSHandlerConfig) GetRequiredProperty ¶
func (c *DNSHandlerConfig) GetRequiredProperty(key string, altKeys ...string) (string, error)
type DNSHandlerCreatorFunction ¶
type DNSHandlerCreatorFunction func(config *DNSHandlerConfig) (DNSHandler, error)
type DNSHandlerFactory ¶
type DNSHandlerFactory interface { Name() string TypeCodes() utils.StringSet Create(typecode string, config *DNSHandlerConfig) (DNSHandler, error) IsResponsibleFor(object *dnsutils.DNSProviderObject) bool SupportZoneStateCache(typecode string) (bool, error) }
type DNSHandlerOptionSource ¶ added in v0.7.12
type DNSHandlerOptionSource interface {
CreateOptionSource() (local config.OptionSource, defaults *GenericFactoryOptions)
}
type DNSHostedZone ¶
type DNSHostedZone interface { ProviderType() string Key() string Id() string Domain() string ForwardedDomains() []string Match(dnsname string) int IsPrivate() bool }
func CopyDNSHostedZone ¶
func CopyDNSHostedZone(zone DNSHostedZone, forwardedDomains []string) DNSHostedZone
func NewDNSHostedZone ¶
func NewDNSHostedZone(ptype string, id, domain, key string, forwarded []string, isPrivate bool) DNSHostedZone
type DNSHostedZones ¶
type DNSHostedZones []DNSHostedZone
type DNSProvider ¶
type DNSProvider interface { ObjectName() resources.ObjectName Object() resources.Object TypeCode() string DefaultTTL() int64 GetZones() DNSHostedZones IncludesZone(zoneID string) bool GetZoneState(zone DNSHostedZone) (DNSZoneState, error) ExecuteRequests(logger logger.LogContext, zone DNSHostedZone, state DNSZoneState, requests []*ChangeRequest) error Match(dns string) int MatchZone(dns string) int IsValid() bool AccountHash() string MapTarget(t Target) Target // ReportZoneStateConflict is used to report a conflict because of stale data. // It returns true if zone data will be updated and a retry may resolve the conflict ReportZoneStateConflict(zone DNSHostedZone, err error) bool }
type DNSProviders ¶
type DNSProviders map[resources.ObjectName]DNSProvider
func (DNSProviders) LookupFor ¶
func (this DNSProviders) LookupFor(dns string) DNSProvider
type DNSZoneState ¶
func NewDNSZoneState ¶
func NewDNSZoneState(sets dns.DNSSets) DNSZoneState
type DefaultContext ¶
type DefaultContext struct { logger.LogContext // contains filtered or unexported fields }
func (*DefaultContext) EnqueueCommand ¶
func (this *DefaultContext) EnqueueCommand(cmd string) error
func (*DefaultContext) EnqueueKey ¶
func (this *DefaultContext) EnqueueKey(key resources.ClusterObjectKey) error
func (*DefaultContext) GetByExample ¶
func (*DefaultContext) GetContext ¶
func (this *DefaultContext) GetContext() context.Context
func (*DefaultContext) GetIntOption ¶
func (this *DefaultContext) GetIntOption(name string) (int, error)
func (*DefaultContext) GetPoolPeriod ¶
func (this *DefaultContext) GetPoolPeriod(name string) *time.Duration
func (*DefaultContext) GetSecretPropertiesByRef ¶
func (this *DefaultContext) GetSecretPropertiesByRef(src resources.ResourcesSource, ref *corev1.SecretReference) (utils.Properties, *resources.SecretObject, error)
func (*DefaultContext) GetStringOption ¶ added in v0.7.12
func (this *DefaultContext) GetStringOption(name string) (string, error)
func (*DefaultContext) HasFinalizer ¶
func (this *DefaultContext) HasFinalizer(obj resources.Object) bool
func (*DefaultContext) IsReady ¶
func (this *DefaultContext) IsReady() bool
func (*DefaultContext) RemoveFinalizer ¶
func (this *DefaultContext) RemoveFinalizer(obj resources.Object) error
func (*DefaultContext) SetFinalizer ¶
func (this *DefaultContext) SetFinalizer(obj resources.Object) error
func (*DefaultContext) Synchronize ¶ added in v0.7.12
func (this *DefaultContext) Synchronize(log logger.LogContext, name string, obj resources.Object) (bool, error)
type DefaultDNSHandler ¶
type DefaultDNSHandler struct {
// contains filtered or unexported fields
}
func NewDefaultDNSHandler ¶
func NewDefaultDNSHandler(providerType string) DefaultDNSHandler
func (*DefaultDNSHandler) MapTarget ¶
func (this *DefaultDNSHandler) MapTarget(t Target) Target
func (*DefaultDNSHandler) ProviderType ¶
func (this *DefaultDNSHandler) ProviderType() string
type DefaultDNSHostedZone ¶
type DefaultDNSHostedZone struct {
// contains filtered or unexported fields
}
func (*DefaultDNSHostedZone) Domain ¶
func (this *DefaultDNSHostedZone) Domain() string
func (*DefaultDNSHostedZone) ForwardedDomains ¶
func (this *DefaultDNSHostedZone) ForwardedDomains() []string
func (*DefaultDNSHostedZone) Id ¶
func (this *DefaultDNSHostedZone) Id() string
func (*DefaultDNSHostedZone) IsPrivate ¶
func (this *DefaultDNSHostedZone) IsPrivate() bool
func (*DefaultDNSHostedZone) Key ¶
func (this *DefaultDNSHostedZone) Key() string
func (*DefaultDNSHostedZone) Match ¶ added in v0.8.1
func (this *DefaultDNSHostedZone) Match(dnsname string) int
func (*DefaultDNSHostedZone) ProviderType ¶
func (this *DefaultDNSHostedZone) ProviderType() string
type DefaultDNSZoneState ¶
type DefaultDNSZoneState struct {
// contains filtered or unexported fields
}
func (*DefaultDNSZoneState) Clone ¶ added in v0.7.14
func (this *DefaultDNSZoneState) Clone() DNSZoneState
func (*DefaultDNSZoneState) GetDNSSets ¶
func (this *DefaultDNSZoneState) GetDNSSets() dns.DNSSets
type DoneHandler ¶
func NewStatusUpdate ¶
func NewStatusUpdate(logger logger.LogContext, e *Entry, f FinalizerHandler) DoneHandler
type DumpDNSHostedZone ¶
type Entries ¶
type Entries map[resources.ObjectName]*Entry
func (Entries) AddActiveZoneTo ¶ added in v0.7.18
func (Entries) AddResponsibleTo ¶ added in v0.7.12
type Entry ¶
type Entry struct { *EntryVersion // contains filtered or unexported fields }
func NewEntry ¶
func NewEntry(v *EntryVersion, state *state) *Entry
func (*Entry) IsModified ¶
func (*Entry) RemoveFinalizer ¶ added in v0.7.12
func (*Entry) Trigger ¶
func (this *Entry) Trigger(logger logger.LogContext)
func (*Entry) Update ¶
func (this *Entry) Update(logger logger.LogContext, new *EntryVersion) *Entry
type EntryList ¶
type EntryList []*Entry
func (EntryList) UpdateStatistic ¶ added in v0.7.12
func (this EntryList) UpdateStatistic(statistic *statistic.EntryStatistic)
type EntryPremise ¶
type EntryPremise struct {
// contains filtered or unexported fields
}
func (*EntryPremise) Match ¶ added in v0.7.12
func (this *EntryPremise) Match(p *EntryPremise) bool
func (*EntryPremise) NotifyChange ¶
func (this *EntryPremise) NotifyChange(p *EntryPremise) string
type EntryVersion ¶
type EntryVersion struct {
// contains filtered or unexported fields
}
func NewEntryVersion ¶
func NewEntryVersion(object *dnsutils.DNSEntryObject, old *Entry) *EntryVersion
func (*EntryVersion) ClusterKey ¶
func (this *EntryVersion) ClusterKey() resources.ClusterObjectKey
func (*EntryVersion) DNSName ¶
func (this *EntryVersion) DNSName() string
func (*EntryVersion) Description ¶
func (this *EntryVersion) Description() string
func (*EntryVersion) Interval ¶
func (this *EntryVersion) Interval() int64
func (*EntryVersion) IsDeleting ¶
func (this *EntryVersion) IsDeleting() bool
func (*EntryVersion) IsResponsible ¶ added in v0.7.7
func (this *EntryVersion) IsResponsible() bool
func (*EntryVersion) IsValid ¶
func (this *EntryVersion) IsValid() bool
func (*EntryVersion) KeepRecords ¶ added in v0.8.3
func (this *EntryVersion) KeepRecords() bool
func (*EntryVersion) Message ¶
func (this *EntryVersion) Message() string
func (*EntryVersion) Object ¶
func (this *EntryVersion) Object() *dnsutils.DNSEntryObject
func (*EntryVersion) ObjectName ¶
func (this *EntryVersion) ObjectName() resources.ObjectName
func (*EntryVersion) OwnerId ¶
func (this *EntryVersion) OwnerId() string
func (*EntryVersion) ProviderName ¶ added in v0.7.12
func (this *EntryVersion) ProviderName() resources.ObjectName
func (*EntryVersion) ProviderType ¶ added in v0.7.7
func (this *EntryVersion) ProviderType() string
func (*EntryVersion) RequiresUpdateFor ¶
func (this *EntryVersion) RequiresUpdateFor(e *EntryVersion) (reasons []string)
func (*EntryVersion) Setup ¶
func (this *EntryVersion) Setup(logger logger.LogContext, state *state, p *EntryPremise, op string, err error, config Config, old *Entry) reconcile.Status
func (*EntryVersion) State ¶
func (this *EntryVersion) State() string
func (*EntryVersion) TTL ¶
func (this *EntryVersion) TTL() int64
func (*EntryVersion) Targets ¶
func (this *EntryVersion) Targets() Targets
func (*EntryVersion) UpdateStatus ¶
func (this *EntryVersion) UpdateStatus(logger logger.LogContext, state string, msg string) (bool, error)
func (*EntryVersion) ZoneId ¶
func (this *EntryVersion) ZoneId() string
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
func NewDNSHandlerFactory ¶
func NewDNSHandlerFactory(typecode string, create DNSHandlerCreatorFunction, disableZoneStateCache ...bool) *Factory
func (*Factory) Create ¶
func (this *Factory) Create(typecode string, config *DNSHandlerConfig) (DNSHandler, error)
func (*Factory) CreateOptionSource ¶ added in v0.7.12
func (this *Factory) CreateOptionSource() (config.OptionSource, *GenericFactoryOptions)
func (*Factory) IsResponsibleFor ¶
func (this *Factory) IsResponsibleFor(object *dnsutils.DNSProviderObject) bool
func (*Factory) SetGenericFactoryOptionDefaults ¶ added in v0.7.12
func (this *Factory) SetGenericFactoryOptionDefaults(defaults ...GenericFactoryOptions) *Factory
func (*Factory) SetOptionSourceByExample ¶ added in v0.7.12
func (this *Factory) SetOptionSourceByExample(proto config.OptionSource, defaults ...GenericFactoryOptions) *Factory
func (*Factory) SetOptionSourceCreator ¶ added in v0.7.12
func (this *Factory) SetOptionSourceCreator(creator extension.OptionSourceCreator, defaults ...GenericFactoryOptions) *Factory
func (*Factory) SupportZoneStateCache ¶
type FactoryOptions ¶ added in v0.7.12
type FactoryOptions struct { // type specific options Options config.OptionSource // generic options for all factory types GenericFactoryOptions }
FactoryOptions is a set of generic options and type specific options related to factories that are provided for all provider types but in a provider specific manner. The provide specif options are defined by an option source optionally offered by the provider factory. It is handled by the compound factory, also, to provide dedicated option sets for hosted sub factories.
func GetFactoryOptions ¶ added in v0.7.12
func GetFactoryOptions(src config.OptionSource) *FactoryOptions
func (*FactoryOptions) AddOptionsToSet ¶ added in v0.7.12
func (this *FactoryOptions) AddOptionsToSet(set config.OptionSet)
func (*FactoryOptions) Evaluate ¶ added in v0.7.12
func (this *FactoryOptions) Evaluate() error
type FinalizerHandler ¶
type Finalizers ¶ added in v0.7.12
type ForwardedDomainsHandlerData ¶
type ForwardedDomainsHandlerData struct {
// contains filtered or unexported fields
}
func NewForwardedDomainsHandlerData ¶
func NewForwardedDomainsHandlerData() *ForwardedDomainsHandlerData
func (*ForwardedDomainsHandlerData) DeleteZone ¶
func (hd *ForwardedDomainsHandlerData) DeleteZone(zoneID string)
func (*ForwardedDomainsHandlerData) GetForwardedDomains ¶
func (hd *ForwardedDomainsHandlerData) GetForwardedDomains(zoneid string) []string
func (*ForwardedDomainsHandlerData) Marshal ¶
func (hd *ForwardedDomainsHandlerData) Marshal(zoneID string) (*PersistentHandlerData, error)
func (*ForwardedDomainsHandlerData) SetForwardedDomains ¶
func (hd *ForwardedDomainsHandlerData) SetForwardedDomains(zoneid string, value []string)
func (*ForwardedDomainsHandlerData) Unmarshal ¶
func (hd *ForwardedDomainsHandlerData) Unmarshal(zoneID string, data *PersistentHandlerData) error
type GenericFactoryOptions ¶ added in v0.7.12
type GenericFactoryOptions struct {
RateLimiterOptions
}
func (*GenericFactoryOptions) AddOptionsToSet ¶ added in v0.7.12
func (this *GenericFactoryOptions) AddOptionsToSet(set config.OptionSet)
func (GenericFactoryOptions) SetRateLimiterOptions ¶ added in v0.7.12
func (this GenericFactoryOptions) SetRateLimiterOptions(o RateLimiterOptions) GenericFactoryOptions
type HandlerData ¶
type HandlerData interface { Marshal(zoneID string) (*PersistentHandlerData, error) Unmarshal(zoneID string, data *PersistentHandlerData) error DeleteZone(zoneID string) }
type InMemory ¶
type InMemory struct {
// contains filtered or unexported fields
}
func NewInMemory ¶
func NewInMemory() *InMemory
func (*InMemory) AddZone ¶
func (m *InMemory) AddZone(zone DNSHostedZone) bool
func (*InMemory) Apply ¶
func (m *InMemory) Apply(zoneID string, request *ChangeRequest, metrics Metrics) error
func (*InMemory) BuildFullDump ¶
func (*InMemory) CloneZoneState ¶
func (m *InMemory) CloneZoneState(zone DNSHostedZone) (DNSZoneState, error)
func (*InMemory) DeleteZone ¶
func (m *InMemory) DeleteZone(zone DNSHostedZone)
func (*InMemory) FindHostedZone ¶
func (m *InMemory) FindHostedZone(zoneid string) DNSHostedZone
func (*InMemory) GetZones ¶
func (m *InMemory) GetZones() DNSHostedZones
func (*InMemory) SetZone ¶
func (m *InMemory) SetZone(zone DNSHostedZone, zoneState DNSZoneState)
type NullMetrics ¶
type NullMetrics struct{}
func (*NullMetrics) AddGenericRequests ¶ added in v0.8.4
func (m *NullMetrics) AddGenericRequests(request_type string, n int)
func (*NullMetrics) AddZoneRequests ¶ added in v0.8.4
func (m *NullMetrics) AddZoneRequests(zon, request_type string, n int)
type OwnerCache ¶
type OwnerCache struct {
// contains filtered or unexported fields
}
func NewOwnerCache ¶
func NewOwnerCache(config *Config) *OwnerCache
func (*OwnerCache) DeleteOwner ¶
func (*OwnerCache) GetIds ¶
func (this *OwnerCache) GetIds() utils.StringSet
func (*OwnerCache) IsResponsibleFor ¶
func (this *OwnerCache) IsResponsibleFor(id string) bool
func (*OwnerCache) IsResponsiblePendingFor ¶ added in v0.7.21
func (this *OwnerCache) IsResponsiblePendingFor(id string) bool
func (*OwnerCache) SetPending ¶ added in v0.7.21
func (this *OwnerCache) SetPending(id string)
func (*OwnerCache) UpdateCountsWith ¶ added in v0.7.12
func (this *OwnerCache) UpdateCountsWith(statistic statistic.OwnerStatistic, types utils.StringSet) OwnerCounts
func (*OwnerCache) UpdateOwner ¶
func (this *OwnerCache) UpdateOwner(owner *dnsutils.DNSOwnerObject) (changeset utils.StringSet, activeset utils.StringSet)
type OwnerCounts ¶ added in v0.7.12
type OwnerCounts map[OwnerName]ProviderTypeCounts
type OwnerIDInfo ¶ added in v0.7.12
type OwnerIDInfo struct {
// contains filtered or unexported fields
}
type OwnerIDInfos ¶ added in v0.7.12
type OwnerIDInfos map[string]OwnerIDInfo
func (OwnerIDInfos) Contains ¶ added in v0.7.12
func (this OwnerIDInfos) Contains(id string) bool
func (OwnerIDInfos) KeySet ¶ added in v0.7.12
func (this OwnerIDInfos) KeySet() utils.StringSet
type OwnerObjectInfo ¶ added in v0.7.12
type OwnerObjectInfo struct {
// contains filtered or unexported fields
}
type OwnerObjectInfos ¶ added in v0.7.12
type OwnerObjectInfos map[OwnerName]OwnerObjectInfo
type PersistentHandlerData ¶
type PersistentHandlerData struct { Name string `json:"name"` Version string `json:"version"` Value *runtime.RawExtension }
type PersistentZone ¶
type PersistentZone struct { ProviderType string `json:"providerType"` Key string `json:"key"` Id string `json:"id"` Domain string `json:"domain"` ForwardedDomains []string `json:"forwardedDomains"` IsPrivate bool `json:"isPrivate"` }
func NewPersistentZone ¶
func NewPersistentZone(zone DNSHostedZone) *PersistentZone
func (*PersistentZone) ToDNSHostedZone ¶
func (z *PersistentZone) ToDNSHostedZone() DNSHostedZone
type PersistentZoneState ¶
type PersistentZoneState struct { Version string `json:"version"` Valid time.Time `json:"valid"` Zone PersistentZone `json:"zone"` DNSSets dns.DNSSets `json:"dnssets,omitempty"` HandlerData *PersistentHandlerData `json:"handlerData,omitempty"` }
type ProviderTypeCounts ¶ added in v0.7.12
type RateLimiterConfig ¶ added in v0.7.12
func (*RateLimiterConfig) NewRateLimiter ¶ added in v0.7.12
func (c *RateLimiterConfig) NewRateLimiter() (flowcontrol.RateLimiter, error)
func (*RateLimiterConfig) String ¶ added in v0.7.12
func (c *RateLimiterConfig) String() string
type RateLimiterOptions ¶ added in v0.7.12
func (*RateLimiterOptions) AddOptionsToSet ¶ added in v0.7.12
func (this *RateLimiterOptions) AddOptionsToSet(set config.OptionSet)
func (*RateLimiterOptions) GetRateLimiterConfig ¶ added in v0.7.12
func (c *RateLimiterOptions) GetRateLimiterConfig() *RateLimiterConfig
func (RateLimiterOptions) SetBurst ¶ added in v0.7.12
func (c RateLimiterOptions) SetBurst(burst int) RateLimiterOptions
func (RateLimiterOptions) SetEnabled ¶ added in v0.7.12
func (c RateLimiterOptions) SetEnabled(enabled bool) RateLimiterOptions
func (RateLimiterOptions) SetQPS ¶ added in v0.7.12
func (c RateLimiterOptions) SetQPS(qps int) RateLimiterOptions
type References ¶ added in v0.7.12
type References struct {
// contains filtered or unexported fields
}
func NewReferenceCache ¶ added in v0.7.12
func NewReferenceCache() *References
func (*References) AddRef ¶ added in v0.7.12
func (this *References) AddRef(holder resources.ClusterObjectKey, ref resources.ClusterObjectKey)
func (*References) DelRef ¶ added in v0.7.12
func (this *References) DelRef(holder resources.ClusterObjectKey)
func (*References) NotifyHolder ¶ added in v0.7.12
func (this *References) NotifyHolder(ctx Context, ref resources.ClusterObjectKey)
type StatusUpdate ¶
type StatusUpdate struct { *Entry // contains filtered or unexported fields }
func (*StatusUpdate) Failed ¶
func (this *StatusUpdate) Failed(err error)
func (*StatusUpdate) SetInvalid ¶
func (this *StatusUpdate) SetInvalid(err error)
func (*StatusUpdate) Succeeded ¶
func (this *StatusUpdate) Succeeded()
type Target ¶
type Target interface { GetHostName() string GetRecordType() string GetEntry() *EntryVersion Description() string }
func NewTargetFromEntryVersion ¶
func NewTargetFromEntryVersion(name string, entry *EntryVersion) (Target, error)
func NewText ¶
func NewText(t string, entry *EntryVersion) Target
type ZoneCache ¶
type ZoneCache interface { GetZones() (DNSHostedZones, error) GetZoneState(zone DNSHostedZone) (DNSZoneState, error) ApplyRequests(logctx logger.LogContext, err error, zone DNSHostedZone, reqs []*ChangeRequest) GetHandlerData() HandlerData Release() ReportZoneStateConflict(zone DNSHostedZone, err error) bool }
func NewZoneCache ¶
func NewZoneCache(config ZoneCacheConfig, metrics Metrics, handlerData HandlerData, zonesUpdater ZoneCacheZoneUpdater, stateUpdater ZoneCacheStateUpdater) (ZoneCache, error)
type ZoneCacheConfig ¶
type ZoneCacheConfig struct {
// contains filtered or unexported fields
}
func (*ZoneCacheConfig) CopyWithDisabledZoneStateCache ¶
func (c *ZoneCacheConfig) CopyWithDisabledZoneStateCache() *ZoneCacheConfig
type ZoneCacheStateUpdater ¶
type ZoneCacheStateUpdater func(zone DNSHostedZone, cache ZoneCache) (DNSZoneState, error)
type ZoneCacheZoneUpdater ¶
type ZoneCacheZoneUpdater func(cache ZoneCache) (DNSHostedZones, error)
type ZoneDump ¶
type ZoneDump struct { HostedZone DumpDNSHostedZone DNSSets dns.DNSSets }
Source Files ¶
- changemodel.go
- config.go
- const.go
- context.go
- controller.go
- default.go
- entry.go
- factory.go
- foreign.go
- inmemory.go
- interface.go
- ownercache.go
- provider.go
- ratelimiter.go
- references.go
- state.go
- state_entry.go
- state_owner.go
- state_provider.go
- state_secret.go
- state_statistic.go
- state_zone.go
- statusupdate.go
- target.go
- utils.go
- zone.go
- zonecache.go
Click to show internal directories.
Click to hide internal directories.