carbon

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2018 License: MIT Imports: 20 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
	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
}

func NewCollector

func NewCollector(app *App) *Collector

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"`
	Pprof      pprofConfig                 `toml:"pprof"`
	Logging    []zapwriter.Config          `toml:"logging"`
}

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
}

Jump to

Keyboard shortcuts

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