Documentation
¶
Overview ¶
Package route53 emulates Amazon Route 53: hosted zones, resource record sets, tags, and health checks exist as real metadata with AWS-faithful validation, defaults, and error codes, and — since issue #1189 — Overcast's own DNS resolver (internal/dns) actually answers queries from them. See dns_resolve.go for the resolver integration and docs/services/route53.md for what is and is not served.
Implemented operations (REST-XML at /2013-04-01/):
Hosted zones: CreateHostedZone, GetHostedZone, ListHostedZones,
ListHostedZonesByName, GetHostedZoneCount,
UpdateHostedZoneComment, DeleteHostedZone
Record sets: ChangeResourceRecordSets, ListResourceRecordSets
Changes: GetChange
Tags: ChangeTagsForResource, ListTagsForResource, ListTagsForResources
Health checks: CreateHealthCheck, GetHealthCheck, ListHealthChecks,
GetHealthCheckCount, UpdateHealthCheck, DeleteHealthCheck
Route 53 is a global service — resources are stored without a region key. Documented divergences: ChangeResourceRecordSets applies synchronously, so change status is INSYNC immediately (no PENDING phase), and GetChange returns INSYNC for unknown change IDs instead of NoSuchChange so that CDK/CLI waiters always converge.
Index ¶
- type AlarmIdentifier
- type GeoLocation
- type HealthCheck
- type HealthCheckConfig
- type HostedZone
- type ResourceRecordSet
- type Service
- func (s *Service) DispatchQuery(w http.ResponseWriter, r *http.Request)
- func (s *Service) Lookup(ctx context.Context, qname string, qtype uint16) (dns.Route53Answer, bool)
- func (s *Service) Name() string
- func (s *Service) Operations() []op.Operation
- func (s *Service) OwnsAction(action string) bool
- func (s *Service) RegisterRoutes(r chi.Router)
- func (s *Service) SupportedProtocols() []codec.Codec
- type Tag
- type VPC
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlarmIdentifier ¶
type AlarmIdentifier struct {
Region string `json:"Region" xml:"Region"`
Name string `json:"Name" xml:"Name"`
}
AlarmIdentifier names the CloudWatch alarm backing a CLOUDWATCH_METRIC check.
type GeoLocation ¶
type GeoLocation struct {
ContinentCode string `json:"ContinentCode,omitempty" xml:"ContinentCode,omitempty"`
CountryCode string `json:"CountryCode,omitempty" xml:"CountryCode,omitempty"`
SubdivisionCode string `json:"SubdivisionCode,omitempty" xml:"SubdivisionCode,omitempty"`
}
GeoLocation mirrors the Route 53 GeoLocation shape on geolocation records.
type HealthCheck ¶
type HealthCheck struct {
Id string `json:"Id"`
CallerReference string `json:"CallerReference"`
CreatedAt time.Time `json:"CreatedAt"`
Version int64 `json:"Version"`
Config HealthCheckConfig `json:"Config"`
}
HealthCheck represents a Route 53 health check.
type HealthCheckConfig ¶
type HealthCheckConfig struct {
IPAddress string `json:"IPAddress,omitempty" xml:"IPAddress,omitempty"`
Port int `json:"Port,omitempty" xml:"Port,omitempty"`
Type string `json:"Type" xml:"Type"`
ResourcePath string `json:"ResourcePath,omitempty" xml:"ResourcePath,omitempty"`
FullyQualifiedDomainName string `json:"FullyQualifiedDomainName,omitempty" xml:"FullyQualifiedDomainName,omitempty"`
SearchString string `json:"SearchString,omitempty" xml:"SearchString,omitempty"`
RequestInterval int `json:"RequestInterval,omitempty" xml:"RequestInterval,omitempty"`
FailureThreshold int `json:"FailureThreshold,omitempty" xml:"FailureThreshold,omitempty"`
MeasureLatency *bool `json:"MeasureLatency,omitempty" xml:"MeasureLatency,omitempty"`
Inverted *bool `json:"Inverted,omitempty" xml:"Inverted,omitempty"`
Disabled *bool `json:"Disabled,omitempty" xml:"Disabled,omitempty"`
HealthThreshold *int `json:"HealthThreshold,omitempty" xml:"HealthThreshold,omitempty"`
ChildHealthChecks []string `json:"ChildHealthChecks,omitempty" xml:"ChildHealthChecks>ChildHealthCheck,omitempty"`
EnableSNI *bool `json:"EnableSNI,omitempty" xml:"EnableSNI,omitempty"`
Regions []string `json:"Regions,omitempty" xml:"Regions>Region,omitempty"`
AlarmIdentifier *AlarmIdentifier `json:"AlarmIdentifier,omitempty" xml:"AlarmIdentifier,omitempty"`
InsufficientDataHealthStatus string `json:"InsufficientDataHealthStatus,omitempty" xml:"InsufficientDataHealthStatus,omitempty"`
RoutingControlArn string `json:"RoutingControlArn,omitempty" xml:"RoutingControlArn,omitempty"`
}
HealthCheckConfig carries the health check configuration. The struct is shared between the wire format and persistence; field order matches the element order AWS emits.
type HostedZone ¶
type HostedZone struct {
Id string `json:"Id"` // AWS path form: /hostedzone/Z...
Name string `json:"Name"`
CallerReference string `json:"CallerReference"`
CreatedAt time.Time `json:"CreatedAt"`
Comment string `json:"Comment,omitempty"`
PrivateZone bool `json:"PrivateZone"`
NameServers []string `json:"NameServers,omitempty"`
VPCs []VPC `json:"VPCs,omitempty"`
}
HostedZone represents a Route 53 hosted zone.
type ResourceRecordSet ¶
type ResourceRecordSet struct {
Name string `json:"Name"`
Type string `json:"Type"`
SetIdentifier string `json:"SetIdentifier,omitempty"`
TTL int64 `json:"TTL"`
ResourceRecords []string `json:"ResourceRecords"`
Weight *int64 `json:"Weight,omitempty"`
Region string `json:"Region,omitempty"`
Failover string `json:"Failover,omitempty"`
MultiValueAnswer *bool `json:"MultiValueAnswer,omitempty"`
GeoLocation *GeoLocation `json:"GeoLocation,omitempty"`
HealthCheckId string `json:"HealthCheckId,omitempty"`
// AliasTarget fields
AliasHostedZoneId string `json:"AliasHostedZoneId,omitempty"`
AliasDNSName string `json:"AliasDNSName,omitempty"`
AliasEvaluateTargetHealth bool `json:"AliasEvaluateTargetHealth,omitempty"`
}
ResourceRecordSet represents a DNS record set in a hosted zone. Alias fields stay flattened for JSON compatibility with earlier releases.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements router.Service for Route 53.
func (*Service) DispatchQuery ¶
func (s *Service) DispatchQuery(w http.ResponseWriter, r *http.Request)
DispatchQuery satisfies router.QueryDispatcher. Route 53 natively uses REST-XML (path-based routing), but the typed operations also accept Query-protocol form-encoded POST requests with Action fields.
func (*Service) Lookup ¶
Lookup implements dns.Route53Source: it is what makes the DNS resolver treat this service's store as authoritative for the zones it holds.
func (*Service) Operations ¶
func (*Service) OwnsAction ¶
OwnsAction satisfies router.QueryActionOwner.