pubsub

package
v0.0.0-...-8cff2e0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	ID        string
	Data      []byte
	Timestamp time.Time
	Ack       func()
}

type Pubsub

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

func New

func New(project, emulatorHost string) (*Pubsub, error)

func (*Pubsub) Close

func (p *Pubsub) Close() error

func (*Pubsub) Host

func (p *Pubsub) Host() string

func (*Pubsub) Messages

func (p *Pubsub) Messages(ctx context.Context, subscription string) chan Message

func (*Pubsub) Project

func (p *Pubsub) Project() string

func (*Pubsub) Publish

func (p *Pubsub) Publish(subscription string, content string) error

func (*Pubsub) Subscriptions

func (p *Pubsub) Subscriptions() ([]Subscription, error)

func (*Pubsub) UpdateProject

func (p *Pubsub) UpdateProject(project string) error

type Subscription

type Subscription struct {
	Name            string
	Topic           string
	DeadLetterTopic string
}

Jump to

Keyboard shortcuts

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