consumers

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer interface {
	Sync(computeZones []string, endpoints []*pkg.Endpoint) error
	Records(computeZones []string) (interface{}, error)
}

Consumer consumer provided endpoints

func New

func New(name string) (Consumer, error)

New creates A new producer

func NewSynced

func NewSynced(name string) (Consumer, error)

type GoogleConsumer

type GoogleConsumer struct {
	// contains filtered or unexported fields
}

GoogleConsumer synchronizes google cloud DNS

func NewGoogleConsumer

func NewGoogleConsumer() (*GoogleConsumer, error)

NewGoogleConsumer creates a new GoogleConsumer

func (*GoogleConsumer) Records

func (gc *GoogleConsumer) Records(computeZones []string) (interface{}, error)

Records current records managed by buddy

func (*GoogleConsumer) Sync

func (gc *GoogleConsumer) Sync(computeZones []string, endpoints []*pkg.Endpoint) error

func (*GoogleConsumer) SyncBulk

func (gc *GoogleConsumer) SyncBulk(computeZones []string, endpoints []*pkg.Endpoint) error

func (*GoogleConsumer) SyncOne

func (gc *GoogleConsumer) SyncOne(computeZones []string, endpoints []*pkg.Endpoint) error

Sync synchronizes provided endpoints with Cloud DNS

type RecordGroup

type RecordGroup struct {
	DNSName string   `json:"dnsName,omitempty"`
	DNSZone string   `json:"dnsZone,omitempty"`
	IPs     []string `json:"ips,omitempty"`
	TTL     int64    `json:"ttl,omitempty"`
	Labels  []string `json:"labels,omitempty"`
}

RecordGroup contains data from A and TXT record for the DNS name

type SyncedConsumer

type SyncedConsumer struct {
	sync.Mutex
	Consumer
}

func (*SyncedConsumer) Records

func (s *SyncedConsumer) Records(computeZones []string) (interface{}, error)

func (*SyncedConsumer) Sync

func (s *SyncedConsumer) Sync(computeZones []string, endpoints []*pkg.Endpoint) error

Jump to

Keyboard shortcuts

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