func (b *broker) RegisterManager(s *grpc.Server) { server := &brokerManager{ broker: b, deviceManager: pb_lorawan.NewDeviceManagerClient(b.nsConn), devAddrManager: pb_lorawan.NewDevAddrManagerClient(b.nsConn), } server.clientRate = ratelimit.NewRegistry(5000, time.Hour) pb.RegisterBrokerManagerServer(s, server) lorawan.RegisterDeviceManagerServer(s, server) lorawan.RegisterDevAddrManagerServer(s, server) }
func (h *handler) RegisterManager(s *grpc.Server) { server := &handlerManager{ handler: h, deviceManager: pb_lorawan.NewDeviceManagerClient(h.ttnBrokerConn), devAddrManager: pb_lorawan.NewDevAddrManagerClient(h.ttnBrokerConn), } server.applicationRate = ratelimit.NewRegistry(5000, time.Hour) server.clientRate = ratelimit.NewRegistry(5000, time.Hour) pb.RegisterHandlerManagerServer(s, server) pb.RegisterApplicationManagerServer(s, server) pb_lorawan.RegisterDevAddrManagerServer(s, server) }