carbon

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2017 License: MIT Imports: 19 Imported by: 0

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
	Uploader  *uploader.Uploader
	UDP       receiver.Receiver
	TCP       receiver.Receiver
	Pickle    receiver.Receiver
	Grpc      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) ClearTreeExistsCache added in v0.3.1

func (app *App) ClearTreeExistsCache()

ClearTreeExistsCache in Uploader

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) 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"`
	ClickHouse clickhouseConfig   `toml:"clickhouse"`
	Data       dataConfig         `toml:"data"`
	Udp        udpConfig          `toml:"udp"`
	Tcp        tcpConfig          `toml:"tcp"`
	Pickle     pickleConfig       `toml:"pickle"`
	Grpc       grpcConfig         `toml:"grpc"`
	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 Duration

type Duration struct {
	time.Duration
}

Duration wrapper time.Duration for TOML

func (*Duration) MarshalText

func (d *Duration) MarshalText() ([]byte, error)

MarshalText encode text with TOML format

func (*Duration) UnmarshalText

func (d *Duration) UnmarshalText(text []byte) error

UnmarshalText from TOML

func (*Duration) Value

func (d *Duration) Value() time.Duration

Value return time.Duration value

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