carbon

package
v0.11.7 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: MIT Imports: 23 Imported by: 3

Documentation

Index

Constants

View Source
const (
	MetricEndpointLocal = "local"
)

Variables

This section is empty.

Functions

func NewLoggingConfig added in v0.6.1

func NewLoggingConfig() zapwriter.Config

func PrintDefaultConfig added in v0.6.1

func PrintDefaultConfig() error

PrintConfig ...

Types

type App

type App struct {
	sync.RWMutex
	Config           *Config
	Writer           *writer.Writer
	Uploaders        map[string]uploader.Uploader
	UDP              receiver.Receiver
	TCP              receiver.Receiver
	Pickle           receiver.Receiver
	Grpc             receiver.Receiver
	Prometheus       receiver.Receiver
	TelegrafHttpJson receiver.Receiver
	Collector        *Collector // (!!!) Should be re-created on every change config/modules

	ConfigFilename string
	// contains filtered or unexported fields
}

func New

func New(configFilename string) *App

New App instance

func (*App) Loop

func (app *App) Loop()

Loop ...

func (*App) ParseConfig added in v0.6.1

func (app *App) ParseConfig() error

ParseConfig loads config from config file

func (*App) Reset added in v0.7.0

func (app *App) Reset()

Reset cache in uploaders

func (*App) Start

func (app *App) Start() (err error)

Start starts

func (*App) Stop

func (app *App) Stop()

Stop force stop all components

type Collector

type Collector struct {
	stop.Struct
	// contains filtered or unexported fields
}

Collector sends metrics to carbon endpoint

func NewCollector

func NewCollector(app *App) *Collector

NewCollector ...

type Config

type Config struct {
	Common           commonConfig                `toml:"common"`
	Data             dataConfig                  `toml:"data"`
	Upload           map[string]*uploader.Config `toml:"upload"`
	Udp              udpConfig                   `toml:"udp"`
	Tcp              tcpConfig                   `toml:"tcp"`
	Pickle           pickleConfig                `toml:"pickle"`
	Grpc             grpcConfig                  `toml:"grpc"`
	Prometheus       promConfig                  `toml:"prometheus"`
	TelegrafHttpJson telegrafHttpJsonConfig      `toml:"telegraf_http_json"`
	Pprof            pprofConfig                 `toml:"pprof"`
	Logging          []zapwriter.Config          `toml:"logging"`
	TagDesc          tags.TagConfig              `toml:"convert_to_tagged"`
}

Config ...

func NewConfig

func NewConfig() *Config

NewConfig ...

func ReadConfig added in v0.6.1

func ReadConfig(filename string) (*Config, error)

ReadConfig ...

type Point

type Point struct {
	Metric    string
	Value     float64
	Timestamp uint32
}

Point represents the graphite metric point

Jump to

Keyboard shortcuts

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