Documentation ¶
Overview ¶
Package packetbroker abstracts the Packet Broker Agent to the upstream.Handler interface.
Index ¶
- type Cluster
- type Handler
- func (h *Handler) ConnectGateway(context.Context, ttnpb.GatewayIdentifiers, *io.Connection) error
- func (h *Handler) GetDevAddrPrefixes() []types.DevAddrPrefix
- func (h *Handler) HandleStatus(context.Context, ttnpb.GatewayIdentifiers, *ttnpb.GatewayStatus) error
- func (h *Handler) HandleUplink(ctx context.Context, _ ttnpb.GatewayIdentifiers, ...) error
- func (h *Handler) Setup(context.Context) error
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 ttnpb.Identifiers) (*grpc.ClientConn, error) WithClusterAuth() grpc.CallOption }
Cluster represents the interface the cluster.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is the upstream handler.
func NewHandler ¶
func NewHandler(ctx context.Context, cluster Cluster, devAddrPrefixes []types.DevAddrPrefix) *Handler
NewHandler returns a new upstream handler.
func (*Handler) ConnectGateway ¶
func (h *Handler) ConnectGateway(context.Context, ttnpb.GatewayIdentifiers, *io.Connection) error
ConnectGateway implements upstream.Handler.
func (*Handler) GetDevAddrPrefixes ¶
func (h *Handler) GetDevAddrPrefixes() []types.DevAddrPrefix
GetDevAddrPrefixes implements upstream.Handler.
func (*Handler) HandleStatus ¶
func (h *Handler) HandleStatus(context.Context, ttnpb.GatewayIdentifiers, *ttnpb.GatewayStatus) error
HandleStatus implements upstream.Handler.
func (*Handler) HandleUplink ¶
func (h *Handler) HandleUplink(ctx context.Context, _ ttnpb.GatewayIdentifiers, ids ttnpb.EndDeviceIdentifiers, msg *ttnpb.GatewayUplinkMessage) error
HandleUplink implements upstream.Handler.
Click to show internal directories.
Click to hide internal directories.