mock

package
v3.24.0 Latest Latest
Warning

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

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

Documentation

Overview

Package mock provides mock implementation of necessary NS interfaces for testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NS

type NS struct {
	ttnpb.UnimplementedGsNsServer
	// contains filtered or unexported fields
}

NS is a mock NS for GS tests.

func StartNS

func StartNS(ctx context.Context) (*NS, string)

StartNS starts the mock NS.

func (ns *NS) HandleUplink(ctx context.Context, msg *ttnpb.UplinkMessage) (*types.Empty, error)

HandleUplink implements ttnpb.GsNsServer

func (*NS) ReportTxAcknowledgment added in v3.12.0

func (ns *NS) ReportTxAcknowledgment(ctx context.Context, msg *ttnpb.GatewayTxAcknowledgment) (*types.Empty, error)

ReportTxAcknowledgment implements ttnpb.GsNsServer

func (*NS) TxAck added in v3.12.0

func (ns *NS) TxAck() <-chan *ttnpb.GatewayTxAcknowledgment

TxAck returns the TxAck channel.

func (*NS) Up

func (ns *NS) Up() <-chan *ttnpb.UplinkMessage

Up returns the upstream channel.

Jump to

Keyboard shortcuts

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