pubsub

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package pubsub implements the "pubsub" surfacer. This surfacer type is in experimental phase right now.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsCompressed added in v0.11.1

func IsCompressed(attr map[string]string) bool

IsCompressed takes message attribute map and returns true if compressed attribute is set to true.

func StartTime added in v0.11.1

func StartTime(attr map[string]string) string

StartTime takes message attributes map and returns the value of the starttime attribute.

Types

type Surfacer

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

Surfacer implements a pubsub surfacer.

func New

func New(ctx context.Context, config *configpb.SurfacerConf, opts *options.Options, l *logger.Logger) (*Surfacer, error)

New initializes a Surfacer for publishing data to a pubsub topic.

func (*Surfacer) Write

func (s *Surfacer) Write(ctx context.Context, em *metrics.EventMetrics)

Write queues the incoming data into a channel. This channel is watched by a goroutine that actually publishes it to a pubsub topic.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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