influxlog

package
v0.4.4-0...-300e47e Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addr         string `json:"addr"`
	Token        string `json:"token"`
	Organization string `json:"organization"`
	Bucket       string `json:"bucket"`
}

Config is the configuration for the influxLogWriter

type Writer

type Writer struct {
	Client influxdb2.Client
	Config *Config
}

Writer is a influxdb client to write time series data

func (Writer) CaddyModule

func (Writer) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information

func (*Writer) Cleanup

func (s *Writer) Cleanup() error

Cleanup currently do nothing

func (*Writer) OpenWriter

func (s *Writer) OpenWriter() (io.WriteCloser, error)

OpenWriter opens a new influxdb client with connection

func (*Writer) Provision

func (s *Writer) Provision(ctx caddy.Context) error

Provision currently do nothing

func (*Writer) String

func (s *Writer) String() string

String returns the expression of this struct

func (*Writer) UnmarshalCaddyfile

func (s *Writer) UnmarshalCaddyfile(d *caddyfile.Dispenser) error

UnmarshalCaddyfile deserializes Caddyfile tokens into influxlog config

influxlog {
  addr
  token
	 organization
  bucket
}

func (*Writer) Validate

func (s *Writer) Validate() error

Validate currently do nothing

func (*Writer) WriterKey

func (s *Writer) WriterKey() string

WriterKey returns a unique key representing this influxLogWriter

Jump to

Keyboard shortcuts

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