pubsub

package
v0.0.0-...-bcc66f6 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package pubsub provides Google Pub/Sub implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Publisher

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

Publisher publish message.

func NewPublisher

func NewPublisher(ctx context.Context, projectID string, opts ...option.ClientOption) (*Publisher, error)

NewPublisher constructs new Publisher.

func (*Publisher) Publish

func (p *Publisher) Publish(topic string, body []byte) error

Publish message body to a topic.

func (*Publisher) Stop

func (p *Publisher) Stop() error

Stop the publisher.

type Receiver

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

Receiver receives message.

func NewReceiver

func NewReceiver(projectID, subscriptionID string, connectTimeout time.Duration, opts ...option.ClientOption) (*Receiver, error)

NewReceiver construct new Receiver.

func (*Receiver) Listen

func (r *Receiver) Listen(h mq.Handler) (retErr error)

Listen to the incoming message.

func (*Receiver) Stop

func (r *Receiver) Stop() error

Stop the receiver.

Jump to

Keyboard shortcuts

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