Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader is an abstraction object on top of kakfa.Reader it holds the creation config as attribute and a pointer to the reader itself it implements RefreshableInterface so that can be used by AutoRefreshX
func NewReader ¶
func NewReader(cfg ReaderConfigInterface) *Reader
NewReader creates a new Reader object
func (*Reader) Close ¶
func (r *Reader) Close()
Close makes sure the kafka.Reader.Close function is called
func (*Reader) Config ¶
func (r *Reader) Config() interface{}
Config returns the internal ReaderConfigInterface (will need to be casted)
func (*Reader) Renew ¶
func (r *Reader) Renew(tlsCfg config.TLSConfigInterface, saslConfig config.SASLConfigInterface, args ...interface{})
Renew creates a new kafka.Reader with the new tls and sasl configs passed in and updates the instance
type ReaderConfigInterface ¶ added in v1.2.0
type ReaderConfigInterface interface { config.ConfigInterface GetBootstrapServers() []string GetTopic() string GetGroupID() string GetReadTimeout() time.Duration Workers() int }
ReaderConfigInterface is the core.Reader config interface, embeds config.ConfigInterface
type RefreshableInterface ¶ added in v1.2.0
type RefreshableInterface interface { Get(context.Context) (interface{}, error) Config() interface{} Close() Stats() interface{} Renew(config.TLSConfigInterface, config.SASLConfigInterface, ...interface{}) }
RefreshableInterface is implemented by core.Writer and core.Reader so that they can be refreshed by AutoRefreshX
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer is an abstraction object on top of kakfa.Writer it holds the creation config as attribute and a pointer to the writer itself it implements RefreshableInterface so that can be used by AutoRefreshX
func (*Writer) Close ¶
func (w *Writer) Close()
Close makes sure the kafka.Reader.Close function is called
func (*Writer) Config ¶
func (w *Writer) Config() interface{}
Config returns the internal ReaderConfigInterface (will need to be casted)
func (*Writer) Renew ¶
func (w *Writer) Renew(tlsConfig config.TLSConfigInterface, saslConfig config.SASLConfigInterface, args ...interface{})
Renew creates a new kafka.Writer with the new tls config passed in and updates the instance
type WriterConfigInterface ¶ added in v1.2.0
type WriterConfigInterface interface { config.ConfigInterface GetBrokers() []string GetTopic() string GetNickname() string GetAsync() bool GetEncoder() encoder.EncoderInterface }
WriterConfigInterface is the core.Writer config interface, embeds config.ConfigInterface