mock

package
v3.7.3 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package mock implements a mock PubSub provider using the mempubsub driver.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	provider.Target

	Push    *pubsub.Topic
	Replace *pubsub.Topic

	UplinkMessage  *pubsub.Subscription
	JoinAccept     *pubsub.Subscription
	DownlinkAck    *pubsub.Subscription
	DownlinkNack   *pubsub.Subscription
	DownlinkSent   *pubsub.Subscription
	DownlinkFailed *pubsub.Subscription
	DownlinkQueued *pubsub.Subscription
	LocationSolved *pubsub.Subscription
	// contains filtered or unexported fields
}

Connection is a set of mempubsub topics.

func (*Connection) ApplicationPubSubIdentifiers

func (c *Connection) ApplicationPubSubIdentifiers() *ttnpb.ApplicationPubSubIdentifiers

func (*Connection) Shutdown

func (c *Connection) Shutdown(ctx context.Context) (err error)

Shutdown implements provider.Shutdowner.

type ConnectionWithError

type ConnectionWithError struct {
	*Connection
	// contains filtered or unexported fields
}

ConnectionWithError is an connection wrapped with an error.

type Impl

type Impl struct {
	OpenConnectionCh chan *ConnectionWithError
	ShutdownCh       chan *ConnectionWithError
}

Impl is the mock provider implementation.

func (*Impl) OpenConnection

func (i *Impl) OpenConnection(ctx context.Context, target provider.Target) (pc *provider.Connection, err error)

OpenConnection implements provider.Provider using the mempubsub package.

Jump to

Keyboard shortcuts

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