Documentation
¶
Index ¶
- Variables
- type Collector
- func (c *Collector) Check() validation.ErrorGroup
- func (c *Collector) Close() error
- func (c *Collector) Flush() error
- func (*Collector) Generate(rand *rand.Rand, size int) reflect.Value
- func (c *Collector) Open() error
- func (c *Collector) Send(ctx context.Context, rec record.Record, keyCodec, valCodec codec.Codec) error
- func (c *Collector) String() string
- type State
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrProducerMustBeSet = validation.NewError(
"collector_producer_must_be_set",
"the collector producer must be set and cannot be nil",
)
ErrProducerMustBeSet is the validation check error returned when the collector producer isn't set.
View Source
var States = []State{ Opened, Closed, }
States is list of all valid collector states.
View Source
var Transitions = map[State]map[State]bool{ Opened: {Closed: true}, Closed: {Opened: true}, }
Transitions contains valid transitions between states of a collector.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector provides metrics and offset tracking while fronting a kafka producer.
func New ¶
func New(producer *producer.Producer) (*Collector, validation.ErrorGroup)
New creates and validates a new Collector.
func (*Collector) Check ¶
func (c *Collector) Check() validation.ErrorGroup
Check runs default validation checks for the collector.
Click to show internal directories.
Click to hide internal directories.