rrgen

package
v0.0.0-...-4592af0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2016 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Package rrgen finds out tasks eligible for having DNS records and generates th DNS Resource Records for these.

Index

Constants

This section is empty.

Variables

DnsFilters are list of filters applied in order to determine DNS eligibility of tasks. The end result of the filters are Tasks (containers) that can have DNS RRs.

Functions

func HasDnsName

func HasDnsName(t task.Task) (bool, string)

func HasPorts

func HasPorts(t task.Task) (bool, string)

func PortsHaveProtos

func PortsHaveProtos(t task.Task) (bool, string)

func RRs

func RRs(domain string, state task.ClusterState) rrstore.RRs

RRs determines the tasks which can have DNS Resource Records and returns the RRs based on the given cluster state.

Types

type BadTask

type BadTask struct {
	task.Task
	Reason string
}

BadTask describes a Task that is not eligible.

type FilterFunc

type FilterFunc func(t task.Task) (bool, string)

FilterFunc determines if a Task can be used, if not provides a reason.

type Filters

type Filters []FilterFunc

func (Filters) FilterTasks

func (f Filters) FilterTasks(ll []task.Task) ([]task.Task, []BadTask)

filterTasks filters tasks based on their eligibility for having DNS records and returns the list of good tasks and bad ones along with their reasons.

Jump to

Keyboard shortcuts

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