product

package
v0.3.1-rc0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: MPL-2.0 Imports: 9 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"
	NomadDebugDuration = 2 * time.Minute
	NomadDebugInterval = 30 * time.Second
)
View Source
const (
	Consul = "consul"
	Host   = "host"
	Nomad  = "nomad"
	TFE    = "terraform-ent"
	Vault  = "vault"
)
View Source
const (
	DefaultDuration = 10 * time.Second
	DefaultInterval = 5 * time.Second
)
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 CLI to check if the client and then the agent are available.

func ConsulSeekers

func ConsulSeekers(cfg Config, api *client.APIClient) ([]*s.Seeker, error)

ConsulSeekers seek information about Consul.

func CountSeekers

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

func HostSeekers

func HostSeekers(os string) []*seeker.Seeker

HostSeekers checks the operating system and passes it into the seekers.

func NomadSeekers

func NomadSeekers(cfg Config, api *client.APIClient) ([]*s.Seeker, error)

NomadSeekers seek information about Nomad.

func TFESeekers

func TFESeekers(cfg Config, api *client.APIClient) ([]*s.Seeker, error)

TFESeekers seek information about Terraform Enterprise/Cloud.

func VaultSeekers

func VaultSeekers(cfg Config, api *client.APIClient) ([]*s.Seeker, error)

VaultSeekers seek information about Vault.

Types

type Config

type Config struct {
	Name          string
	TmpDir        string
	Since         time.Time
	Until         time.Time
	OS            string
	DebugDuration time.Duration
	DebugInterval time.Duration
}

type Product

type Product struct {
	Name     string
	Seekers  []*seeker.Seeker
	Excludes []string
	Selects  []string
	Config   Config
	// contains filtered or unexported fields
}

func NewConsul

func NewConsul(logger hclog.Logger, cfg Config) (*Product, error)

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

func NewHost

func NewHost(logger hclog.Logger, cfg Config) *Product

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

func NewNomad

func NewNomad(logger hclog.Logger, cfg Config) (*Product, error)

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

func NewTFE

func NewTFE(logger hclog.Logger, cfg Config) (*Product, error)

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

func NewVault

func NewVault(logger hclog.Logger, 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

func (*Product) Run added in v0.3.1

func (p *Product) Run() map[string]seeker.Seeker

Run iterates over the list of seekers in a product and stores each seeker into a map.

Jump to

Keyboard shortcuts

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