influxdb

package
v0.0.0-...-8d8ec1c Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package influxdb - Metrics 처리를 위한 InfluxDB Client 기능 제공

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupAndRun

func SetupAndRun(ctx context.Context, idbConf Config, collectFunc func() interface{}, logger *logging.Logger) error

SetupAndRun - InfluxDB로 Metric 처리를 반영하기 위한 Client 생성하고 주기적으로 Metrics 의 수집된 Stats 처리

Types

type Buffer

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

Buffer - InfluxDB Client에서 사용할 Buffer 구조 정의

func NewBuffer

func NewBuffer(size int) *Buffer

NewBuffer - 지정한 크기의 Buffer 생성

func (*Buffer) Add

func (b *Buffer) Add(ps ...client.BatchPoints)

Add - 지정된 BatchPoints 들을 관리하는 데이터로 추가

func (*Buffer) Elements

func (b *Buffer) Elements() []client.BatchPoints

Elements - 관리 중인 BatchPoints 들을 반환하고 초기화

type Config

type Config struct {
	Address         string        `yaml:"address"`
	ReportingPeriod time.Duration `yaml:"reporting_period"`
	BufferSize      int           `yaml:"buffer_size"`
	UserName        string        `yaml:"user_name"`
	Password        string        `yaml:"password"`
	Database        string        `yaml:"database"`
}

Config - InfluxDB 운영을 위한 설정 구조 (Metrics 와의 Cycle Import 문제로 재 정의)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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