cmd

package
v6.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2018 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenModulesCmd

func GenModulesCmd(name, version string, modulesFactory modulesManagerFactory) *cobra.Command

GenModulesCmd initializes a command to manage a modules.d folder, it offers list, enable and siable actions

Types

type BeatsRootCmd

type BeatsRootCmd struct {
	cobra.Command
	RunCmd        *cobra.Command
	SetupCmd      *cobra.Command
	VersionCmd    *cobra.Command
	CompletionCmd *cobra.Command
	ExportCmd     *cobra.Command
	TestCmd       *cobra.Command
	KeystoreCmd   *cobra.Command
}

BeatsRootCmd handles all application command line interface, parses user flags and runs subcommands

func GenRootCmd

func GenRootCmd(name, version string, beatCreator beat.Creator) *BeatsRootCmd

GenRootCmd returns the root command to use for your beat. It takes beat name as parameter, and also run command, which will be called if no args are given (for backwards compatibility)

func GenRootCmdWithIndexPrefixWithRunFlags added in v6.1.0

func GenRootCmdWithIndexPrefixWithRunFlags(name, indexPrefix, version string, beatCreator beat.Creator, runFlags *pflag.FlagSet) *BeatsRootCmd

func GenRootCmdWithRunFlags

func GenRootCmdWithRunFlags(name, version string, beatCreator beat.Creator, runFlags *pflag.FlagSet) *BeatsRootCmd

GenRootCmdWithRunFlags returns the root command to use for your beat. It takes beat name as parameter, and also run command, which will be called if no args are given (for backwards compatibility). runFlags parameter must the flagset used by run command

type ModulesManager

type ModulesManager interface {
	ListEnabled() []*cfgfile.CfgFile
	ListDisabled() []*cfgfile.CfgFile
	Exists(name string) bool
	Enabled(name string) bool
	Enable(name string) error
	Disable(name string) error
}

ModulesManager interface provides all actions needed to implement modules command (to list, enable & disable modules)

Directories

Path Synopsis
Package instance provides the functions required to manage the life-cycle of a Beat.
Package instance provides the functions required to manage the life-cycle of a Beat.

Jump to

Keyboard shortcuts

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