@@ -56,6 +56,7 @@ public static partial class InstanceDiscoveryService
56
56
}
57
57
58
58
/// <summary>Base class for server-side implementations of InstanceDiscoveryService</summary>
59
+ [ grpc ::BindServiceMethod ( typeof ( InstanceDiscoveryService ) , "BindService" ) ]
59
60
public abstract partial class InstanceDiscoveryServiceBase
60
61
{
61
62
public virtual global ::System . Threading . Tasks . Task < global ::SkyWalking . NetworkProtocol . ApplicationInstanceMapping > registerInstance ( global ::SkyWalking . NetworkProtocol . ApplicationInstance request , grpc ::ServerCallContext context )
@@ -75,7 +76,7 @@ public partial class InstanceDiscoveryServiceClient : grpc::ClientBase<InstanceD
75
76
{
76
77
/// <summary>Creates a new client for InstanceDiscoveryService</summary>
77
78
/// <param name="channel">The channel to use to make remote calls.</param>
78
- public InstanceDiscoveryServiceClient ( grpc ::Channel channel ) : base ( channel )
79
+ public InstanceDiscoveryServiceClient ( grpc ::ChannelBase channel ) : base ( channel )
79
80
{
80
81
}
81
82
/// <summary>Creates a new client for InstanceDiscoveryService that uses a custom <c>CallInvoker</c>.</summary>
@@ -141,14 +142,14 @@ protected override InstanceDiscoveryServiceClient NewInstance(ClientBaseConfigur
141
142
. AddMethod ( __Method_heartbeat , serviceImpl . heartbeat ) . Build ( ) ;
142
143
}
143
144
144
- /// <summary>Register service method implementations with a service binder. Useful when customizing the service binding logic.
145
+ /// <summary>Register service method with a service binder with or without implementation . Useful when customizing the service binding logic.
145
146
/// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
146
147
/// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
147
148
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
148
149
public static void BindService ( grpc ::ServiceBinderBase serviceBinder , InstanceDiscoveryServiceBase serviceImpl )
149
150
{
150
- serviceBinder . AddMethod ( __Method_registerInstance , serviceImpl . registerInstance ) ;
151
- serviceBinder . AddMethod ( __Method_heartbeat , serviceImpl . heartbeat ) ;
151
+ serviceBinder . AddMethod ( __Method_registerInstance , serviceImpl == null ? null : new grpc :: UnaryServerMethod < global :: SkyWalking . NetworkProtocol . ApplicationInstance , global :: SkyWalking . NetworkProtocol . ApplicationInstanceMapping > ( serviceImpl . registerInstance ) ) ;
152
+ serviceBinder . AddMethod ( __Method_heartbeat , serviceImpl == null ? null : new grpc :: UnaryServerMethod < global :: SkyWalking . NetworkProtocol . ApplicationInstanceHeartbeat , global :: SkyWalking . NetworkProtocol . Downstream > ( serviceImpl . heartbeat ) ) ;
152
153
}
153
154
154
155
}
@@ -176,6 +177,7 @@ public static partial class ServiceNameDiscoveryService
176
177
}
177
178
178
179
/// <summary>Base class for server-side implementations of ServiceNameDiscoveryService</summary>
180
+ [ grpc ::BindServiceMethod ( typeof ( ServiceNameDiscoveryService ) , "BindService" ) ]
179
181
public abstract partial class ServiceNameDiscoveryServiceBase
180
182
{
181
183
public virtual global ::System . Threading . Tasks . Task < global ::SkyWalking . NetworkProtocol . ServiceNameMappingCollection > discovery ( global ::SkyWalking . NetworkProtocol . ServiceNameCollection request , grpc ::ServerCallContext context )
@@ -190,7 +192,7 @@ public partial class ServiceNameDiscoveryServiceClient : grpc::ClientBase<Servic
190
192
{
191
193
/// <summary>Creates a new client for ServiceNameDiscoveryService</summary>
192
194
/// <param name="channel">The channel to use to make remote calls.</param>
193
- public ServiceNameDiscoveryServiceClient ( grpc ::Channel channel ) : base ( channel )
195
+ public ServiceNameDiscoveryServiceClient ( grpc ::ChannelBase channel ) : base ( channel )
194
196
{
195
197
}
196
198
/// <summary>Creates a new client for ServiceNameDiscoveryService that uses a custom <c>CallInvoker</c>.</summary>
@@ -239,13 +241,13 @@ protected override ServiceNameDiscoveryServiceClient NewInstance(ClientBaseConfi
239
241
. AddMethod ( __Method_discovery , serviceImpl . discovery ) . Build ( ) ;
240
242
}
241
243
242
- /// <summary>Register service method implementations with a service binder. Useful when customizing the service binding logic.
244
+ /// <summary>Register service method with a service binder with or without implementation . Useful when customizing the service binding logic.
243
245
/// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
244
246
/// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
245
247
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
246
248
public static void BindService ( grpc ::ServiceBinderBase serviceBinder , ServiceNameDiscoveryServiceBase serviceImpl )
247
249
{
248
- serviceBinder . AddMethod ( __Method_discovery , serviceImpl . discovery ) ;
250
+ serviceBinder . AddMethod ( __Method_discovery , serviceImpl == null ? null : new grpc :: UnaryServerMethod < global :: SkyWalking . NetworkProtocol . ServiceNameCollection , global :: SkyWalking . NetworkProtocol . ServiceNameMappingCollection > ( serviceImpl . discovery ) ) ;
249
251
}
250
252
251
253
}
0 commit comments