product

package
v0.5.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConsulClientCheck = "consul version"
	ConsulAgentCheck  = "consul info"
)
View Source
const (
	TimeoutTenSeconds    = runner.Timeout(10 * time.Second)
	TimeoutThirtySeconds = runner.Timeout(30 * time.Second)
)
View Source
const (
	NomadClientCheck   = "nomad version"
	NomadAgentCheck    = "nomad server members"
	NomadDebugDuration = 2 * time.Minute
	NomadDebugInterval = 30 * time.Second
)
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 CommandHealthCheck added in v0.5.0

func CommandHealthCheck(client, agent string) error

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

func CommandHealthCheckWithContext added in v0.5.0

func CommandHealthCheckWithContext(ctx context.Context, client, agent string) error

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

func CountRunners added in v0.4.0

func CountRunners(products map[Name]*Product) int

CountRunners takes a map of product references and returns a count of all the runners.

Types

type Config

type Config struct {
	Name          Name
	TmpDir        string
	Since         time.Time
	Until         time.Time
	OS            string
	DebugDuration time.Duration
	DebugInterval time.Duration
	HCL           *hcl.Product
	Redactions    []*redact.Redact
}

type Name added in v0.4.0

type Name string
const (
	Consul Name = "consul"
	Host   Name = "host"
	Nomad  Name = "nomad"
	TFE    Name = "terraform-ent"
	Vault  Name = "vault"
)

type Product

type Product struct {
	Name     Name
	Runners  []runner.Runner
	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 logger and product config, and it creates a Product with all of Consul's default runners.

func NewConsulWithContext added in v0.5.0

func NewConsulWithContext(ctx context.Context, logger hclog.Logger, cfg Config) (*Product, error)

NewConsulWithContext takes a context, a logger, and product config, and it creates a Product with all of Consul's default runners.

func NewHost

func NewHost(logger hclog.Logger, cfg Config, hcl2 *hcl.Host) (*Product, error)

NewHost takes a logger, config, and HCL, and it creates a Product with all the host's default runners.

func NewHostWithContext added in v0.5.0

func NewHostWithContext(ctx context.Context, logger hclog.Logger, cfg Config, hcl2 *hcl.Host) (*Product, error)

NewHostWithContext takes a context, a logger, config, and HCL, and it creates a Product with all the host's default runners.

func NewNomad

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

NewNomad takes a logger and product config, and it creates a Product with all of Nomad's default runners.

func NewNomadWithContext added in v0.5.0

func NewNomadWithContext(ctx context.Context, logger hclog.Logger, cfg Config) (*Product, error)

NewNomadWithContext takes a context, a logger, and product config, and it creates a Product with all of Nomad's default runners.

func NewTFE

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

NewTFE takes a logger and product config, and it creates a Product with all of TFE's default runners.

func NewTFEWithContext added in v0.5.0

func NewTFEWithContext(ctx context.Context, logger hclog.Logger, cfg Config) (*Product, error)

NewTFEWithContext takes a context, a logger, and product config, and it creates a Product with all of TFE's default runners.

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 runners.

func NewVaultWithContext added in v0.5.0

func NewVaultWithContext(ctx context.Context, logger hclog.Logger, cfg Config) (*Product, error)

NewVaultWithContext takes a context, a logger, and a config and creates a Product containing all of Vault's runners.

func (*Product) Filter

func (p *Product) Filter() error

Filter applies our slices of exclude and select runner.ID() matchers to the set of the product's runners.

func (*Product) Run added in v0.3.1

func (p *Product) Run() map[string]op.Op

Run iterates over the list of runners in a product and returns a map of runner IDs to Ops.

Jump to

Keyboard shortcuts

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