mock

package
v3.13.1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package mock implements a mock pub/sub 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
	provider.Enabler

	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
	DownlinkQueueInvalidated *pubsub.Subscription
	LocationSolved           *pubsub.Subscription
	ServiceData              *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, enabler provider.Enabler) (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