kafka

package
v0.0.0-...-8954c2e Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HistoryStatefull

type HistoryStatefull struct {
	Name        string `json:"name" bson:"name"`
	Description string `json:"description" bson:"description"`
	Code        uint   `json:"code" bson:"code"`
}

HistoryStatefull ...

type KafkaLibrary

type KafkaLibrary struct{}

KafkaLibrary ...

func KafkaLibraryHandler

func KafkaLibraryHandler() *KafkaLibrary

KafkaLibraryHandler ...

func (*KafkaLibrary) GetStateFull

func (kafka *KafkaLibrary) GetStateFull() *StateFullFormat

GetStateFull ...

func (*KafkaLibrary) InitConsumer

func (kafka *KafkaLibrary) InitConsumer() (sarama.Consumer, error)

InitConsumer ...

func (*KafkaLibrary) SendEvent

func (kafka *KafkaLibrary) SendEvent(topic string, payload *StateFullFormat) (*StateFullFormat, int64, error)

SendEvent ...

type KafkaLibraryInterface

type KafkaLibraryInterface interface {
	GetStateFull() *StateFullFormat
	SendEvent(topic string, payload *StateFullFormat) (*StateFullFormat, int64, error)
	InitConsumer() (sarama.Consumer, error)
}

KafkaLibraryInterface ...

type StateFullFormat

type StateFullFormat struct {
	UUID      string             `json:"__uuid" bson:"__uuid"`
	Action    string             `json:"__action" bson:"__action"`
	Data      map[string]string  `json:"data" bson:"data"`
	Offset    int64              `json:"offset" bson:"offset"`
	History   []HistoryStatefull `json:"history" bson:"history"`
	CreatedAt *time.Time         `json:"created_at" bson:"created_at"`
}

ProducersMessageFormat ...

Jump to

Keyboard shortcuts

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