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)
- 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) 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
- func (s *PBIAM) CreateNetwork(ctx context.Context, req *iampb.CreateNetworkRequest) (*iampb.CreateNetworkResponse, error)
- func (s *PBIAM) CreateTenant(ctx context.Context, req *iampb.CreateTenantRequest) (*iampb.CreateTenantResponse, error)
- func (s *PBIAM) DeleteNetwork(ctx context.Context, req *iampb.NetworkRequest) (*pbtypes.Empty, error)
- func (s *PBIAM) DeleteTenant(ctx context.Context, req *iampb.TenantRequest) (*pbtypes.Empty, error)
- func (s *PBIAM) GetNetwork(ctx context.Context, req *iampb.NetworkRequest) (*iampb.GetNetworkResponse, error)
- func (s *PBIAM) GetTenant(ctx context.Context, req *iampb.TenantRequest) (*iampb.GetTenantResponse, error)
- func (s *PBIAM) ListHomeNetworks(ctx context.Context, req *iampbv2.ListHomeNetworksRequest) (*iampbv2.ListHomeNetworksResponse, error)
- func (s *PBIAM) ListNetworks(ctx context.Context, req *iampb.ListNetworksRequest) (*iampb.ListNetworksResponse, error)
- func (s *PBIAM) ListTenants(ctx context.Context, req *iampb.ListTenantsRequest) (*iampb.ListTenantsResponse, error)
- func (s *PBIAM) UpdateNetwork(ctx context.Context, req *iampb.UpdateNetworkRequest) (*pbtypes.Empty, error)
- func (s *PBIAM) UpdateTenant(ctx context.Context, req *iampb.UpdateTenantRequest) (*pbtypes.Empty, error)
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.
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 ¶
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 ¶
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) }
PBControlPlane is a mock Packet Broker Control Plane.
func NewPBControlPlane ¶
func NewPBControlPlane(tb testing.TB) *PBControlPlane
NewPBControlPlane instantiates a new mock Packet Broker Control Plane.
func (*PBControlPlane) GetDefaultPolicy ¶
func (s *PBControlPlane) GetDefaultPolicy(ctx context.Context, req *routingpb.GetDefaultPolicyRequest) (*routingpb.GetPolicyResponse, error)
func (*PBControlPlane) GetHomeNetworkPolicy ¶
func (s *PBControlPlane) GetHomeNetworkPolicy(ctx context.Context, req *routingpb.GetHomeNetworkPolicyRequest) (*routingpb.GetPolicyResponse, error)
func (*PBControlPlane) ListDefaultPolicies ¶
func (s *PBControlPlane) ListDefaultPolicies(ctx context.Context, req *routingpb.ListDefaultPoliciesRequest) (*routingpb.ListDefaultPoliciesResponse, error)
func (*PBControlPlane) ListEffectivePolicies ¶
func (s *PBControlPlane) ListEffectivePolicies(ctx context.Context, req *routingpb.ListEffectivePoliciesRequest) (*routingpb.ListEffectivePoliciesResponse, error)
func (*PBControlPlane) ListHomeNetworkPolicies ¶
func (s *PBControlPlane) ListHomeNetworkPolicies(ctx context.Context, req *routingpb.ListHomeNetworkPoliciesRequest) (*routingpb.ListHomeNetworkPoliciesResponse, error)
func (*PBControlPlane) SetDefaultPolicy ¶
func (s *PBControlPlane) SetDefaultPolicy(ctx context.Context, req *routingpb.SetPolicyRequest) (*pbtypes.Empty, error)
func (*PBControlPlane) SetHomeNetworkPolicy ¶
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 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.
type PBIAM ¶
type PBIAM struct { *grpc.Server 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) ListHomeNetworksHandler func(ctx context.Context, req *iampbv2.ListHomeNetworksRequest) (*iampbv2.ListHomeNetworksResponse, error) }
PBIAM is a mock Packet Broker IAM.
func (*PBIAM) CreateNetwork ¶
func (s *PBIAM) CreateNetwork(ctx context.Context, req *iampb.CreateNetworkRequest) (*iampb.CreateNetworkResponse, error)
func (*PBIAM) CreateTenant ¶
func (s *PBIAM) CreateTenant(ctx context.Context, req *iampb.CreateTenantRequest) (*iampb.CreateTenantResponse, error)
func (*PBIAM) DeleteNetwork ¶
func (*PBIAM) DeleteTenant ¶
func (*PBIAM) GetNetwork ¶
func (s *PBIAM) GetNetwork(ctx context.Context, req *iampb.NetworkRequest) (*iampb.GetNetworkResponse, error)
func (*PBIAM) GetTenant ¶
func (s *PBIAM) GetTenant(ctx context.Context, req *iampb.TenantRequest) (*iampb.GetTenantResponse, error)
func (*PBIAM) ListHomeNetworks ¶
func (s *PBIAM) ListHomeNetworks(ctx context.Context, req *iampbv2.ListHomeNetworksRequest) (*iampbv2.ListHomeNetworksResponse, error)
func (*PBIAM) ListNetworks ¶
func (s *PBIAM) ListNetworks(ctx context.Context, req *iampb.ListNetworksRequest) (*iampb.ListNetworksResponse, error)
func (*PBIAM) ListTenants ¶
func (s *PBIAM) ListTenants(ctx context.Context, req *iampb.ListTenantsRequest) (*iampb.ListTenantsResponse, error)