common

package
v0.0.0-...-98127d3 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2019 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger = zerolog.Logger{}
View Source
var SMITH_CONF = SmithConf{}

Functions

func GetFileMD5

func GetFileMD5(path string) string

func GetGlobalCache

func GetGlobalCache() *bigcache.BigCache

func GetHostName

func GetHostName() string

func KafkaProducer

func KafkaProducer(host string, topic string, upStream chan string, ctx context.Context, kafkaWorkerSize int, KafkaOtherConf map[string]interface{})

func KafkaProducerRun

func KafkaProducerRun(host string, topic string, upStream chan string, ctx context.Context, KafkaOtherConf map[string]interface{})

func KafkaStatusCheck

func KafkaStatusCheck(host string, otherConf map[string]interface{}, kafkaType string) error

func LogInit

func LogInit()

func NewCache

func NewCache(ttl int, MaxEntrySize int, HardMaxCacheSize int) (*bigcache.BigCache, error)

func SmithConfInit

func SmithConfInit() error

Types

type SmithConf

type SmithConf struct {
	DataTransferType string

	DataChan chan string

	KafkaBootstrapServers string                 `json:"KafkaBootstrapServers"`
	KafkaTopic            string                 `json:"KafkaTopic"`
	KafkaWorkerSize       int                    `json:"KafkaWorkerSize"`
	KafkaCompression      string                 `json:"KafkaCompression"`
	KafkaOtherConf        map[string]interface{} `json:"KafkaOtherConf"`
	// contains filtered or unexported fields
}

func (*SmithConf) SetCtx

func (s *SmithConf) SetCtx(ctx context.Context, cancelButten context.CancelFunc)

func (*SmithConf) StopSender

func (s *SmithConf) StopSender()

Jump to

Keyboard shortcuts

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