product

package
v0.1.3-test Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConsulClientCheck = "consul version"
	ConsulAgentCheck  = "consul info"
)
View Source
const (
	NomadClientCheck  = "nomad version"
	NomadAgentCheck   = "nomad server members"
	NomadDebugSeconds = 30
)
View Source
const (
	Consul = "consul"
	Host   = "host"
	Nomad  = "nomad"
	TFE    = "terraform-ent"
	Vault  = "vault"
)
View Source
const (
	DefaultDebugSeconds    = 10
	DefaultIntervalSeconds = 5
)
View Source
const (
	VaultClientCheck = "vault version"
	VaultAgentCheck  = "vault status"
)

Variables

This section is empty.

Functions

func CommanderHealthCheck

func CommanderHealthCheck(client, agent string) error

CommanderHealthCheck employs the the CLI to check if the client and then the agent are available.

func ConsulSeekers

func ConsulSeekers(tmpDir string, from, to time.Time) []*s.Seeker

ConsulSeekers seek information about Consul.

func CountSeekers

func CountSeekers(products map[string]*Product) int

func GetDisk

func GetDisk() (interface{}, error)

GetDisk stuff

func GetHost

func GetHost() (interface{}, error)

GetHost stuff

func GetMemory

func GetMemory() (interface{}, error)

GetMemory stuff

func GetNetwork

func GetNetwork() (interface{}, error)

GetNetwork stuff

func GetProcesses

func GetProcesses() (interface{}, error)

GetProcesses stuff

func HostSeekers

func HostSeekers(os string) *s.Seeker

func NomadSeekers

func NomadSeekers(tmpDir string, from, to time.Time) []*s.Seeker

NomadSeekers seek information about Nomad.

func TFESeekers

func TFESeekers(tmpDir string, from, to time.Time) []*s.Seeker

TFESeekers seek information about Terraform Enterprise/Cloud.

func VaultSeekers

func VaultSeekers(tmpDir string, from, to time.Time) ([]*s.Seeker, error)

VaultSeekers seek information about Vault.

Types

type Config

type Config struct {
	Logger *hclog.Logger
	Name   string
	TmpDir string
	From   time.Time
	To     time.Time
	OS     string
}

type HostSeeker

type HostSeeker struct {
	OS string `json:"os"`
}

func (*HostSeeker) Run

func (hs *HostSeeker) Run() (interface{}, error)

type Product

type Product struct {
	Name     string
	Seekers  []*seeker.Seeker
	Excludes []string
	Selects  []string
}

func NewConsul

func NewConsul(cfg Config) *Product

NewConsul takes a product config and creates a Product with all of Consul's default seekers

func NewHost

func NewHost(cfg Config) *Product

NewHost takes a product config and creates a Product containing all of the host's seekers.

func NewNomad

func NewNomad(cfg Config) *Product

NewNomad takes a product config and creates a Product with all of Nomad's default seekers

func NewTFE

func NewTFE(cfg Config) *Product

NewTFE takes a product config and creates a Product containing all of TFE's seekers.

func NewVault

func NewVault(cfg Config) (*Product, error)

NewVault takes a product config and creates a Product containing all of Vault's seekers.

func (*Product) Filter

func (p *Product) Filter() error

Filter applies our slices of exclude and select seeker.Identifier matchers to the set of the product's seekers

Jump to

Keyboard shortcuts

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