sqsdriver

package
v0.1.2 Latest Latest
Warning

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

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

Documentation

Overview

Package sqsdriver contains Amazon SQS driver for unifrost.StreamHandler

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client handles the communicating with SQS. This holds the config provider needed to make the request.

func NewClient

func NewClient(ctx context.Context, session *session.Session, opts ...Option) (*Client, error)

NewClient returns *sqsdriver.Client, establishes session to the AWS cloud service.

Additional configuration options can be added with sqsdriver.Option functions.

func (*Client) Close

func (client *Client) Close(ctx context.Context) error

Close is just a placeholder to close the subscription or topic, `subscription.Shutdown(ctx)` should be called

func (*Client) Subscribe

func (client *Client) Subscribe(ctx context.Context, url string) (*pubsub.Subscription, error)

Subscribe subscribes to the given SQS url

https://docs.aws.amazon.com/sdk-for-net/v2/developer-guide/QueueURL.html

type Option

type Option func(*Client) error

Option is a self-refrential function for configuration parameters

Jump to

Keyboard shortcuts

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