discovery

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 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 FlagApp

type FlagApp interface {
	Flag(name, help string) *kingpin.FlagClause
}

type StandardOptions

type StandardOptions struct {
	Collective              string
	FactFilter              []string
	AgentFilter             []string
	ClassFilter             []string
	IdentityFilter          []string
	CombinedFilter          []string
	CompoundFilter          string
	DiscoveryMethod         string
	DiscoveryTimeout        int
	DynamicDiscoveryTimeout bool
	NodesFile               string
	DiscoveryOptions        map[string]string
	// 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 FlagApp)

AddFilterFlags adds the various flags like -W, -S, -T etc

func (*StandardOptions) AddFlatFileFlags

func (o *StandardOptions) AddFlatFileFlags(app FlagApp)

AddFlatFileFlags adds the flags to select nodes using --nodes in text, json and yaml formats

func (*StandardOptions) AddSelectionFlags

func (o *StandardOptions) AddSelectionFlags(app 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) 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