mock

package
v3.11.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GatewayServer

type GatewayServer struct {
	*component.Component
	Downlink chan *ttnpb.DownlinkMessage
}

GatewayServer is a mock Gateway Server.

func NewGatewayServer

func NewGatewayServer(c *component.Component) (*GatewayServer, error)

NewGatewayServer returns a new GatewayServer.

func (*GatewayServer) Publish

Publish publishes the given message to Packet Broker Agent in the cluster.

func (*GatewayServer) RegisterHandlers

func (gs *GatewayServer) RegisterHandlers(s *runtime.ServeMux, conn *grpc.ClientConn)

RegisterHandlers implements rpcserver.Registerer.

func (*GatewayServer) RegisterServices

func (gs *GatewayServer) RegisterServices(s *grpc.Server)

RegisterServices implements rpcserver.Registerer.

func (*GatewayServer) Roles

func (gs *GatewayServer) Roles() []ttnpb.ClusterRole

Roles implements rpcserver.Registerer.

ScheduleDownlink implements ttnpb.NsGsServer.

type NetworkServer

type NetworkServer struct {
	*component.Component
	Uplink chan *ttnpb.UplinkMessage
}

NetworkServer is a mock Network Server.

func NewNetworkServer

func NewNetworkServer(c *component.Component) (*NetworkServer, error)

NewNetworkServer returns a new NetworkServer.

func (ns *NetworkServer) HandleUplink(ctx context.Context, req *ttnpb.UplinkMessage) (*pbtypes.Empty, error)

HandleUplink implements ttnpb.GsNsServer.

func (*NetworkServer) Publish

func (ns *NetworkServer) Publish(ctx context.Context, down *ttnpb.DownlinkMessage) error

Publish publishes the given message to Packet Broker Agent in the cluster.

func (*NetworkServer) RegisterHandlers

func (ns *NetworkServer) RegisterHandlers(s *runtime.ServeMux, conn *grpc.ClientConn)

RegisterHandlers implements rpcserver.Registerer.

func (*NetworkServer) RegisterServices

func (ns *NetworkServer) RegisterServices(s *grpc.Server)

RegisterServices implements rpcserver.Registerer.

func (*NetworkServer) Roles

func (ns *NetworkServer) Roles() []ttnpb.ClusterRole

Roles implements rpcserver.Registerer.

type PBDataPlane

type PBDataPlane struct {
	*grpc.Server
	ForwarderUp     chan *packetbroker.RoutedUplinkMessage
	ForwarderDown   chan *packetbroker.RoutedDownlinkMessage
	HomeNetworkDown chan *packetbroker.RoutedDownlinkMessage
	HomeNetworkUp   chan *packetbroker.RoutedUplinkMessage
}

PBDataPlane is a mock Packet Broker Data Plane.

func NewPBDataPlane

func NewPBDataPlane(cert tls.Certificate, clientCAs *x509.CertPool) *PBDataPlane

NewPBDataPlane instantiates a new mock Packet Broker Data Plane.

Jump to

Keyboard shortcuts

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