/// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic. /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary> /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param> /// <param name="serviceImpl">An object implementing the server-side handling logic.</param> public static void BindService(grpc::ServiceBinderBase serviceBinder, PublisherBase serviceImpl) { serviceBinder.AddMethod(__Method_PublishMessage, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::GrpcAgent.PublishRequest, global::GrpcAgent.PublishReply>(serviceImpl.PublishMessage)); }
/// <summary>Creates service definition that can be registered with a server</summary> /// <param name="serviceImpl">An object implementing the server-side handling logic.</param> public static grpc::ServerServiceDefinition BindService(PublisherBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_PublishMessage, serviceImpl.PublishMessage).Build()); }
public static void BindService(grpc::ServiceBinderBase serviceBinder, PublisherBase serviceImpl) { serviceBinder.AddMethod(__Method_PublishChannelConnectionEvents, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Eventarc.Publishing.V1.PublishChannelConnectionEventsRequest, global::Google.Cloud.Eventarc.Publishing.V1.PublishChannelConnectionEventsResponse>(serviceImpl.PublishChannelConnectionEvents)); }
public IStackMonitoring AddPublishing(AlertTransportSettings alertTransportSettings, ServiceHealthCheck monitor) { PublisherBase publisher = null; switch (alertTransportSettings) { case EmailTransportSettings _: { publisher = new EmailAlertingPublisher(_healthChecksBuilder, monitor, alertTransportSettings); lock (_publishers) { _publishers.Add(publisher); } break; } case InfluxDbTransportSettings _: { publisher = new InfluxDbAlertingPublisher(_healthChecksBuilder, monitor, alertTransportSettings); lock (_publishers) { _publishers.Add(publisher); } break; } case CustomNotificationTransportSettings _: { publisher = new CustomNotificationAlertingPublisher(_healthChecksBuilder, monitor, alertTransportSettings); lock (_publishers) { _publishers.Add(publisher); } break; } case TelegramTransportSettings _: { publisher = new TelegramAlertingPublisher(_healthChecksBuilder, monitor, alertTransportSettings); lock (_publishers) { _publishers.Add(publisher); } break; } case SlackTransportSettings _: { publisher = new SlackAlertingPublisher(_healthChecksBuilder, monitor, alertTransportSettings); lock (_publishers) { _publishers.Add(publisher); } break; } } publisher?.SetUp(); return(this); }
public static grpc::ServerServiceDefinition BindService(PublisherBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_PublishChannelConnectionEvents, serviceImpl.PublishChannelConnectionEvents).Build()); }