Documentation
¶
Overview ¶
Code generated by options-gen. DO NOT EDIT.
Index ¶
- type AlwaysFailDecoder
- type Consumer
- type Header
- type HeaderDependantDecoder
- type IDecoder
- type ILogger
- type JSONDecoder
- type Msg
- type OptOptionsSetter
- func WithBrokers(opt []string) OptOptionsSetter
- func WithCommitInterval(opt time.Duration) OptOptionsSetter
- func WithConsGroup(opt string) OptOptionsSetter
- func WithDecoder(opt IDecoder) OptOptionsSetter
- func WithLogger(opt ILogger) OptOptionsSetter
- func WithMaxBytes(opt int) OptOptionsSetter
- func WithMaxWait(opt time.Duration) OptOptionsSetter
- func WithMinBytes(opt int) OptOptionsSetter
- func WithName(opt string) OptOptionsSetter
- func WithRetentionTime(opt time.Duration) OptOptionsSetter
- func WithTlsConfig(opt *tls.Config) OptOptionsSetter
- func WithTopic(opt string) OptOptionsSetter
- type Options
- type ProtoJSONDecoder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlwaysFailDecoder ¶ added in v0.3.0
type AlwaysFailDecoder struct{}
AlwaysFailDecoder will always return error. Useful for testing and HeaderDependantDecoder.DefaultDecoder.
type Consumer ¶
type Consumer[T any] struct { // contains filtered or unexported fields }
type HeaderDependantDecoder ¶ added in v0.3.0
type HeaderDependantDecoder struct { // Name of header that we will check. HeaderName string // Header value to Decoder mapping. Decoders map[string]IDecoder // Will be used in case if message have no headers, or we have no corresponding mapping in Decoders map. DefaultDecoder IDecoder }
HeaderDependantDecoder allows you to specify which decoder will be used to decode each message.
type JSONDecoder ¶ added in v0.2.0
type JSONDecoder struct{}
type OptOptionsSetter ¶
type OptOptionsSetter func(o *Options)
func WithBrokers ¶
func WithBrokers(opt []string) OptOptionsSetter
func WithCommitInterval ¶
func WithCommitInterval(opt time.Duration) OptOptionsSetter
0 - means sync mode.
func WithConsGroup ¶
func WithConsGroup(opt string) OptOptionsSetter
func WithDecoder ¶ added in v0.3.0
func WithDecoder(opt IDecoder) OptOptionsSetter
func WithLogger ¶
func WithLogger(opt ILogger) OptOptionsSetter
func WithMaxBytes ¶
func WithMaxBytes(opt int) OptOptionsSetter
func WithMaxWait ¶
func WithMaxWait(opt time.Duration) OptOptionsSetter
func WithMinBytes ¶
func WithMinBytes(opt int) OptOptionsSetter
func WithName ¶
func WithName(opt string) OptOptionsSetter
func WithRetentionTime ¶
func WithRetentionTime(opt time.Duration) OptOptionsSetter
consumer group retention time. consumer group will be keep in kafka for this period.
func WithTlsConfig ¶
func WithTlsConfig(opt *tls.Config) OptOptionsSetter
func WithTopic ¶
func WithTopic(opt string) OptOptionsSetter
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
func NewOptions ¶
func NewOptions( options ...OptOptionsSetter, ) Options
type ProtoJSONDecoder ¶ added in v0.2.0
type ProtoJSONDecoder struct{}
Click to show internal directories.
Click to hide internal directories.