Documentation ¶
Index ¶
- Constants
- func NewProvider(req *pb.CreateRequest) providers.Provider
- func NewProviderFromConfig(cfg *Config) (providers.Provider, error)
- func NewRegistrationProvider(req *pb.Registration) providers.Provider
- type CloudflareProvider
- func (p *CloudflareProvider) Annotate(id string, l labels.Labels) error
- func (p *CloudflareProvider) Apply() error
- func (p *CloudflareProvider) AwaitReadiness() chan error
- func (p *CloudflareProvider) Cancel() error
- func (p *CloudflareProvider) Clone() error
- func (p *CloudflareProvider) ProbeReadiness() (bool, error)
- func (p *CloudflareProvider) Read() error
- func (p *CloudflareProvider) Select() (target.Selection, error)
- func (p *CloudflareProvider) Stop() error
- func (p *CloudflareProvider) Teardown() error
- type Config
Constants ¶
const ( DefaultTTL = 1 DefaultType = "A" )
Variables ¶
This section is empty.
Functions ¶
func NewProvider ¶
func NewProvider(req *pb.CreateRequest) providers.Provider
NewProvider initializes a CloudflareProvider with defaults
func NewRegistrationProvider ¶
func NewRegistrationProvider(req *pb.Registration) providers.Provider
NewRegistrationProvider initializes a CloudflareProvider for use with a registration callback vs a full blown provider implementation, extracting and mapping the correct part of the request configuration
Types ¶
type CloudflareProvider ¶
type CloudflareProvider struct { // Config holds our internal configuration options // for the instance of the CloudflareProvider Config *Config Zone cloudflare.Zone Records []cloudflare.DNSRecord // contains filtered or unexported fields }
CloudflareProvider implements a CloudflareProvider
func (*CloudflareProvider) Annotate ¶
func (p *CloudflareProvider) Annotate(id string, l labels.Labels) error
Annotate should implement applying labels or tags for a given resource type
func (*CloudflareProvider) Apply ¶
func (p *CloudflareProvider) Apply() error
Apply runs the CloudflareProvider end to end which in this instance is only associated with creating a dns record
func (*CloudflareProvider) AwaitReadiness ¶
func (p *CloudflareProvider) AwaitReadiness() chan error
AwaitReadiness should be implemented to detect when a CloudflareProvider has finished setting up a variant and can begin using it in an experiment
func (*CloudflareProvider) Cancel ¶
func (p *CloudflareProvider) Cancel() error
Cancel will abort and running or submitted CloudflareProvider
func (*CloudflareProvider) Clone ¶
func (p *CloudflareProvider) Clone() error
Clone creates a modified variant
func (*CloudflareProvider) ProbeReadiness ¶
func (p *CloudflareProvider) ProbeReadiness() (bool, error)
ProbeReadiness checks that the provisioned resource is available and ready to be included in a request
func (*CloudflareProvider) Read ¶
func (p *CloudflareProvider) 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 (*CloudflareProvider) Select ¶
func (p *CloudflareProvider) Select() (target.Selection, error)
Select is similar to Read yet copies a selection of resources based on the Target configuration
func (*CloudflareProvider) Stop ¶
func (p *CloudflareProvider) Stop() error
Stop will stop any running CloudflareProvider
func (*CloudflareProvider) Teardown ¶
func (p *CloudflareProvider) Teardown() error
Teardown eradicates any resource that has been provisioned as part of a variant
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