route53

package
v0.0.0-...-2b6d021 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTTL  = 1
	DefaultType = "A"
)
View Source
const (
	RecordType = "A"
)

Variables

View Source
var (
	ErrZoneNotFound = errors.New("no zone found")
)

Functions

func NewProvider

func NewProvider(req *pb.CreateRequest) providers.Provider

NewProvider initializes a Route53Provider with defaults

func NewProviderFromConfig

func NewProviderFromConfig(cfg *Config) (providers.Provider, error)

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

type Config struct {
	Zone   string
	ZoneID string
	Name   string
	TTL    int
	Value  string
	Type   string
}

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

func MergeDefaultConfig(cfg *Config) *Config

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL