Documentation ¶
Index ¶
Constants ¶
View Source
const (
StreamFormatTar = "tar"
)
Variables ¶
View Source
var GlobalFileRedactors []types.FileRedactor
View Source
var GlobalLock sync.Mutex
View Source
var GlobalScrubbers []types.BytesScrubber
Functions ¶
func FileRedactor ¶ added in v0.29.0
func FileRedactor(patterns []string) (types.FileRedactor, error)
FileRedactor creates a file redactor function from a list of files
func RawScrubber ¶
func RawScrubber(scrubSpec *types.Scrub) (types.BytesScrubber, error)
RawScrubber creates a scrubber function from a scrubSpec
Types ¶
type ByteSource ¶
type ByteSource struct { Spec types.Spec // Producer provides the seed data for this task Producer func(context.Context) ([]byte, error) // RawScrubber, if defined, rewrites the raw data to to remove sensitive data RawScrubber func([]byte) []byte // Parser, if defined, structures the raw data for json and human sinks Parser func(io.Reader) (interface{}, error) // StructuredScrubber, if defined, rewrites the structured data to remove sensitive data //StructedScrubber func(interface{}) (interface{}, error) // Template, if defined, renders structured data in a human-readable format Template string // If RawPath is defined it will get a copy of the raw data []byte RawPath string // If JSONPath is defined and Parser is defined, it will get a jsonified // copy of the strucutred data. If JSONPath is defined and Parser is not, // it will get a copy of the raw data. JSONPath string // If HumanPath is defined and Parser and Template are defined, it will get // the output of the template rendered with the structure context. If // HumanPath and Parser are defined but Template is not, it will get a YAML // copy of the structured data. If HumanPath is defined and Parser is not, // it will get a copy of the raw data. HumanPath string // If Timeout is defined, it will be used rather than the context provided // to Exec. Timeout time.Duration }
ByteSource is a Task that gets its data source as a []byte.
func (*ByteSource) GetSpec ¶
func (task *ByteSource) GetSpec() types.Spec
type Prepared ¶
type Prepared struct {
// contains filtered or unexported fields
}
Prepared is a Task that returns preconfigured Results.
func PreparedError ¶
Prepare results for an incomplete spec
type StreamSource ¶
type StreamSource struct { Spec types.Spec // Producer provides the seed data for this task as an io.Reader Producer func(context.Context) (io.Reader, error) // StreamFormat describe stream format returned by Producer. Only "" and "tar" are supported. StreamFormat string // RawScrubber, if defined, rewrites the raw data to to remove sensitive data RawScrubber func([]byte) []byte // Parser, if defined, structures the raw data for json and human sinks Parser func(io.Reader) (interface{}, error) // Template, if defined, renders structured data in a human-readable format Template string // If RawPath is defined it will get a copy of the data RawPath string // If JSONPath is defined it will get a copy of the data JSONPath string // If HumanPath is defined it will get a copy of the data HumanPath string // If Timeout is defined, it will be used rather than the context provided // to Exec. Timeout time.Duration }
StreamSource is a Task that gets its data as an io.Reader
func SetCommonFieldsStreamSource ¶
func SetCommonFieldsStreamSource(task StreamSource, spec types.Spec) (StreamSource, error)
func (*StreamSource) GetSpec ¶
func (task *StreamSource) GetSpec() types.Spec
type StreamsSource ¶
type StreamsSource struct { Spec types.Spec // Producer provides the seed data for this task as an io.Reader array // Names of the sources are provided as a string array Producer func(context.Context) (map[string]io.Reader, error) // StreamFormat describe stream format returned by Producer. Only "" and "tar" are supported. StreamFormat string // RawScrubber, if defined, rewrites the raw data to to remove sensitive data RawScrubber func([]byte) []byte // Parser, if defined, structures the raw data for json and human sinks Parser func(io.Reader) (interface{}, error) // Template, if defined, renders structured data in a human-readable format Template string // If RawPath is defined it will get a copy of the data RawPath string // If JSONPath is defined it will get a copy of the data JSONPath string // If HumanPath is defined it will get a copy of the data HumanPath string // If Timeout is defined, it will be used rather than the context provided // to Exec. Timeout time.Duration }
StreamsSource is a Task that gets its data as an io.Reader
func SetCommonFieldsStreamsSource ¶
func SetCommonFieldsStreamsSource(task StreamsSource, spec types.Spec) (StreamsSource, error)
func (*StreamsSource) GetSpec ¶
func (task *StreamsSource) GetSpec() types.Spec
type StructuredSource ¶
type StructuredSource struct { Spec types.Spec // Producer provides the seed data for this task Producer func(context.Context) (interface{}, error) // RawScrubber, if defined, rewrites the raw data to to remove sensitive data RawScrubber func([]byte) []byte // Template, if defined, renders structured data in a human-readable format Template string // If RawPath is defined it will get a copy of the raw data []byte RawPath string // If JSONPath is defined and Parser is defined, it will get a jsonified // copy of the strucutred data. If JSONPath is defined and Parser is not, // it will get a copy of the raw data. JSONPath string // If HumanPath is defined and Parser and Template are defined, it will get // the output of the template rendered with the structure context. If // HumanPath and Parser are defined but Template is not, it will get a YAML // copy of the structured data. If HumanPath is defined and Parser is not, // it will get a copy of the raw data. HumanPath string // If Timeout is defined, it will be used rather than the context provided // to Exec. Timeout time.Duration }
StructuredSource is a Task that gets its data as a structured object ready to be jsonified or used as a context in a human template.
func SetCommonFieldsStructuredSource ¶
func SetCommonFieldsStructuredSource(task StructuredSource, spec types.Spec) (StructuredSource, error)
func (*StructuredSource) GetSpec ¶
func (task *StructuredSource) GetSpec() types.Spec
Click to show internal directories.
Click to hide internal directories.