cmd

package
v6.0.0-rc1+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2017 License: Apache-2.0 Imports: 13 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
}

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 paramter, and also run command, which will be called if no args are given (for backwards compatibility)

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 paramter, 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