pubsub

package module
v0.0.0-...-6bd9a0b Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Provides a super minimal publish/subscribe interface with backend implementations for different providers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompletePublisher

type CompletePublisher interface {
	PublishUntilComplete(context.Context, []byte, map[string]string) error
}

A CompletePublisher takes some data and publishes it on a topic and returns errors, if any

type Message

type Message interface {
	Data() []byte
	Attrs() map[string]string
	Ack()
	Nack()
	EnrichContext(context.Context) context.Context
}

A Message is a pubsub message to be consumed by a Worker

type Publisher

type Publisher interface {
	Publish(context.Context, []byte, map[string]string) error
}

A Publisher takes some data and publishes it on a topic

type Subscriber

type Subscriber interface {
	Subscribe(context.Context) (<-chan Message, error)
}

A Subscriber streams a channel of Message

Directories

Path Synopsis
Google Cloud PubSub implemenation
Google Cloud PubSub implemenation
Stub pubsub implementation for testing.
Stub pubsub implementation for testing.

Jump to

Keyboard shortcuts

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