Documentation ¶
Index ¶
- type StandardOptions
- func (o *StandardOptions) AddFilterFlags(app inter.FlagApp)
- func (o *StandardOptions) AddFlatFileFlags(app inter.FlagApp)
- func (o *StandardOptions) AddSelectionFlags(app inter.FlagApp)
- func (o *StandardOptions) Discover(ctx context.Context, fw inter.Framework, agent string, supportStdin bool, ...) ([]string, time.Duration, error)
- func (o *StandardOptions) Merge(opt *StandardOptions)
- func (o *StandardOptions) NewFilter(agent string) (*protocol.Filter, error)
- func (o *StandardOptions) SetDefaultsFromChoria(fw inter.Framework)
- func (o *StandardOptions) SetDefaultsFromConfig(cfg *config.Config)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StandardOptions ¶
type StandardOptions struct { Collective string `json:"collective"` FactFilter []string `json:"facts"` AgentFilter []string `json:"agents"` ClassFilter []string `json:"classes"` IdentityFilter []string `json:"identities"` CombinedFilter []string `json:"combined"` CompoundFilter string `json:"compound"` DiscoveryMethod string `json:"discovery_method"` DiscoveryTimeout int `json:"discovery_timeout"` DynamicDiscoveryTimeout bool `json:"dynamic_discovery_timeout"` NodesFile string `json:"nodes_file"` DiscoveryOptions map[string]string `json:"discovery_options"` // contains filtered or unexported fields }
func NewStandardOptions ¶
func NewStandardOptions() *StandardOptions
NewStandardOptions creates a new CLI options helper
func (*StandardOptions) AddFilterFlags ¶
func (o *StandardOptions) AddFilterFlags(app inter.FlagApp)
AddFilterFlags adds the various flags like -W, -S, -T etc
func (*StandardOptions) AddFlatFileFlags ¶
func (o *StandardOptions) AddFlatFileFlags(app inter.FlagApp)
AddFlatFileFlags adds the flags to select nodes using --nodes in text, json and yaml formats
func (*StandardOptions) AddSelectionFlags ¶
func (o *StandardOptions) AddSelectionFlags(app inter.FlagApp)
AddSelectionFlags adds the --dm and --discovery-timeout options
func (*StandardOptions) Merge ¶ added in v0.26.0
func (o *StandardOptions) Merge(opt *StandardOptions)
Merge merges opt with the settings here, when a basic setting is set in opt it will overwrite the one here, when its a filter like a list or map it will extend ours with its values.
func (*StandardOptions) NewFilter ¶
func (o *StandardOptions) NewFilter(agent string) (*protocol.Filter, error)
NewFilter creates a new filter based on the options supplied, additionally agent will be added to the list
func (*StandardOptions) SetDefaultsFromChoria ¶
func (o *StandardOptions) SetDefaultsFromChoria(fw inter.Framework)
SetDefaultsFromChoria sets the defaults based on cfg
func (*StandardOptions) SetDefaultsFromConfig ¶
func (o *StandardOptions) SetDefaultsFromConfig(cfg *config.Config)
SetDefaultsFromConfig sets the defaults based on cfg