subscriber

package
v0.0.0-...-d7993bf Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Operation
}

Client is a wrapper on the subscriber Operation

func NewSubscriberClient

func NewSubscriberClient(subName string) (*Client, error)

NewSubscriberClient returns a new SubscriberClient used to read crier pubsub messages

func (*Client) ReceiveMessageAckAll

func (c *Client) ReceiveMessageAckAll(ctx context.Context, f func(*prowapi.ReportMessage)) error

ReceiveMessageAckAll acknowledges all incoming pusub messages and convert the pubsub message to ReportMessage. It executes `f` only if the pubsub message can be converted to ReportMessage. Otherwise, ignore the message.

type Operation

type Operation interface {
	Receive(ctx context.Context, f func(context.Context, *pubsub.Message)) error
}

Operation defines a list of methods for subscribing messages

Jump to

Keyboard shortcuts

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