moduls

package
v0.0.0-...-a55f869 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Conn *gorm.DB

Conn For Global Connect

View Source
var ElConn *elastic.Client

ElConn | Global Var to conn

Etcd to use all object client

Kafka Connect to global

View Source
var Store redis.Conn

Store for global connect to cache

Functions

func GetKafkaConfig

func GetKafkaConfig() *sarama.Config

GetKafkaConfig Get Config From kafka

func GetRowsCached

func GetRowsCached(keys string) (string, error)

GetRowsCached func

func InitDB

func InitDB() *gorm.DB

InitDB Database Connection

func InitElastic

func InitElastic() *elastic.Client

InitElastic Init To Connect

func InitRedis

func InitRedis() redis.Conn

InitRedis func

func Initetcd

func Initetcd() client.KeysAPI

Initetcd Function

func Initkafka

func Initkafka() sarama.SyncProducer

Initkafka Function

func RowsCached

func RowsCached(keys string, d []byte, ttl int) ([]byte, error)

RowsCached func

Types

type Data

type Data struct{}

Data type

type KafkaProducer

type KafkaProducer struct {
	Producer sarama.SyncProducer
}

KafkaProducer Methods

type Respons

type Respons struct {
	Topic  interface{} `json:"topic"`
	Task   interface{} `json:"task"`
	Offset interface{} `json:"offset"`
}

Respons Data

func SendMessage

func SendMessage(p sarama.SyncProducer, topic string, msg string) (Respons, error)

SendMessage function to send message into kafka

Jump to

Keyboard shortcuts

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