franzgo

package
v0.0.0-...-c1a9e9f Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseProtocolVersion

func ParseProtocolVersion(protocolVersion string) (*kversion.Versions, error)

Types

type ConsumeClient

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

func NewConsumer

func NewConsumer(serverURL string, bindings *runKafka.ServerBindings, extraOpts []kgo.Opt) (*ConsumeClient, error)

func (ConsumeClient) Subscriber

func (c ConsumeClient) Subscriber(_ context.Context, channelName string, bindings *runKafka.ChannelBindings) (runKafka.Subscriber, error)

type EnvelopeIn

type EnvelopeIn struct {
	*kgo.Record
	// contains filtered or unexported fields
}

func NewEnvelopeIn

func NewEnvelopeIn(r *kgo.Record) *EnvelopeIn

func (EnvelopeIn) Headers

func (e EnvelopeIn) Headers() run.Headers

func (EnvelopeIn) Read

func (e EnvelopeIn) Read(p []byte) (n int, err error)

type EnvelopeOut

type EnvelopeOut struct {
	*kgo.Record
	// contains filtered or unexported fields
}

func NewEnvelopeOut

func NewEnvelopeOut() *EnvelopeOut

func (*EnvelopeOut) AsFranzGoRecord

func (e *EnvelopeOut) AsFranzGoRecord() *kgo.Record

func (*EnvelopeOut) ResetPayload

func (e *EnvelopeOut) ResetPayload()

func (*EnvelopeOut) SetBindings

func (e *EnvelopeOut) SetBindings(bindings runKafka.MessageBindings)

func (*EnvelopeOut) SetContentType

func (e *EnvelopeOut) SetContentType(contentType string)

func (*EnvelopeOut) SetHeaders

func (e *EnvelopeOut) SetHeaders(headers run.Headers)

func (*EnvelopeOut) SetTopic

func (e *EnvelopeOut) SetTopic(topic string)

func (*EnvelopeOut) Write

func (e *EnvelopeOut) Write(p []byte) (n int, err error)

type ImplementationRecord

type ImplementationRecord interface {
	AsFranzGoRecord() *kgo.Record
}

type ProduceClient

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

func NewProducer

func NewProducer(serverURL string, bindings *runKafka.ServerBindings, extraOpts []kgo.Opt) (*ProduceClient, error)

func (ProduceClient) Publisher

func (p ProduceClient) Publisher(_ context.Context, channelName string, bindings *runKafka.ChannelBindings) (runKafka.Publisher, error)

type PublishChannel

type PublishChannel struct {
	*kgo.Client
	Topic string
	// contains filtered or unexported fields
}

func (PublishChannel) Close

func (p PublishChannel) Close() error

func (PublishChannel) Send

func (p PublishChannel) Send(ctx context.Context, envelopes ...runKafka.EnvelopeWriter) error

type SubscribeChannel

type SubscribeChannel struct {
	*kgo.Client
	Topic             string
	IgnoreFetchErrors bool // TODO: add opts for Subscriber/Publisher interfaces
	// contains filtered or unexported fields
}

func (SubscribeChannel) Close

func (s SubscribeChannel) Close() error

func (SubscribeChannel) Receive

func (s SubscribeChannel) Receive(ctx context.Context, cb func(envelope runKafka.EnvelopeReader)) error

Jump to

Keyboard shortcuts

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