carbon

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2017 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const MetricEndpointLocal = "local"

Variables

This section is empty.

Functions

func ParseConfig

func ParseConfig(filename string, cfg *Config) error

ParseConfig ...

func PrintConfig

func PrintConfig(cfg *Config) error

PrintConfig ...

Types

type App

type App struct {
	sync.RWMutex
	Config    *Config
	Writer    *writer.Writer
	Uploader  *uploader.Uploader
	UDP       receiver.Receiver
	TCP       receiver.Receiver
	Collector *Collector // (!!!) Should be re-created on every change config/modules
	// contains filtered or unexported fields
}

func New

func New(cfg *Config, logger zap.Logger) (*App, error)

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) 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"`
	Logging    loggingConfig    `toml:"logging"`
	ClickHouse clickhouseConfig `toml:"clickhouse"`
	Data       dataConfig       `toml:"data"`
	Udp        udpConfig        `toml:"udp"`
	Tcp        tcpConfig        `toml:"tcp"`
	Pprof      pprofConfig      `toml:"pprof"`
}

Config ...

func NewConfig

func NewConfig() *Config

NewConfig ...

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