kafkaloader

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// BusBrokers provides an alternative to kafkalinker.Brokers, to allow for a
	// different set of brokers for footprint messages.
	BusBrokers []string // -footprint-brokers | $FOOTPRINT_BROKERS

	// ControlBus names the Kafka topic for broadcast footprints
	ControlBus string // -footprint-control | $FOOTPRINT_CONTROL

	// StatusBus names the Kafka topic for broadcast footprint statuses like
	// acknowledgements and errors
	StatusBus string // -footprint-status | $FOOTPRINT_STATUS
)

Functions

func BusConfig

func BusConfig() *sarama.Config

BusConfig returns a Kafka configuration for footprint bus consumers and producers. It shares kafkalinker.Config.ClientID and kafkalinker.Config.Version.

func Main

func Main(group string)

func OpenControlSubscription

func OpenControlSubscription(group string) (*pubsub.Subscription, error)

func OpenControlTopic

func OpenControlTopic() (*pubsub.Topic, error)

Types

type Builder

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

func NewBuilder

func NewBuilder(id uuid.UUID, revision int) *Builder

func (*Builder) Broadcast

func (b *Builder) Broadcast(ctx context.Context, topic *pubsub.Topic) error

func (*Builder) Claim

func (b *Builder) Claim(d *component.Descriptor, options any) error

func (*Builder) Location

func (b *Builder) Location(location ...string)

func (*Builder) Metadata

func (b *Builder) Metadata(metadata string)

func (*Builder) Name

func (b *Builder) Name(name string)

func (*Builder) Observe

func (b *Builder) Observe(ctx context.Context, d *component.Descriptor, aspect string) (target *pubsub.Subscription, err error)

Observe subscribes the author of this footprint to the target given by the provided aspect of the provided descriptor. It panics if that descriptor is not part of the footprint, or the aspect is not defined in its footprint.

type Loader

type Loader struct {
	ReplicaSet string // consumer group for footprint bus
}

func (Loader) Exec

func (x Loader) Exec(l *component.L)

Jump to

Keyboard shortcuts

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