pubsub

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: MIT Imports: 13 Imported by: 0

README

Google Pub/Sub sink

This sink implements Google Pub/Sub protocol. It only works for streams, not for compaction like the other sinks. It can can be enabled by adding the following configuration in the tables section:

tables:
  eventlog:
    streams:
      - pubsub:
          project: my-gcp-project
          topic: my-topic
          filter: "gcs://my-bucket/my-function.lua"
          encoder: json
...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

type Writer struct {
	*base.Writer
	// contains filtered or unexported fields
}

Writer to write and stream to PubSub

func New

func New(project, topic, encoding, filter string, monitor monitor.Monitor, opts ...option.ClientOption) (*Writer, error)

New creates a new writer

func (*Writer) Close

func (w *Writer) Close() error

Close closes the Pub/Sub client

func (*Writer) Stream

func (w *Writer) Stream(row block.Row) error

Stream encodes data and pushes it into buffer

func (*Writer) Write

func (w *Writer) Write(key key.Key, blocks []block.Block) error

Write writes the data to the sink.

Jump to

Keyboard shortcuts

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