mock

package
v3.30.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Frontend

type Frontend struct {
	Up     chan *ttnpb.UplinkMessage
	Status chan *ttnpb.GatewayStatus
	TxAck  chan *ttnpb.TxAcknowledgment
	Down   chan *ttnpb.DownlinkMessage
}

Frontend is a mock front-end.

func ConnectFrontend

func ConnectFrontend(ctx context.Context, ids *ttnpb.GatewayIdentifiers, server io.Server) (*Frontend, error)

ConnectFrontend connects a new mock front-end to the given server. The gateway time starts at Unix epoch.

func (*Frontend) DutyCycleStyle added in v3.22.1

func (*Frontend) DutyCycleStyle() scheduling.DutyCycleStyle

func (*Frontend) Protocol

func (*Frontend) Protocol() string

func (*Frontend) SupportsDownlinkClaim

func (*Frontend) SupportsDownlinkClaim() bool

type Server

type Server interface {
	io.Server

	HasDownlinkClaim(context.Context, *ttnpb.GatewayIdentifiers) bool
	RegisterGateway(ctx context.Context, ids *ttnpb.GatewayIdentifiers, gateway *ttnpb.Gateway)
	GetConnection(ctx context.Context, ids *ttnpb.GatewayIdentifiers) *io.Connection
	Connections() <-chan *io.Connection
}

Server represents a testing io.Server.

func NewServer

func NewServer(c *component.Component, is *mockis.MockDefinition) Server

NewServer instantiates a new Server.

Jump to

Keyboard shortcuts

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