Documentation ¶
Index ¶
- type GatewayServer
- func (gs *GatewayServer) Publish(ctx context.Context, up *ttnpb.GatewayUplinkMessage) error
- func (gs *GatewayServer) RegisterHandlers(s *runtime.ServeMux, conn *grpc.ClientConn)
- func (gs *GatewayServer) RegisterServices(s *grpc.Server)
- func (gs *GatewayServer) Roles() []ttnpb.ClusterRole
- func (gs *GatewayServer) ScheduleDownlink(ctx context.Context, req *ttnpb.DownlinkMessage) (*ttnpb.ScheduleDownlinkResponse, error)
- func (gs *GatewayServer) UpdateGateway(ctx context.Context, req *ttnpb.UpdatePacketBrokerGatewayRequest) (*ttnpb.UpdatePacketBrokerGatewayResponse, error)
- type NetworkServer
- func (ns *NetworkServer) HandleUplink(ctx context.Context, req *ttnpb.UplinkMessage) (*pbtypes.Empty, error)
- func (ns *NetworkServer) Publish(ctx context.Context, down *ttnpb.DownlinkMessage) error
- func (ns *NetworkServer) RegisterHandlers(s *runtime.ServeMux, conn *grpc.ClientConn)
- func (ns *NetworkServer) RegisterServices(s *grpc.Server)
- func (ns *NetworkServer) ReportTxAcknowledgment(_ context.Context, req *ttnpb.GatewayTxAcknowledgment) (*pbtypes.Empty, error)
- func (ns *NetworkServer) Roles() []ttnpb.ClusterRole
- type PBControlPlane
- func (s *PBControlPlane) GetDefaultPolicy(ctx context.Context, req *routingpb.GetDefaultPolicyRequest) (*routingpb.GetPolicyResponse, error)
- func (s *PBControlPlane) GetHomeNetworkPolicy(ctx context.Context, req *routingpb.GetHomeNetworkPolicyRequest) (*routingpb.GetPolicyResponse, error)
- func (s *PBControlPlane) ListDefaultPolicies(ctx context.Context, req *routingpb.ListDefaultPoliciesRequest) (*routingpb.ListDefaultPoliciesResponse, error)
- func (s *PBControlPlane) ListEffectivePolicies(ctx context.Context, req *routingpb.ListEffectivePoliciesRequest) (*routingpb.ListEffectivePoliciesResponse, error)
- func (s *PBControlPlane) ListHomeNetworkPolicies(ctx context.Context, req *routingpb.ListHomeNetworkPoliciesRequest) (*routingpb.ListHomeNetworkPoliciesResponse, error)
- func (s *PBControlPlane) ListNetworksWithPolicy(ctx context.Context, req *routingpb.ListNetworksWithPolicyRequest) (*routingpb.ListNetworksResponse, error)
- func (s *PBControlPlane) SetDefaultPolicy(ctx context.Context, req *routingpb.SetPolicyRequest) (*pbtypes.Empty, error)
- func (s *PBControlPlane) SetHomeNetworkPolicy(ctx context.Context, req *routingpb.SetPolicyRequest) (*pbtypes.Empty, error)
- type PBDataPlane
- type PBIAM
- type PBMapper
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 ¶
func (gs *GatewayServer) Publish(ctx context.Context, up *ttnpb.GatewayUplinkMessage) error
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.
func (*GatewayServer) ScheduleDownlink ¶
func (gs *GatewayServer) ScheduleDownlink(ctx context.Context, req *ttnpb.DownlinkMessage) (*ttnpb.ScheduleDownlinkResponse, error)
ScheduleDownlink implements ttnpb.NsGsServer.
func (*GatewayServer) UpdateGateway ¶ added in v3.13.3
func (gs *GatewayServer) UpdateGateway(ctx context.Context, req *ttnpb.UpdatePacketBrokerGatewayRequest) (*ttnpb.UpdatePacketBrokerGatewayResponse, error)
UpdateGateway updates the gateway in Packet Broker Agent in the cluster.
type NetworkServer ¶
type NetworkServer struct { *component.Component Uplink chan *ttnpb.UplinkMessage TxAck chan *ttnpb.GatewayTxAcknowledgment }
NetworkServer is a mock Network Server.
func NewNetworkServer ¶
func NewNetworkServer(c *component.Component) (*NetworkServer, error)
NewNetworkServer returns a new NetworkServer.
func (*NetworkServer) HandleUplink ¶
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) ReportTxAcknowledgment ¶ added in v3.12.0
func (ns *NetworkServer) ReportTxAcknowledgment(_ context.Context, req *ttnpb.GatewayTxAcknowledgment) (*pbtypes.Empty, error)
ReportTxAcknowledgment implements ttnpb.GsNsServer.
func (*NetworkServer) Roles ¶
func (ns *NetworkServer) Roles() []ttnpb.ClusterRole
Roles implements rpcserver.Registerer.
type PBControlPlane ¶ added in v3.12.0
type PBControlPlane struct { *grpc.Server ListDefaultPoliciesHandler func(ctx context.Context, req *routingpb.ListDefaultPoliciesRequest) (*routingpb.ListDefaultPoliciesResponse, error) GetDefaultPolicyHandler func(ctx context.Context, req *routingpb.GetDefaultPolicyRequest) (*routingpb.GetPolicyResponse, error) SetDefaultPolicyHandler func(ctx context.Context, req *routingpb.SetPolicyRequest) (*pbtypes.Empty, error) ListHomeNetworkPoliciesHandler func(ctx context.Context, req *routingpb.ListHomeNetworkPoliciesRequest) (*routingpb.ListHomeNetworkPoliciesResponse, error) GetHomeNetworkPolicyHandler func(ctx context.Context, req *routingpb.GetHomeNetworkPolicyRequest) (*routingpb.GetPolicyResponse, error) SetHomeNetworkPolicyHandler func(ctx context.Context, req *routingpb.SetPolicyRequest) (*pbtypes.Empty, error) ListEffectivePoliciesHandler func(ctx context.Context, req *routingpb.ListEffectivePoliciesRequest) (*routingpb.ListEffectivePoliciesResponse, error) ListNetworksWithPolicyHandler func(ctx context.Context, req *routingpb.ListNetworksWithPolicyRequest) (*routingpb.ListNetworksResponse, error) }
PBControlPlane is a mock Packet Broker Control Plane.
func NewPBControlPlane ¶ added in v3.12.0
func NewPBControlPlane(tb testing.TB) *PBControlPlane
NewPBControlPlane instantiates a new mock Packet Broker Control Plane.
func (*PBControlPlane) GetDefaultPolicy ¶ added in v3.12.0
func (s *PBControlPlane) GetDefaultPolicy(ctx context.Context, req *routingpb.GetDefaultPolicyRequest) (*routingpb.GetPolicyResponse, error)
func (*PBControlPlane) GetHomeNetworkPolicy ¶ added in v3.12.0
func (s *PBControlPlane) GetHomeNetworkPolicy(ctx context.Context, req *routingpb.GetHomeNetworkPolicyRequest) (*routingpb.GetPolicyResponse, error)
func (*PBControlPlane) ListDefaultPolicies ¶ added in v3.12.0
func (s *PBControlPlane) ListDefaultPolicies(ctx context.Context, req *routingpb.ListDefaultPoliciesRequest) (*routingpb.ListDefaultPoliciesResponse, error)
func (*PBControlPlane) ListEffectivePolicies ¶ added in v3.12.0
func (s *PBControlPlane) ListEffectivePolicies(ctx context.Context, req *routingpb.ListEffectivePoliciesRequest) (*routingpb.ListEffectivePoliciesResponse, error)
func (*PBControlPlane) ListHomeNetworkPolicies ¶ added in v3.12.0
func (s *PBControlPlane) ListHomeNetworkPolicies(ctx context.Context, req *routingpb.ListHomeNetworkPoliciesRequest) (*routingpb.ListHomeNetworkPoliciesResponse, error)
func (*PBControlPlane) ListNetworksWithPolicy ¶ added in v3.13.0
func (s *PBControlPlane) ListNetworksWithPolicy(ctx context.Context, req *routingpb.ListNetworksWithPolicyRequest) (*routingpb.ListNetworksResponse, error)
func (*PBControlPlane) SetDefaultPolicy ¶ added in v3.12.0
func (s *PBControlPlane) SetDefaultPolicy(ctx context.Context, req *routingpb.SetPolicyRequest) (*pbtypes.Empty, error)
func (*PBControlPlane) SetHomeNetworkPolicy ¶ added in v3.12.0
func (s *PBControlPlane) SetHomeNetworkPolicy(ctx context.Context, req *routingpb.SetPolicyRequest) (*pbtypes.Empty, error)
type PBDataPlane ¶
type PBDataPlane struct { *grpc.Server ForwarderUp chan *packetbroker.RoutedUplinkMessage ForwarderDown chan *packetbroker.RoutedDownlinkMessage ForwarderDownStateChange chan *packetbroker.DownlinkMessageDeliveryStateChange HomeNetworkDown chan *packetbroker.RoutedDownlinkMessage HomeNetworkUp chan *packetbroker.RoutedUplinkMessage HomeNetworkUpStateChange chan *packetbroker.UplinkMessageDeliveryStateChange }
PBDataPlane is a mock Packet Broker Data Plane.
func NewPBDataPlane ¶
func NewPBDataPlane(tb testing.TB) *PBDataPlane
NewPBDataPlane instantiates a new mock Packet Broker Data Plane.
type PBIAM ¶ added in v3.12.0
type PBIAM struct { *grpc.Server Registry struct { ListNetworksHandler func(ctx context.Context, req *iampb.ListNetworksRequest) (*iampb.ListNetworksResponse, error) CreateNetworkHandler func(ctx context.Context, req *iampb.CreateNetworkRequest) (*iampb.CreateNetworkResponse, error) GetNetworkHandler func(ctx context.Context, req *iampb.NetworkRequest) (*iampb.GetNetworkResponse, error) UpdateNetworkHandler func(ctx context.Context, req *iampb.UpdateNetworkRequest) (*pbtypes.Empty, error) DeleteNetworkHandler func(ctx context.Context, req *iampb.NetworkRequest) (*pbtypes.Empty, error) ListTenantsHandler func(ctx context.Context, req *iampb.ListTenantsRequest) (*iampb.ListTenantsResponse, error) CreateTenantHandler func(ctx context.Context, req *iampb.CreateTenantRequest) (*iampb.CreateTenantResponse, error) GetTenantHandler func(ctx context.Context, req *iampb.TenantRequest) (*iampb.GetTenantResponse, error) UpdateTenantHandler func(ctx context.Context, req *iampb.UpdateTenantRequest) (*pbtypes.Empty, error) DeleteTenantHandler func(ctx context.Context, req *iampb.TenantRequest) (*pbtypes.Empty, error) } Catalog struct { ListNetworksHandler func(ctx context.Context, req *iampbv2.ListNetworksRequest) (*iampbv2.ListNetworksResponse, error) ListHomeNetworksHandler func(ctx context.Context, req *iampbv2.ListNetworksRequest) (*iampbv2.ListNetworksResponse, error) } }
PBIAM is a mock Packet Broker IAM.
type PBMapper ¶ added in v3.13.3
type PBMapper struct { *grpc.Server UpdateGatewayHandler func(ctx context.Context, in *mappingpb.UpdateGatewayRequest, opts ...grpc.CallOption) (*pbtypes.Empty, error) }
PBMapper is a mock Packet Broker Mapper.
func NewPBMapper ¶ added in v3.13.3
NewPBMapper instantiates a new mock Packet Broker Data Plane.