exporters

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// JSONFILE ...
	JSONFILE = "json"
	// KAFKA ...
	KAFKA = "kafka"
	// POSTGRESQL ...
	POSTGRESQL = "postgresql"
	// REDIS ...
	REDIS = "redis"
)
View Source
const (
	// TXS_STREAM_KEY ...
	TXS_STREAM_KEY = "txs"
)
View Source
const (
	// TXS_TOPIC_KEY ...
	TXS_TOPIC_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(path, filename string, value interface{}) error

ExportToJSON ...

func ExportToPostgresql

func ExportToPostgresql(db *sqlx.DB, blockID int, value string) error

ExportToPostgresql ...

func ExportToRedisStream

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

ExportToRedisStream ...

func GetRedisDbClient

func GetRedisDbClient() *redis.Client

GetRedisDbClient ...

func PostgreSQLConnection

func PostgreSQLConnection() (*sqlx.DB, error)

PostgreSQLConnection func for connection to PostgreSQL database.

Types

type Exporter

type Exporter interface {
	ExportData(data interface{}) error
}

Exporter ...

Jump to

Keyboard shortcuts

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