pubsub

package module
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

README

go-pubsub

Go package to provide a common interface for abstract publish and subscribe operations.

Documentation

Documentation is incomplete at this time.

Tools

$> make cli
go build -mod vendor -ldflags="-s -w" -o bin/publish cmd/publish/main.go
go build -mod vendor -ldflags="-s -w" -o bin/subscribe cmd/subscribe/main.go

Examples

$> ./bin/publish \
	-publisher-uri 'awssqs-creds://?region={REGION}&credentials={CREDENTIALS}&queue-url=https://sqs.{REGION}.amazonaws.com/{ACCOUNT}/{QUEUE}' \
	'hello world'
$> ./bin/subscribe \
	-subscriber-uri 'awssqs-creds://?region={REGION}&credentials={CREDENTIALS}&queue-url=https://sqs.{REGION}.amazonaws.com/{ACCOUNT}/{QUEUE}'
2024/09/04 10:59:57 INFO Listening for messages
hello world

See also

Documentation

Overview

Package pubsub provides a common interface for abstract publish and subscribe operations. Ideally this package would/could be replaced by the GoCloud pubsub package but it does not support Redis... https://gocloud.dev/howto/pubsub/ https://github.com/google/go-cloud/issues/1368

Index

Constants

View Source
const REDIS_DEFAULT_HOST string = "localhost"
View Source
const REDIS_DEFAULT_PORT int = 6379

Variables

This section is empty.

Functions

func RedisConfigFromURL added in v0.0.14

func RedisConfigFromURL(u *url.URL) (string, string, error)

Types

This section is empty.

Directories

Path Synopsis
app
cmd
package publisher provides a common interface for publish operations.
package publisher provides a common interface for publish operations.

Jump to

Keyboard shortcuts

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