agentlocal

package
v2.2.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2020 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrReload = errors.New("reload")

ErrReload is returned from Service.Run after request to reload configuration.

Functions

This section is empty.

Types

type Server

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

Server represents local pmm-agent API server.

func NewServer

func NewServer(cfg *config.Config, supervisor supervisor, client client, configFilepath string) *Server

NewServer creates new server.

Caller should call Run.

func (*Server) Reload

Reload reloads pmm-agent and it configuration.

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Run runs gRPC and JSON servers with API and debug endpoints until ctx is canceled.

Run exits when ctx is canceled, or when a request to reload configuration is received. In the latter case, the returned error is ErrReload.

func (*Server) Status

Status returns current pmm-agent status.

Jump to

Keyboard shortcuts

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