consumers

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2017 License: MIT Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSClient

type AWSClient interface {
	ListRecordSets(zoneID string) ([]*route53.ResourceRecordSet, error)
	ChangeRecordSets(upsert, del, create []*route53.ResourceRecordSet, zoneID string) error
	GetCanonicalZoneIDs(lbDNS []string) (map[string]string, error) //get hosted zone ids for the LBs
	GetHostedZones() (map[string]string, error)                    //get all route53 hosted zones for the account
}

AWSClient interface

type Consumer

type Consumer interface {
	Sync([]*pkg.Endpoint) error
	Consume(<-chan *pkg.Endpoint, chan<- error, <-chan struct{}, *sync.WaitGroup)
	Process(*pkg.Endpoint) error
}

Consumer interface

func NewAWSRoute53Consumer added in v0.6.0

func NewAWSRoute53Consumer(awsRecordGroupID string) (Consumer, error)

NewAWSRoute53Consumer reates a Consumer instance to sync and process DNS entries in AWS Route53.

func NewGoogleCloudDNSConsumer added in v0.6.0

func NewGoogleCloudDNSConsumer(googleProject, googleRecordGroupID string) (Consumer, error)

NewGoogleCloudDNSConsumer creates

func NewStdoutConsumer added in v0.6.0

func NewStdoutConsumer() (Consumer, error)

func NewSynchronizedConsumer added in v0.6.0

func NewSynchronizedConsumer(consumer Consumer) (Consumer, error)

NewSynchronizedConsumer provides a consumer that can execute only one operation at a time, and blocks concurrent operations until the current one finishes.

type SynchronizedConsumer added in v0.6.0

type SynchronizedConsumer struct {
	sync.Mutex
	Consumer
}

func (*SynchronizedConsumer) Process added in v0.6.0

func (s *SynchronizedConsumer) Process(endpoint *pkg.Endpoint) error

func (*SynchronizedConsumer) Sync added in v0.6.0

func (s *SynchronizedConsumer) Sync(endpoints []*pkg.Endpoint) error

Jump to

Keyboard shortcuts

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