Documentation
¶
Index ¶
- type Commander
- type Copier
- type HTTPer
- type Runner
- type Seeker
- func Exclude(excludes []string, seekers []*Seeker) ([]*Seeker, error)
- func NewCommander(command string, format string) *Seeker
- func NewCopier(path, destDir string, from, to time.Time) *Seeker
- func NewHTTPer(client *client.APIClient, path string) *Seeker
- func NewSheller(command string) *Seeker
- func Select(selects []string, seekers []*Seeker) ([]*Seeker, error)
- type Sheller
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Commander ¶
type Commander struct { Command string `json:"command"` // contains filtered or unexported fields }
Commander runs shell commands.
type Copier ¶
type Copier struct { SourceDir string `json:"source_directory"` Filter string `json:"filter"` DestDir string `json:"destination_directory"` From time.Time `json:"from"` To time.Time `json:"to"` }
Copier copies files to temp dir based on a filter.
type Runner ¶
type Runner interface {
Run() (interface{}, error)
}
Runner runs things to get information.
type Seeker ¶
type Seeker struct { Runner Runner `json:"runner"` Identifier string `json:"-"` Result interface{} `json:"result"` ErrString string `json:"error"` // this simplifies json marshaling Error error `json:"-"` }
Seeker seeks information via its Runner then stores the results.
func Exclude ¶
Exclude takes a slice of matcher strings and a slice of seekers. If any of the seeker identifiers match the exclude according to filepath.Match() then it will not be present in the returned seeker slice. NOTE(mkcp): This is precisely identical to Select() except we flip the match check. Maybe we can perform both rounds
of filtering in one pass one rather than iterating over all the seekers several times. Not likely to be a huge speed increase though... we're not even remotely bottlenecked on seeker filtering.
func NewCommander ¶
NewCommander provides a Seeker for running shell commands.
func NewSheller ¶
NewSheller provides a Seeker for running shell commands.
Click to show internal directories.
Click to hide internal directories.