agent

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

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

Agent handles all the configuration, I/O and processing of the application

func New

func New(globalConfig *Config) (*Agent, error)

New creates and configures a new Agent (including both, the fetcher and the pusher)

func (*Agent) Run

func (agent *Agent) Run()

Run runs the main loop of the agent forever

type Cfg

type Cfg struct {
	Interval               uint32 `yaml:"interval"`
	IntervalMaxRandomDelay uint32 `yaml:"interval_max_random_delay"`
	RetryTime              uint32 `yaml:"retry_time"`
}

Cfg stores the configuration parameters for the agent

type Config

type Config struct {
	Agent     Cfg        `yaml:"agent"`
	NginxPlus input.Cfg  `yaml:"nginx_plus"`
	Nsone     output.Cfg `yaml:"nsone"`
	Services  Services   `yaml:"services"`
}

Config stores all the parameters from the configuration file

func ParseConfig

func ParseConfig(path *string) (*Config, error)

ParseConfig reads the configuration file and return a Config object ready to configure agent and resources

type Services

type Services struct {
	Method       string        `yaml:"method"`
	Threshold    uint          `yaml:"threshold"`
	SamplingType string        `yaml:"sampling_type"`
	Feeds        []output.Feed `yaml:"feeds"`
}

Services stores the configuration that relates NGINX Plus services with NS1 Data Feeds

type UpstreamsConnections

type UpstreamsConnections struct {
	Active         uint64
	AvailablePeers int
}

UpstreamsConnections wraps Active connections and the number of available peers for a given Upstream Server

Jump to

Keyboard shortcuts

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