Documentation ¶
Index ¶
- type Config
- func (c *Config) ConsulHost() string
- func (c *Config) ConsulPort() string
- func (c *Config) SetConsulHost(consulhost string)
- func (c *Config) SetConsulPort(consulport string)
- func (c *Config) SetTTL(ttl int64)
- func (c *Config) SetZoneId(zoneid string)
- func (c *Config) TTL() int64
- func (c *Config) ZoneId() string
- type Consul
- type Consul2Route53
- type Json
- type Node
- type Record
- type Route53Srv
- func (r *Route53Srv) AddChange(changetype string, rec Record)
- func (r *Route53Srv) ChangeRecords() error
- func (r *Route53Srv) ChangesNum() int
- func (r *Route53Srv) GetRecords() error
- func (r *Route53Srv) GetZoneInfo() error
- func (r *Route53Srv) Records() []*Record
- func (r *Route53Srv) RecordsMap() (map[string]*Record, error)
- func (r *Route53Srv) SetSrv(srvroute53 SrvRoute53)
- func (r *Route53Srv) SetZone(zone string)
- func (r *Route53Srv) Srv() SrvRoute53
- func (r *Route53Srv) Zone() string
- type Service
- type Srv
- type SrvRoute53
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config represents the config settings for consul253
func ReadConfig ¶
ReadConfig reads a config yaml file on disk and returns config or error.
func (*Config) ConsulHost ¶
func (*Config) ConsulPort ¶
func (*Config) SetConsulHost ¶
func (*Config) SetConsulPort ¶
type Consul ¶
type Consul struct { *Config // contains filtered or unexported fields }
Consul represent information from a consul cluster
func (*Consul) GetNodes ¶
GetNodes connects to a consul server and retrieves information about nodes. Returns error.
func (*Consul) GetServiceInfo ¶
GetServiceInfo given a service name, connects to consul and retrieves information about that service. Returns *Service or error.
func (*Consul) GetServices ¶
GetServices connects to consul and gets a list of services. Returns error.
func (*Consul) ServicesMap ¶
type Consul2Route53 ¶
type Consul2Route53 struct { *Config *Consul *Route53Srv }
func New ¶
func New(c Config) *Consul2Route53
func (*Consul2Route53) Run ¶
func (c *Consul2Route53) Run() error
type Route53Srv ¶
type Route53Srv struct { *Config Changes []*route53.Change // contains filtered or unexported fields }
func (*Route53Srv) AddChange ¶
func (r *Route53Srv) AddChange(changetype string, rec Record)
AddChange will handed "CHANGE","DELETE" or "UPSERT" and a pointer to a Record will add that change to Changes.
func (*Route53Srv) ChangeRecords ¶
func (r *Route53Srv) ChangeRecords() error
ChangeRecords will execute a set of DNS changes in Route53, returns error.
func (*Route53Srv) ChangesNum ¶
func (r *Route53Srv) ChangesNum() int
func (*Route53Srv) GetRecords ¶
func (r *Route53Srv) GetRecords() error
GetRecords retrieves DNS records from Route53 and returns error.
func (*Route53Srv) GetZoneInfo ¶
func (r *Route53Srv) GetZoneInfo() error
func (*Route53Srv) Records ¶
func (r *Route53Srv) Records() []*Record
func (*Route53Srv) RecordsMap ¶
func (r *Route53Srv) RecordsMap() (map[string]*Record, error)
func (*Route53Srv) SetSrv ¶
func (r *Route53Srv) SetSrv(srvroute53 SrvRoute53)
func (*Route53Srv) SetZone ¶
func (r *Route53Srv) SetZone(zone string)
func (*Route53Srv) Srv ¶
func (r *Route53Srv) Srv() SrvRoute53
func (*Route53Srv) Zone ¶
func (r *Route53Srv) Zone() string
type SrvRoute53 ¶
type SrvRoute53 interface { ListResourceRecordSets(*route53.ListResourceRecordSetsInput) (*route53.ListResourceRecordSetsOutput, error) ChangeResourceRecordSets(*route53.ChangeResourceRecordSetsInput) (*route53.ChangeResourceRecordSetsOutput, error) GetHostedZone(*route53.GetHostedZoneInput) (*route53.GetHostedZoneOutput, error) }