You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/serinus_microservices/lib/transporters/grpc/grpc_controller.dart
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,20 @@ import 'package:grpc/grpc.dart';
2
2
import'package:protobuf/protobuf.dart';
3
3
import'package:serinus/serinus.dart';
4
4
5
+
/// The [GrpcServiceController] allows defining gRPC services as Serinus Controllers.
6
+
///
7
+
/// It extends the base [Controller] class and includes a reference to the gRPC [Service] it represents. This controller can be used to group related gRPC methods together, making it easier to manage and organize your gRPC services within the Serinus framework.
8
+
classGrpcServiceControllerextendsController {
9
+
10
+
/// The [service] property contains the gRPC service definition that this controller represents.
11
+
finalService service;
12
+
13
+
/// Creates a gRPC service controller.
14
+
GrpcServiceController({
15
+
requiredthis.service,
16
+
}):super(service.$name);
17
+
}
18
+
5
19
/// The [GrpcRoute] class is the gRPC
6
20
classGrpcRouteextendsRoute {
7
21
/// The [serviceName] property contains the name of the gRPC service.
0 commit comments