kafka

package
v0.0.0-...-c68f62e Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository struct {
	*kafka.Writer
	*kafka.Reader
	// contains filtered or unexported fields
}

Repository that produces request stats to Kafka

func NewRepository

func NewRepository(brokers, topic string) *Repository

NewRepository returns a new instance the repository to store stats in memory

func (*Repository) Close

func (r *Repository) Close() error

Close kafka writer & reader

func (*Repository) GetAll

func (r *Repository) GetAll() []*stats.Request

GetAll stats from Kafka

func (*Repository) Increment

func (r *Repository) Increment(path string, parameters map[string]interface{}) error

Increment number of hits in Kafka

func (*Repository) Listen

func (r *Repository) Listen()

Jump to

Keyboard shortcuts

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