exporters

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// JSONFILE ...
	JSONFILE = "json"
	// REDIS ...
	REDIS = "redis"
)
View Source
const (
	// TXS_STREAM_KEY ...
	TXS_STREAM_KEY = "txs"
)

Variables

View Source
var (
	// ErrRedisDbCheckConn ...
	ErrRedisDbCheckConn = errors.NewError("Redis: Fail to check connection")
	// ErrRedisXADDStreamID ...
	ErrRedisXADDStreamID = errors.NewError("ERR The ID specified in XADD is equal or smaller than the target stream top item")
)

Functions

func ExportToJSON

func ExportToJSON(ctx context.Context, path, filename string, value interface{}) error

ExportToJSON ...

func ExportToRedisStream

func ExportToRedisStream(ctx context.Context, rdb *redis.Client, key, address string, value map[string]interface{}) error

ExportToRedisStream ...

func GetRedisDbClient

func GetRedisDbClient(ctx context.Context) *redis.Client

GetRedisDbClient ...

Types

type Exporter

type Exporter interface {
	ExportData(ctx context.Context, data interface{}) error
}

Exporter ...

Jump to

Keyboard shortcuts

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