kafka

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelBindings

type ChannelBindings struct {
	Topic              string
	Partitions         int
	Replicas           int
	PublisherBindings  OperationBindings
	SubscriberBindings OperationBindings
	TopicConfiguration TopicConfiguration
}

Params below are passed to the New* implementation functions

type Consumer

type Consumer interface {
	Subscriber(ctx context.Context, channelName string, bindings *ChannelBindings) (Subscriber, error)
}

Sub

type EnvelopeMarshaler

type EnvelopeMarshaler interface {
	MarshalKafkaEnvelope(envelope EnvelopeWriter) error
}

type EnvelopeReader

type EnvelopeReader interface {
	io.Reader
	Headers() run.Headers
}

Sub

type EnvelopeUnmarshaler

type EnvelopeUnmarshaler interface {
	UnmarshalKafkaEnvelope(envelope EnvelopeReader) error
}

type EnvelopeWriter

type EnvelopeWriter interface {
	io.Writer
	ResetPayload()
	SetHeaders(headers run.Headers)
	SetContentType(contentType string)
	SetBindings(bindings MessageBindings)

	SetTopic(topic string) // Topic may be different from channel name
}

Pub

type MessageBindings

type MessageBindings struct {
	Key                     any // TODO: jsonschema
	SchemaIDLocation        string
	SchemaIDPayloadEncoding string
	SchemaLookupStrategy    string
}

Params below are passed to the New* implementation functions

type OperationBindings

type OperationBindings struct {
	ClientID any // jsonschema contents
	GroupID  any // jsonschema contents
}

Params below are passed to the New* implementation functions

type Producer

type Producer interface {
	Publisher(ctx context.Context, channelName string, bindings *ChannelBindings) (Publisher, error)
}

Pub

type Publisher

type Publisher interface {
	Send(ctx context.Context, envelopes ...EnvelopeWriter) error
	Close() error
}

Pub

type ServerBindings

type ServerBindings struct {
	SchemaRegistryURL    string
	SchemaRegistryVendor string
}

Params below are passed to the New* implementation functions

type Subscriber

type Subscriber interface {
	Receive(ctx context.Context, cb func(envelope EnvelopeReader)) error
	Close() error
}

Sub

type TopicCleanupPolicy

type TopicCleanupPolicy struct {
	Delete  bool
	Compact bool
}

Params below are passed to the New* implementation functions

type TopicConfiguration

type TopicConfiguration struct {
	CleanupPolicy     TopicCleanupPolicy
	RetentionMs       time.Duration
	RetentionBytes    int
	DeleteRetentionMs time.Duration
	MaxMessageBytes   int
}

Params below are passed to the New* implementation functions

Jump to

Keyboard shortcuts

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