juju

package module
v0.0.0-...-b8b985e Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: Apache-2.0 Imports: 19 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

juju-coredns-plugin

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Ttl         *uint32               `yaml:"ttl"`
	Controllers map[string]Controller `yaml:"controllers"`
}

func FromConfigFile

func FromConfigFile() (*Config, error)

func (*Config) Validate

func (c *Config) Validate() error

type Controller

type Controller struct {
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Address  string `yaml:"address"`
}

type Juju

type Juju struct {
	Next        plugin.Handler
	Controllers map[string]Controller
	Ttl         uint32
}

func NewJuju

func NewJuju(controllers map[string]Controller) *Juju

func (*Juju) GetAddress

func (j *Juju) GetAddress(ctx context.Context, fqdn JujuFQDN) (net.IP, error)

func (*Juju) GetConnection

func (j *Juju) GetConnection(controllerName, modelUUID string, controller Controller) (api.Connection, error)

func (*Juju) GetModelTag

func (j *Juju) GetModelTag(conn api.Connection, username string, fqdn JujuFQDN) (names.ModelTag, error)

func (*Juju) GetUnitAddress

func (j *Juju) GetUnitAddress(ctx context.Context, controller Controller, modelTag names.ModelTag, fqdn JujuFQDN) (net.IP, error)

func (*Juju) Name

func (j *Juju) Name() string

Name implements the Handler interface.

func (*Juju) ServeDNS

func (j *Juju) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error)

type JujuFQDN

type JujuFQDN struct {
	Controller  string
	Model       string
	Application string
	Unit        string
}

func ParseJujuFQDN

func ParseJujuFQDN(qname string) (JujuFQDN, error)

func (*JujuFQDN) IsValid

func (j *JujuFQDN) IsValid() bool

Jump to

Keyboard shortcuts

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