ns

package
v3.30.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package ns abstracts the V3 Network Server to the upstream.Handler interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster interface {
	GetPeerConn(ctx context.Context, role ttnpb.ClusterRole, ids cluster.EntityIdentifiers) (*grpc.ClientConn, error)
	WithClusterAuth() grpc.CallOption
	ClaimIDs(ctx context.Context, ids cluster.EntityIdentifiers) error
	UnclaimIDs(ctx context.Context, ids cluster.EntityIdentifiers) error
}

Cluster provides cluster operations.

type ContextDecoupler added in v3.13.3

type ContextDecoupler interface {
	FromRequestContext(ctx context.Context) context.Context
}

ContextDecoupler decouples the request context from its values.

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler is the upstream handler.

func NewHandler

func NewHandler(ctx context.Context, cluster Cluster, contextDecoupler ContextDecoupler, devAddrPrefixes []types.DevAddrPrefix) *Handler

NewHandler returns a new upstream handler.

func (*Handler) ConnectGateway

func (h *Handler) ConnectGateway(ctx context.Context, ids *ttnpb.GatewayIdentifiers, conn *io.Connection) error

ConnectGateway implements upstream.Handler.

func (*Handler) DevAddrPrefixes added in v3.13.3

func (h *Handler) DevAddrPrefixes() []types.DevAddrPrefix

DevAddrPrefixes implements upstream.Handler.

func (*Handler) HandleStatus

HandleStatus implements upstream.Handler.

func (*Handler) HandleTxAck added in v3.12.0

func (h *Handler) HandleTxAck(ctx context.Context, ids *ttnpb.GatewayIdentifiers, msg *ttnpb.TxAcknowledgment) error

HandleTxAck implements upstream.Handler.

HandleUplink implements upstream.Handler.

func (*Handler) Setup

func (h *Handler) Setup(context.Context) error

Setup implements upstream.Handler.

Jump to

Keyboard shortcuts

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