producer

package
v0.10.3-0...-302650a Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProducerOptions

type ProducerOptions struct {
	PChannel string
}

ProducerOptions is the options for creating a producer.

type ResumableProducer

type ResumableProducer struct {
	// contains filtered or unexported fields
}

ResumableProducer is implementation for producing message to streaming service. ResumableProducer select a right streaming node to produce automatically. ResumableProducer will do automatic resume from stream broken and streaming node re-balance. All error in these package should be marked by streaming/errs package.

func NewResumableProducer

func NewResumableProducer(f factory, opts *ProducerOptions) *ResumableProducer

NewResumableProducer creates a new producer. Provide an auto resuming producer.

func (*ResumableProducer) Close

func (p *ResumableProducer) Close()

Close close the producer.

func (*ResumableProducer) Produce

func (p *ResumableProducer) Produce(ctx context.Context, msg message.MutableMessage) (result *producer.ProduceResult, err error)

Produce produce a new message to log service.

Jump to

Keyboard shortcuts

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