Documentation ¶
Index ¶
- Constants
- Variables
- func NewProvider(req *pb.CreateRequest) providers.Provider
- func NewProviderFromConfig(cfg *Config) (providers.Provider, error)
- func NewRegistrationProvider(req *pb.Registration) providers.Provider
- type Config
- type Route53Provider
- func (p *Route53Provider) Annotate(id string, l labels.Labels) error
- func (p *Route53Provider) Apply() error
- func (p *Route53Provider) AwaitReadiness() chan error
- func (p *Route53Provider) Cancel() error
- func (p *Route53Provider) Clone() error
- func (p *Route53Provider) ProbeReadiness() (bool, error)
- func (p *Route53Provider) Read() error
- func (p *Route53Provider) Select() (target.Selection, error)
- func (p *Route53Provider) Stop() error
- func (p *Route53Provider) Teardown() error
Constants ¶
const ( DefaultTTL = 1 DefaultType = "A" )
const (
RecordType = "A"
)
Variables ¶
var (
ErrZoneNotFound = errors.New("no zone found")
)
Functions ¶
func NewProvider ¶
func NewProvider(req *pb.CreateRequest) providers.Provider
NewProvider initializes a Route53Provider with defaults
func NewRegistrationProvider ¶
func NewRegistrationProvider(req *pb.Registration) providers.Provider
NewRegistrationProvider initializes a Route53Provider for use with a registration callback vs a full blown provider implementation, extracting and mapping the correct part of the request configuration
Types ¶
type Config ¶
Config holds allowed values for an implemented resource provider. Any value outside of this config is unable to be modified during resource creation.
func DefaultConfig ¶
func DefaultConfig() *Config
func MergeDefaultConfig ¶
type Route53Provider ¶
type Route53Provider struct { // Config holds our internal configuration options // for the instance of the Route53Provider Config *Config Zone string Records []cloudflare.DNSRecord // contains filtered or unexported fields }
Route53Provider implements a Route53Provider
func (*Route53Provider) Annotate ¶
func (p *Route53Provider) Annotate(id string, l labels.Labels) error
Annotate should implement applying labels or tags for a given resource type
func (*Route53Provider) Apply ¶
func (p *Route53Provider) Apply() error
Apply runs the Route53Provider end to end which in this instance is only associated with creating a dns record
func (*Route53Provider) AwaitReadiness ¶
func (p *Route53Provider) AwaitReadiness() chan error
AwaitReadiness should be implemented to detect when a Route53Provider has finished setting up a variant and can begin using it in an experiment
func (*Route53Provider) Cancel ¶
func (p *Route53Provider) Cancel() error
Cancel will abort and running or submitted Route53Provider
func (*Route53Provider) Clone ¶
func (p *Route53Provider) Clone() error
Clone creates a modified variant
func (*Route53Provider) ProbeReadiness ¶
func (p *Route53Provider) ProbeReadiness() (bool, error)
ProbeReadiness checks that the provisioned resource is available and ready to be included in a request
func (*Route53Provider) Read ¶
func (p *Route53Provider) Read() error
Read fetches and stores the configuration for an existing cloudflare zone. What is read of the existing resource acts as the template/configuration to implement a clone via creating a new resource with the existing output as input for a variant
func (*Route53Provider) Select ¶
func (p *Route53Provider) Select() (target.Selection, error)
Select is similar to Read yet copies a selection of resources based on the Target configuration
func (*Route53Provider) Stop ¶
func (p *Route53Provider) Stop() error
Stop will stop any running Route53Provider
func (*Route53Provider) Teardown ¶
func (p *Route53Provider) Teardown() error
Teardown eradicates any resource that has been provisioned as part of a variant