pubsub

package
v0.0.0-...-eb19a62 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package pubsub handles notifications of messages that should be sent back to the partner.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Listen

func Listen(ctx context.Context, cred string, h MessageHandler, projectID string, topic string, opts ...option.ClientOption) error

Listen listens for notifications from a pubsub subscription, uses the ids in the messages to fetch content with the HL7v2 API, then sends the message to the partner over MLLP.

Types

type Message

type Message interface {
	Ack()
	Data() []byte
	Attrs() map[string]string
}

Message represents a pubsub message.

type MessageHandler

type MessageHandler interface {
	Handle(Message)
}

MessageHandler is the interface for handling HL7v2 messages.

Jump to

Keyboard shortcuts

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