Documentation ¶
Index ¶
- func EncodeJSONRequest(_ context.Context, msg *kafka.Message, request interface{}) error
- type Consumer
- type ConsumerFinalizerFunc
- type ConsumerOption
- func ConsumerAfter(after ...ConsumerResponseFunc) ConsumerOption
- func ConsumerBefore(before ...RequestFunc) ConsumerOption
- func ConsumerErrorHandler(errorHandler transport.ErrorHandler) ConsumerOption
- func ConsumerErrorLogger(logger log.Logger) ConsumerOption
- func ConsumerFinalizer(f ...ConsumerFinalizerFunc) ConsumerOption
- type ConsumerResponseFunc
- type DecodeRequestFunc
- type EncodeRequestFunc
- type EncodeResponseFunc
- type Handlers
- type Producer
- type ProducerFinalizerFunc
- type ProducerOption
- type ProducerResponseFunc
- type RequestFunc
- type Router
- type RouterOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
func NewConsumer ¶
func NewConsumer( e endpoint.Endpoint, dec DecodeRequestFunc, opts ...ConsumerOption, ) *Consumer
type ConsumerFinalizerFunc ¶
type ConsumerOption ¶
type ConsumerOption func(consumer *Consumer)
func ConsumerAfter ¶
func ConsumerAfter(after ...ConsumerResponseFunc) ConsumerOption
func ConsumerBefore ¶
func ConsumerBefore(before ...RequestFunc) ConsumerOption
func ConsumerErrorHandler ¶
func ConsumerErrorHandler(errorHandler transport.ErrorHandler) ConsumerOption
func ConsumerErrorLogger ¶
func ConsumerErrorLogger(logger log.Logger) ConsumerOption
func ConsumerFinalizer ¶ added in v0.2.0
func ConsumerFinalizer(f ...ConsumerFinalizerFunc) ConsumerOption
type ConsumerResponseFunc ¶
type DecodeRequestFunc ¶
type EncodeRequestFunc ¶ added in v0.2.0
type EncodeResponseFunc ¶ added in v0.2.0
type Producer ¶ added in v0.2.0
type Producer struct {
// contains filtered or unexported fields
}
func NewProducer ¶ added in v0.2.0
func NewProducer( handler kafka.Handler, topic string, enc EncodeRequestFunc, options ...ProducerOption, ) *Producer
type ProducerFinalizerFunc ¶ added in v0.2.0
type ProducerOption ¶ added in v0.2.0
type ProducerOption func(consumer *Producer)
func ProducerAfter ¶ added in v0.2.0
func ProducerAfter(after ...ProducerResponseFunc) ProducerOption
func ProducerBefore ¶ added in v0.2.0
func ProducerBefore(before ...RequestFunc) ProducerOption
func ProducerFinalizer ¶ added in v0.2.0
func ProducerFinalizer(f ...ProducerFinalizerFunc) ProducerOption
func ProducerResponse ¶ added in v0.2.1
func ProducerResponse(response interface{}) ProducerOption
type ProducerResponseFunc ¶ added in v0.2.0
type RequestFunc ¶ added in v0.2.0
type Router ¶ added in v0.1.4
type Router struct {
// contains filtered or unexported fields
}
func NewRouter ¶ added in v0.1.4
func NewRouter(opts ...RouterOption) *Router
func (*Router) AddHandler ¶ added in v0.1.4
type RouterOption ¶ added in v0.1.4
type RouterOption func(*Router)
func RouterWithHandler ¶ added in v0.1.4
func RouterWithHandler(topic string, handler kafka.Handler) RouterOption
func RouterWithHandlers ¶ added in v0.1.5
func RouterWithHandlers(handlers Handlers) RouterOption
Click to show internal directories.
Click to hide internal directories.