discovery

package
v0.29.4 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

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) Discover

func (o *StandardOptions) Discover(ctx context.Context, fw inter.Framework, agent string, supportStdin bool, progress bool, logger *log.Entry) ([]string, time.Duration, error)

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

Jump to

Keyboard shortcuts

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