discovery

package
v0.0.0-...-87ce47b Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2017 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackupSets

BackupSets produces a BoltDB backup in a file called .bak

func CreateSet

func CreateSet(params operations.PostSetParams) middleware.Responder

CreateSet will make new sets

func DeleteSet

DeleteSet will remove an already existing set

func Discover

Discover does basic MCollective like discovery against PuppetDB

func GetSet

GetSet retrieves the parameters of a set and optionally does a discovery

func ListSets

ListSets finds all known sets

func SetConfig

func SetConfig(c Config) error

SetConfig allows callers to configure the service

func UpdateSet

UpdateSet will update an existing set with new parameters

Types

type Config

type Config struct {
	Listen       string
	Port         int
	TLSPort      int
	Logfile      string
	Debug        bool
	PuppetDBHost string
	PuppetDBPort int
	Certificate  string
	PrivateKey   string
	Ca           string
	DBFile       string
}

Config for the discovery service

type PuppetDB

type PuppetDB struct{}

PuppetDB based discovery helpers

func (PuppetDB) Discover

func (p PuppetDB) Discover(request *models.DiscoveryRequest) ([]string, error)

Discover nodes against PuppetDB

type Sets

type Sets struct {
	DB *bolt.DB
}

Sets manages named saved queries

func (Sets) Backup

func (s Sets) Backup(path *string) error

Backup performs a backup to the given path

func (Sets) Delete

func (s Sets) Delete(set string) error

Delete removes a set from the database

func (Sets) Exists

func (s Sets) Exists(setName string) bool

Exists determines if the set is known

func (Sets) Get

func (s Sets) Get(setName string) (*models.Set, error)

Get retrieves the definition for a set

func (Sets) Sets

func (s Sets) Sets() []models.Word

Sets retrieve a list of known sets from the database

func (Sets) Update

func (s Sets) Update(request *models.Set) error

Update updates or creates a set

Jump to

Keyboard shortcuts

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