clients

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InfluxDBClient

type InfluxDBClient struct {
	influxdb.Client
	// contains filtered or unexported fields
}

func NewInfluxDBClient

func NewInfluxDBClient(i InfluxDBConfig) *InfluxDBClient

func (*InfluxDBClient) GetBucket

func (i *InfluxDBClient) GetBucket() string

GetBucket returns the bucket name.

func (*InfluxDBClient) GetOrg

func (i *InfluxDBClient) GetOrg() string

GetOrg returns the organization name.

func (*InfluxDBClient) NewWriteAPI

func (i *InfluxDBClient) NewWriteAPI() influxdbapi.WriteAPI

NewWriteAPI returns the write api.

type InfluxDBConfig

type InfluxDBConfig struct {
	Address string `yaml:"address"` // host:port address.
	Token   string `yaml:"token"`   // Optional password.
	Org     string `yaml:"org"`
	Bucket  string `yaml:"bucket"`
}

type RedisClient

type RedisClient struct {
	*redis.Client
}

func NewRedisClient

func NewRedisClient(r RedisConfig) *RedisClient

type RedisConfig

type RedisConfig struct {
	Address      string `yaml:"address"`      // host:port address.
	Password     string `yaml:"password"`     // Optional password.
	MaxRetries   int    `yaml:"maxRetries"`   // Maximum number of retries before giving up.
	DialTimeout  int    `yaml:"dialTimeout"`  // in seconds
	ReadTimeout  int    `yaml:"readTimeout"`  // in seconds
	WriteTimeout int    `yaml:"writeTimeout"` // in seconds
	TLSConfig    *tls.Config
}

Jump to

Keyboard shortcuts

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