app

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: Apache-2.0 Imports: 60 Imported by: 0

Documentation

Overview

Package app implements the Agent main loop, orchestrating all the components and providing the command line interface.

Index

Constants

This section is empty.

Variables

View Source
var (
	// AgentCmd is the root command
	AgentCmd = &cobra.Command{
		Use:   fmt.Sprintf("%s [command]", os.Args[0]),
		Short: "Datadog Agent at your service.",
		Long: `
The Datadog Agent faithfully collects events and metrics and brings them
to Datadog on your behalf so that you can do something useful with your
monitoring and performance data.`,
		SilenceUsage: true,
	}
)

Functions

func ControlService

func ControlService(serviceName string, c svc.Cmd, to svc.State) error

ControlService sets the service state via the Service Control Manager

func StartAgent

func StartAgent() error

StartAgent Initializes the agent process

func StartService

func StartService(cmd *cobra.Command, args []string) error

StartService starts the agent service via the Service Control Manager

func StopAgent

func StopAgent()

StopAgent Tears down the agent process

func StopService

func StopService(serviceName string, withDeps bool) error

StopService stops the agent service via the Service Control Manager

Types

type EnumServiceStatus

type EnumServiceStatus struct {
	// contains filtered or unexported fields
}

EnumServiceStatus complete enumerated service information only exported so binary.Read works

type ServiceStatus

type ServiceStatus struct {
	DwServiceType             uint32
	DwCurrentState            uint32
	DwControlsAccepted        uint32
	DwWin32ExitCode           uint32
	DwServiceSpecificExitCode uint32
	DwCheckPoint              uint32
	DwWaitHint                uint32
}

ServiceStatus reports information pertaining to enumerated services only exported so binary.Read works

type Servicedef

type Servicedef struct {
	// contains filtered or unexported fields
}

Servicedef defines a service

func (*Servicedef) IsEnabled

func (s *Servicedef) IsEnabled() bool

IsEnabled checks to see if a given service should be started

func (*Servicedef) Start

func (s *Servicedef) Start() error

Start starts the service

func (*Servicedef) Stop

func (s *Servicedef) Stop() error

Stop stops the service

Directories

Path Synopsis
Package standalone provides utility functions for Agent CLI commands that set up a new in-process Agent runtime (ex: check, jmx commands), as opposed to CLI commands that query a running Agent's IPC API.
Package standalone provides utility functions for Agent CLI commands that set up a new in-process Agent runtime (ex: check, jmx commands), as opposed to CLI commands that query a running Agent's IPC API.

Jump to

Keyboard shortcuts

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