dns

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2015 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAndServe

func ListenAndServe(config *server.Config, client *client.Client, etcdclient *etcd.Client) error

ListenAndServe starts a DNS server that exposes services and values stored in etcd (if etcdclient is not nil). It will block until the server exits. TODO: hoist the service accessor out of this package so it can be reused.

func NewServerDefaults

func NewServerDefaults() (*server.Config, error)

NewServerDefaults returns the default SkyDNS server configuration for a DNS server.

Types

type FallbackFunc added in v0.4.3

type FallbackFunc func(name string, exact bool) (string, bool)

type ServiceAccessor

type ServiceAccessor interface {
	client.ServicesNamespacer
	ServiceByPortalIP(ip string) (*api.Service, error)
}

Service Accessor is the interface used by the ServiceResolver to access services.

func NewCachedServiceAccessor

func NewCachedServiceAccessor(client *client.Client, stopCh <-chan struct{}) ServiceAccessor

NewCachedServiceAccessor returns a service accessor that can answer queries about services. It uses a backing cache to make PortalIP lookups efficient.

type ServiceResolver

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

ServiceResolver is a SkyDNS backend that will serve lookups for DNS entries based on Kubernetes service entries. The default DNS name for each service will be `<name>.<namespace>.<base>` where base can be an arbitrary depth DNS suffix. Queries not recognized within this base will return an error.

func NewServiceResolver

func NewServiceResolver(config *server.Config, accessor ServiceAccessor, endpoints kclient.EndpointsNamespacer, fn FallbackFunc) *ServiceResolver

NewServiceResolver creates an object that will return DNS record entries for SkyDNS based on service names.

func (*ServiceResolver) Records

func (b *ServiceResolver) Records(name string, exact bool) ([]msg.Service, error)

Records implements the SkyDNS Backend interface and returns standard records for a name.

func (*ServiceResolver) ReverseRecord

func (b *ServiceResolver) ReverseRecord(name string) (*msg.Service, error)

ReverseRecord implements the SkyDNS Backend interface and returns standard records for a name.

Jump to

Keyboard shortcuts

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