Documentation ¶
Index ¶
- func BuildRunners[T Blocks](config T, tmpDir string, c *client.APIClient, since, until time.Time, ...) ([]runner.Runner, error)
- func MapRedacts(redactions []Redact) ([]*redact.Redact, error)
- func ProductsMap(products []*Product) map[string]*Product
- func ValidateRedactions(redactions []Redact) error
- type Agent
- type Blocks
- type Command
- type Copy
- type DockerLog
- type GET
- type HCL
- type Host
- type JournaldLog
- type Product
- type Redact
- type Shell
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildRunners ¶
func BuildRunners[T Blocks](config T, tmpDir string, c *client.APIClient, since, until time.Time, redactions []*redact.Redact) ([]runner.Runner, error)
BuildRunners steps through the HCLConfig structs and maps each runner config type to the corresponding New<Runner> function. All custom runners are reduced into a linear slice of runners and served back up to the product. No runners are returned if any config is invalid.
func MapRedacts ¶
MapRedacts maps HCL redactions to "real" `redact.Redact`s
func ProductsMap ¶
ProductsMap takes the collection of products and returns a map that keys each product to its Name.
func ValidateRedactions ¶
ValidateRedactions takes a slice of redactions and ensures they match valid names.
Types ¶
type Agent ¶
type Agent struct {
Redactions []Redact `hcl:"redact,block" json:"redactions,omitempty"`
}
NOTE(dcohen) this is currently a separate config block, as opposed to a parent block of the others
type HCL ¶
type Host ¶
type Host struct { Commands []Command `hcl:"command,block" json:"commands,omitempty"` Shells []Shell `hcl:"shell,block" json:"shells,omitempty"` GETs []GET `hcl:"GET,block" json:"gets,omitempty"` Copies []Copy `hcl:"copy,block" json:"copies,omitempty"` DockerLogs []DockerLog `hcl:"docker-log,block" json:"docker_log,omitempty"` JournaldLogs []JournaldLog `hcl:"journald-log,block" json:"journald_log,omitempty"` Excludes []string `hcl:"excludes,optional" json:"excludes,omitempty"` Selects []string `hcl:"selects,optional" json:"selects,omitempty"` Redactions []Redact `hcl:"redact,block" json:"redactions,omitempty"` }
type JournaldLog ¶
type Product ¶
type Product struct { Name string `hcl:"name,label" json:"name"` Commands []Command `hcl:"command,block" json:"commands,omitempty"` Shells []Shell `hcl:"shell,block" json:"shells,omitempty"` GETs []GET `hcl:"GET,block" json:"gets,omitempty"` Copies []Copy `hcl:"copy,block" json:"copies,omitempty"` DockerLogs []DockerLog `hcl:"docker-log,block" json:"docker_log,omitempty"` JournaldLogs []JournaldLog `hcl:"journald-log,block" json:"journald_log,omitempty"` Excludes []string `hcl:"excludes,optional" json:"excludes,omitempty"` Selects []string `hcl:"selects,optional" json:"selects,omitempty"` Redactions []Redact `hcl:"redact,block" json:"redactions,omitempty"` }
Click to show internal directories.
Click to hide internal directories.