Documentation ¶
Index ¶
- Constants
- func AddRecord(targetsets dns.RecordSets, ty string, host string, ttl int64)
- func Create(c controller.Interface, factory DNSHandlerFactory) (reconcile.Interface, error)
- func DNSController(name string, factory DNSHandlerFactory) controller.Configuration
- func DNSReconcilerType(factory DNSHandlerFactory) controller.ReconcilerType
- func NewDNSState(ctx Context, classes *controller.Classes, config Config) *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) 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) error
- func (this *CompoundFactory) Create(typecode string, config *DNSHandlerConfig) (DNSHandler, error)
- 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) AddRequests(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) FillDefaultedIntProperty(target **int, def int, 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) 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) GetRequiredIntProperty(key string, altKeys ...string) (int, error)
- func (c *DNSHandlerConfig) GetRequiredProperty(key string, altKeys ...string) (string, error)
- type DNSHandlerCreatorFunction
- type DNSHandlerFactory
- 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) 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
- 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) ProviderType() string
- type DefaultDNSZoneState
- type DoneHandler
- type DumpDNSHostedZone
- type Entries
- type 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) Message() string
- func (this *EntryVersion) Object() *dnsutils.DNSEntryObject
- func (this *EntryVersion) ObjectName() resources.ObjectName
- func (this *EntryVersion) OwnerId() string
- 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) IsResponsibleFor(object *dnsutils.DNSProviderObject) bool
- func (this *Factory) Name() string
- func (this *Factory) SupportZoneStateCache(typecode string) (bool, error)
- func (this *Factory) TypeCodes() utils.StringSet
- type FinalizerHandler
- 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 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) UpdateOwner(owner *dnsutils.DNSOwnerObject) (changeset utils.StringSet, activeset utils.StringSet)
- func (this *OwnerCache) UpdateOwnerData(name, id string, active bool) (changeset utils.StringSet, activeset utils.StringSet)
- type OwnerInfo
- type PersistentHandlerData
- type PersistentZone
- type PersistentZoneState
- 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 = "setup" OPT_DNSDELAY = "dns-delay" OPT_RESCHEDULEDELAY = "reschedule-delay" OPT_DISABLE_ZONE_STATE_CACHING = "disable-zone-state-caching" OPT_PROVIDERTYPES = "provider-types" HOSTEDZONE_PREFIX = "hostedzone:" )
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 = "dnscontrollers"
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 TARGET_CLUSTER = source.TARGET_CLUSTER
View Source
const TempSuffix = ".~.tmp"
View Source
const ZoneCachePrefix = "zc-"
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(c controller.Interface, factory DNSHandlerFactory) (reconcile.Interface, error)
func DNSController ¶
func DNSController(name string, factory DNSHandlerFactory) controller.Configuration
func DNSReconcilerType ¶
func DNSReconcilerType(factory DNSHandlerFactory) controller.ReconcilerType
func NewDNSState ¶
func NewDNSState(ctx Context, classes *controller.Classes, config Config) *state
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) *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) 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) error
func (*CompoundFactory) Create ¶
func (this *CompoundFactory) Create(typecode string, config *DNSHandlerConfig) (DNSHandler, error)
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 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) GetIntOption(name string) (int, 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) AddRequests ¶
func (this *DNSAccount) AddRequests(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 Metrics Metrics }
func (*DNSHandlerConfig) FillDefaultedIntProperty ¶ added in v0.7.7
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) 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) 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) }
func NewDNSHandlerFactory ¶
func NewDNSHandlerFactory(typecode string, create DNSHandlerCreatorFunction, disableZoneStateCache ...bool) DNSHandlerFactory
type DNSHostedZone ¶
type DNSHostedZone interface { ProviderType() string Key() string Id() string Domain() string ForwardedDomains() []string 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 GetZones() DNSHostedZones GetZoneState(zone DNSHostedZone) (DNSZoneState, error) ExecuteRequests(logger logger.LogContext, zone DNSHostedZone, state DNSZoneState, requests []*ChangeRequest) error Match(dns string) int 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) 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
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) ProviderType ¶
func (this *DefaultDNSHostedZone) ProviderType() string
type DefaultDNSZoneState ¶
type DefaultDNSZoneState struct {
// contains filtered or unexported fields
}
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
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) Trigger ¶
func (this *Entry) Trigger(logger logger.LogContext)
func (*Entry) Update ¶
func (this *Entry) Update(logger logger.LogContext, new *EntryVersion) *Entry
type EntryPremise ¶
type EntryPremise struct {
// contains filtered or unexported fields
}
func (*EntryPremise) Equals ¶
func (this *EntryPremise) Equals(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) 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) 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 (*Factory) Create ¶
func (this *Factory) Create(typecode string, config *DNSHandlerConfig) (DNSHandler, error)
func (*Factory) IsResponsibleFor ¶
func (this *Factory) IsResponsibleFor(object *dnsutils.DNSProviderObject) bool
func (*Factory) SupportZoneStateCache ¶
type FinalizerHandler ¶
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 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) AddRequests ¶
func (m *NullMetrics) AddRequests(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) UpdateOwner ¶
func (this *OwnerCache) UpdateOwner(owner *dnsutils.DNSOwnerObject) (changeset utils.StringSet, activeset utils.StringSet)
func (*OwnerCache) UpdateOwnerData ¶
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 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(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 ¶
Click to show internal directories.
Click to hide internal directories.