Documentation ¶
Index ¶
- Constants
- func GetServer(plugin apis.StartStopPlugin) (*server, error)
- func IsIPv4(ip net.IP) bool
- func IsIPv6(ip net.IP) bool
- func NewGrpcPlugin(prefix string) apis.StartStopPlugin
- func NewInstaller(prefix string, ghClient github.Client) apis.InstallablePlugin
- func NewServer() *server
- type AddResourceRecordFunc
- type Manager
- type RemoveResourceRecordFunc
- type Runner
Constants ¶
const GrpcPluginName = "coredns-grpc"
const PluginName = "coredns"
Variables ¶
This section is empty.
Functions ¶
func GetServer ¶
func GetServer(plugin apis.StartStopPlugin) (*server, error)
GetServer returns the backend grpc server if it is the grpcPlugin. Otherwise it returns an error.
func IsIPv4 ¶
IsIPv4 checks if the given ip address is an IPv4 address. It returns true if it is a IPv4 address. Otherwise false.
func IsIPv6 ¶
IsIPv6 checks if the given ip address is an IPv6 address. It returns true if it is a IPv6 address. Otherwise false.
func NewGrpcPlugin ¶
func NewGrpcPlugin(prefix string) apis.StartStopPlugin
NewGrpcPlugin initializes a new StartStopPlugin that will controls the lifecycle of the server instance.
func NewInstaller ¶
func NewInstaller(prefix string, ghClient github.Client) apis.InstallablePlugin
Types ¶
type AddResourceRecordFunc ¶
AddResourceRecordFunc is the function signature for adding resource records. It is used to add A, AAAA and CNAME entries.
type Manager ¶
type Manager interface { // AddHost adds a new host to ip resource record. Depending on the type of // the ip it can be either an "A" or an "AAAA" record. // It allows to store multiple targets for the same host name. In this case // the regular round-robin mechanism for load balancing will be used. // If either the hostname or the target ip is not valid it will return an error. AddHost(hostName string, ip string) error // AddAlias adds a new host to CNAME resource record. // It allows to store multiple targets for the same host name. In this case // the regular round-robin mechanism for load balancing will be used. // If either the hostname or the target is not valid it will return an error. AddAlias(hostName string, target string) error // RemoveHost removes all "A", "AAAA" and "CNAME" records for the given hostname. RemoveHost(hostName string) }
Manager defines the interface for plugins to interact with the CoreDNS backend.
func NewManager ¶
func NewManager(plugin apis.StartStopPlugin) (Manager, error)
NewManager initializes a new Manager instance with the given plugin as backend.
func NewNoOpManager ¶
func NewNoOpManager() Manager
NewNoOpManager initializes the noOpManager for the Manager interface.
type RemoveResourceRecordFunc ¶
type RemoveResourceRecordFunc func(string)
AddResourceRecordFunc is the function signature for adding resource records. It is used to add A, AAAA and CNAME entries.