Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

Commit

Permalink
Added Jaeger.Communication.Grpc
Browse files Browse the repository at this point in the history
Signed-off-by: Kraemer, Benjamin <[email protected]>
  • Loading branch information
Falco20019 committed Apr 15, 2020
1 parent b2c3f4c commit dc7152f
Show file tree
Hide file tree
Showing 15 changed files with 11,639 additions and 16 deletions.
15 changes: 15 additions & 0 deletions Jaeger.sln
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Jaeger.Senders.Grpc.Tests",
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Communication", "Communication", "{30786A14-F882-410B-A74D-BF608B05340A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Jaeger.Communication.Grpc", "src\Communication\Jaeger.Communication.Grpc\Jaeger.Communication.Grpc.csproj", "{F3D39D28-6AAE-4FAA-9C80-A200CFFEA1BD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Jaeger.Communication.Thrift", "src\Communication\Jaeger.Communication.Thrift\Jaeger.Communication.Thrift.csproj", "{4521D9CB-C7E6-4C38-AA34-035EC7DC41E0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{22F94D42-FF84-4B15-8762-C95ACC8D1FE5}"
Expand Down Expand Up @@ -181,6 +183,18 @@ Global
{6943F8EA-233C-408D-8145-923D5CDF6852}.Release|x64.Build.0 = Release|Any CPU
{6943F8EA-233C-408D-8145-923D5CDF6852}.Release|x86.ActiveCfg = Release|Any CPU
{6943F8EA-233C-408D-8145-923D5CDF6852}.Release|x86.Build.0 = Release|Any CPU
{F3D39D28-6AAE-4FAA-9C80-A200CFFEA1BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F3D39D28-6AAE-4FAA-9C80-A200CFFEA1BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F3D39D28-6AAE-4FAA-9C80-A200CFFEA1BD}.Debug|x64.ActiveCfg = Debug|Any CPU
{F3D39D28-6AAE-4FAA-9C80-A200CFFEA1BD}.Debug|x64.Build.0 = Debug|Any CPU
{F3D39D28-6AAE-4FAA-9C80-A200CFFEA1BD}.Debug|x86.ActiveCfg = Debug|Any CPU
{F3D39D28-6AAE-4FAA-9C80-A200CFFEA1BD}.Debug|x86.Build.0 = Debug|Any CPU
{F3D39D28-6AAE-4FAA-9C80-A200CFFEA1BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F3D39D28-6AAE-4FAA-9C80-A200CFFEA1BD}.Release|Any CPU.Build.0 = Release|Any CPU
{F3D39D28-6AAE-4FAA-9C80-A200CFFEA1BD}.Release|x64.ActiveCfg = Release|Any CPU
{F3D39D28-6AAE-4FAA-9C80-A200CFFEA1BD}.Release|x64.Build.0 = Release|Any CPU
{F3D39D28-6AAE-4FAA-9C80-A200CFFEA1BD}.Release|x86.ActiveCfg = Release|Any CPU
{F3D39D28-6AAE-4FAA-9C80-A200CFFEA1BD}.Release|x86.Build.0 = Release|Any CPU
{4521D9CB-C7E6-4C38-AA34-035EC7DC41E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4521D9CB-C7E6-4C38-AA34-035EC7DC41E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4521D9CB-C7E6-4C38-AA34-035EC7DC41E0}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -211,6 +225,7 @@ Global
{FFB09FE3-BEDD-49F4-93D2-C38CC1357D09} = {A608712F-64B9-49AA-B688-81B7A49436B7}
{6943F8EA-233C-408D-8145-923D5CDF6852} = {B79DA458-94D5-4BF6-9934-27E0AC24F604}
{30786A14-F882-410B-A74D-BF608B05340A} = {4FB0DAC9-D8C6-4368-B48E-363FA85029A4}
{F3D39D28-6AAE-4FAA-9C80-A200CFFEA1BD} = {30786A14-F882-410B-A74D-BF608B05340A}
{4521D9CB-C7E6-4C38-AA34-035EC7DC41E0} = {30786A14-F882-410B-A74D-BF608B05340A}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
Expand Down
123 changes: 123 additions & 0 deletions src/Communication/Jaeger.Communication.Grpc/CollectorGrpc.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: collector.proto
// </auto-generated>
// Original file comments:
// Copyright (c) 2019 The Jaeger Authors.
// Copyright (c) 2018 Uber Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma warning disable 0414, 1591
#region Designer generated code

using grpc = global::Grpc.Core;

namespace Jaeger.ApiV2 {
public static partial class CollectorService
{
static readonly string __ServiceName = "jaeger.api_v2.CollectorService";

static readonly grpc::Marshaller<global::Jaeger.ApiV2.PostSpansRequest> __Marshaller_jaeger_api_v2_PostSpansRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Jaeger.ApiV2.PostSpansRequest.Parser.ParseFrom);
static readonly grpc::Marshaller<global::Jaeger.ApiV2.PostSpansResponse> __Marshaller_jaeger_api_v2_PostSpansResponse = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Jaeger.ApiV2.PostSpansResponse.Parser.ParseFrom);

static readonly grpc::Method<global::Jaeger.ApiV2.PostSpansRequest, global::Jaeger.ApiV2.PostSpansResponse> __Method_PostSpans = new grpc::Method<global::Jaeger.ApiV2.PostSpansRequest, global::Jaeger.ApiV2.PostSpansResponse>(
grpc::MethodType.Unary,
__ServiceName,
"PostSpans",
__Marshaller_jaeger_api_v2_PostSpansRequest,
__Marshaller_jaeger_api_v2_PostSpansResponse);

/// <summary>Service descriptor</summary>
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
{
get { return global::Jaeger.ApiV2.CollectorReflection.Descriptor.Services[0]; }
}

/// <summary>Base class for server-side implementations of CollectorService</summary>
[grpc::BindServiceMethod(typeof(CollectorService), "BindService")]
public abstract partial class CollectorServiceBase
{
public virtual global::System.Threading.Tasks.Task<global::Jaeger.ApiV2.PostSpansResponse> PostSpans(global::Jaeger.ApiV2.PostSpansRequest request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}

}

/// <summary>Client for CollectorService</summary>
public partial class CollectorServiceClient : grpc::ClientBase<CollectorServiceClient>
{
/// <summary>Creates a new client for CollectorService</summary>
/// <param name="channel">The channel to use to make remote calls.</param>
public CollectorServiceClient(grpc::ChannelBase channel) : base(channel)
{
}
/// <summary>Creates a new client for CollectorService that uses a custom <c>CallInvoker</c>.</summary>
/// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
public CollectorServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
{
}
/// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
protected CollectorServiceClient() : base()
{
}
/// <summary>Protected constructor to allow creation of configured clients.</summary>
/// <param name="configuration">The client configuration.</param>
protected CollectorServiceClient(ClientBaseConfiguration configuration) : base(configuration)
{
}

public virtual global::Jaeger.ApiV2.PostSpansResponse PostSpans(global::Jaeger.ApiV2.PostSpansRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return PostSpans(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual global::Jaeger.ApiV2.PostSpansResponse PostSpans(global::Jaeger.ApiV2.PostSpansRequest request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_PostSpans, null, options, request);
}
public virtual grpc::AsyncUnaryCall<global::Jaeger.ApiV2.PostSpansResponse> PostSpansAsync(global::Jaeger.ApiV2.PostSpansRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return PostSpansAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncUnaryCall<global::Jaeger.ApiV2.PostSpansResponse> PostSpansAsync(global::Jaeger.ApiV2.PostSpansRequest request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_PostSpans, null, options, request);
}
/// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
protected override CollectorServiceClient NewInstance(ClientBaseConfiguration configuration)
{
return new CollectorServiceClient(configuration);
}
}

/// <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(CollectorServiceBase serviceImpl)
{
return grpc::ServerServiceDefinition.CreateBuilder()
.AddMethod(__Method_PostSpans, serviceImpl.PostSpans).Build();
}

/// <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, CollectorServiceBase serviceImpl)
{
serviceBinder.AddMethod(__Method_PostSpans, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Jaeger.ApiV2.PostSpansRequest, global::Jaeger.ApiV2.PostSpansResponse>(serviceImpl.PostSpans));
}

}
}
#endregion
Loading

0 comments on commit dc7152f

Please sign in to comment.