store

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2018 License: Apache-2.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HostSet

type HostSet map[string]string

HostSet is a map of hosts (value is record type)

type Store

type Store struct {
	Records  map[string]HostSet
	Netviews map[string]string
	Cidrs    map[string]string
}

Store is a map of all IP addresses and their corresponding hostnames, netviews, and CIDRs

func NewStore

func NewStore() *Store

NewStore allocates a new store for the controller

func (*Store) AddRecord

func (st *Store) AddRecord(ip, host, recordType, netview, cidr string)

AddRecord adds/updates a record for an IP and hosts

func (*Store) DeleteHosts

func (st *Store) DeleteHosts(delHosts []string)

DeleteHosts deletes hosts from records

func (*Store) GetIP

func (st *Store) GetIP(host string) string

GetIP returns the IP address for a given host

Jump to

Keyboard shortcuts

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