sarama

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DecoderFunc

type DecoderFunc func(ctx context.Context, message *sarama.ConsumerMessage) (interface{}, error)

type EncoderFunc

type EncoderFunc func(ctx context.Context, response interface{}) error

type HandlerFunc

type HandlerFunc func(ctx context.Context, message *sarama.ConsumerMessage) error

func Handler

func Handler(ep endpoint.Endpoint, opts ...Option) HandlerFunc

Handler is function to adapt go-kit to echo http framework.

type MiddlewareFunc

type MiddlewareFunc func(next HandlerFunc) HandlerFunc

type Option

type Option interface {
	Apply(o *options)
}

func WithDecoder

func WithDecoder(decoder func(c context.Context, message *sarama.ConsumerMessage) (interface{}, error)) Option

func WithEncoder

func WithEncoder(encoder func(c context.Context, response interface{}) error) Option

func WithErrorHandler

func WithErrorHandler(errorHandler func(c context.Context, err error) error) Option

func WithMiddleware

func WithMiddleware(middlewares ...MiddlewareFunc) Option

Jump to

Keyboard shortcuts

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