Commit 49fd9709 authored by Lemon's avatar Lemon

Initial SkyWalking.NetworkProtocol project

parent 0ebe471a

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2024
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkyWalking.NetworkProtocol", "src\SkyWalking.NetworkProtocol\SkyWalking.NetworkProtocol.csproj", "{54B9183A-928B-43E1-9851-10E2F1CCE61C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{05BF0D4E-C824-4EC8-8330-36C1FC49910E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "protos", "protos", "{39479996-FC5A-4A92-BDA1-498648C743D3}"
ProjectSection(SolutionItems) = preProject
protos\ApplicationRegisterService.proto = protos\ApplicationRegisterService.proto
protos\Common.proto = protos\Common.proto
protos\DiscoveryService.proto = protos\DiscoveryService.proto
protos\Downstream.proto = protos\Downstream.proto
protos\JVMMetricsService.proto = protos\JVMMetricsService.proto
protos\KeyWithIntegerValue.proto = protos\KeyWithIntegerValue.proto
protos\KeyWithStringValue.proto = protos\KeyWithStringValue.proto
protos\NetworkAddressRegisterService.proto = protos\NetworkAddressRegisterService.proto
protos\TraceSegmentService.proto = protos\TraceSegmentService.proto
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "solution items", "solution items", "{E38F0F6E-6E10-491D-8786-650F6A4B6698}"
ProjectSection(SolutionItems) = preProject
generate_protos.bat = generate_protos.bat
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{54B9183A-928B-43E1-9851-10E2F1CCE61C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{54B9183A-928B-43E1-9851-10E2F1CCE61C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{54B9183A-928B-43E1-9851-10E2F1CCE61C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{54B9183A-928B-43E1-9851-10E2F1CCE61C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{54B9183A-928B-43E1-9851-10E2F1CCE61C} = {05BF0D4E-C824-4EC8-8330-36C1FC49910E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {94C0DA2C-CCCB-4314-93A2-9809B5DD0583}
EndGlobalSection
EndGlobal
This diff is collapsed.
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: ApplicationRegisterService.proto
// </auto-generated>
#pragma warning disable 1591
#region Designer generated code
using System;
using System.Threading;
using System.Threading.Tasks;
using grpc = global::Grpc.Core;
namespace SkyWalking.NetworkProtocol {
/// <summary>
///register service for ApplicationCode, this service is called when service starts.
/// </summary>
public static partial class ApplicationRegisterService
{
static readonly string __ServiceName = "SkyWalking.NetworkProtocol.ApplicationRegisterService";
static readonly grpc::Marshaller<global::SkyWalking.NetworkProtocol.Application> __Marshaller_Application = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::SkyWalking.NetworkProtocol.Application.Parser.ParseFrom);
static readonly grpc::Marshaller<global::SkyWalking.NetworkProtocol.ApplicationMapping> __Marshaller_ApplicationMapping = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::SkyWalking.NetworkProtocol.ApplicationMapping.Parser.ParseFrom);
static readonly grpc::Method<global::SkyWalking.NetworkProtocol.Application, global::SkyWalking.NetworkProtocol.ApplicationMapping> __Method_applicationCodeRegister = new grpc::Method<global::SkyWalking.NetworkProtocol.Application, global::SkyWalking.NetworkProtocol.ApplicationMapping>(
grpc::MethodType.Unary,
__ServiceName,
"applicationCodeRegister",
__Marshaller_Application,
__Marshaller_ApplicationMapping);
/// <summary>Service descriptor</summary>
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
{
get { return global::SkyWalking.NetworkProtocol.ApplicationRegisterServiceReflection.Descriptor.Services[0]; }
}
/// <summary>Base class for server-side implementations of ApplicationRegisterService</summary>
public abstract partial class ApplicationRegisterServiceBase
{
public virtual global::System.Threading.Tasks.Task<global::SkyWalking.NetworkProtocol.ApplicationMapping> applicationCodeRegister(global::SkyWalking.NetworkProtocol.Application request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
}
/// <summary>Client for ApplicationRegisterService</summary>
public partial class ApplicationRegisterServiceClient : grpc::ClientBase<ApplicationRegisterServiceClient>
{
/// <summary>Creates a new client for ApplicationRegisterService</summary>
/// <param name="channel">The channel to use to make remote calls.</param>
public ApplicationRegisterServiceClient(grpc::Channel channel) : base(channel)
{
}
/// <summary>Creates a new client for ApplicationRegisterService that uses a custom <c>CallInvoker</c>.</summary>
/// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
public ApplicationRegisterServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
{
}
/// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
protected ApplicationRegisterServiceClient() : base()
{
}
/// <summary>Protected constructor to allow creation of configured clients.</summary>
/// <param name="configuration">The client configuration.</param>
protected ApplicationRegisterServiceClient(ClientBaseConfiguration configuration) : base(configuration)
{
}
public virtual global::SkyWalking.NetworkProtocol.ApplicationMapping applicationCodeRegister(global::SkyWalking.NetworkProtocol.Application request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
return applicationCodeRegister(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual global::SkyWalking.NetworkProtocol.ApplicationMapping applicationCodeRegister(global::SkyWalking.NetworkProtocol.Application request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_applicationCodeRegister, null, options, request);
}
public virtual grpc::AsyncUnaryCall<global::SkyWalking.NetworkProtocol.ApplicationMapping> applicationCodeRegisterAsync(global::SkyWalking.NetworkProtocol.Application request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
return applicationCodeRegisterAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncUnaryCall<global::SkyWalking.NetworkProtocol.ApplicationMapping> applicationCodeRegisterAsync(global::SkyWalking.NetworkProtocol.Application request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_applicationCodeRegister, null, options, request);
}
/// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
protected override ApplicationRegisterServiceClient NewInstance(ClientBaseConfiguration configuration)
{
return new ApplicationRegisterServiceClient(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(ApplicationRegisterServiceBase serviceImpl)
{
return grpc::ServerServiceDefinition.CreateBuilder()
.AddMethod(__Method_applicationCodeRegister, serviceImpl.applicationCodeRegister).Build();
}
}
}
#endregion
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: Common.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace SkyWalking.NetworkProtocol {
/// <summary>Holder for reflection information generated from Common.proto</summary>
public static partial class CommonReflection {
#region Descriptor
/// <summary>File descriptor for Common.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static CommonReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"CgxDb21tb24ucHJvdG8SGlNreVdhbGtpbmcuTmV0d29ya1Byb3RvY29sKioK",
"CFNwYW5UeXBlEgkKBUVudHJ5EAASCAoERXhpdBABEgkKBUxvY2FsEAJCKwon",
"b3JnLmFwYWNoZS5za3l3YWxraW5nLmFwbS5uZXR3b3JrLnByb3RvUAFiBnBy",
"b3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::SkyWalking.NetworkProtocol.SpanType), }, null));
}
#endregion
}
#region Enums
public enum SpanType {
[pbr::OriginalName("Entry")] Entry = 0,
[pbr::OriginalName("Exit")] Exit = 1,
[pbr::OriginalName("Local")] Local = 2,
}
#endregion
}
#endregion Designer generated code
This diff is collapsed.
This diff is collapsed.
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: Downstream.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace SkyWalking.NetworkProtocol {
/// <summary>Holder for reflection information generated from Downstream.proto</summary>
public static partial class DownstreamReflection {
#region Descriptor
/// <summary>File descriptor for Downstream.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static DownstreamReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChBEb3duc3RyZWFtLnByb3RvEhpTa3lXYWxraW5nLk5ldHdvcmtQcm90b2Nv",
"bCIMCgpEb3duc3RyZWFtQisKJ29yZy5hcGFjaGUuc2t5d2Fsa2luZy5hcG0u",
"bmV0d29yay5wcm90b1ABYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::SkyWalking.NetworkProtocol.Downstream), global::SkyWalking.NetworkProtocol.Downstream.Parser, null, null, null, null)
}));
}
#endregion
}
#region Messages
/// <summary>
/// nothing down stream from collector yet.
/// </summary>
public sealed partial class Downstream : pb::IMessage<Downstream> {
private static readonly pb::MessageParser<Downstream> _parser = new pb::MessageParser<Downstream>(() => new Downstream());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<Downstream> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::SkyWalking.NetworkProtocol.DownstreamReflection.Descriptor.MessageTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Downstream() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Downstream(Downstream other) : this() {
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Downstream Clone() {
return new Downstream(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as Downstream);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(Downstream other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(Downstream other) {
if (other == null) {
return;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
}
}
}
}
#endregion
}
#endregion Designer generated code
This diff is collapsed.
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: JVMMetricsService.proto
// </auto-generated>
#pragma warning disable 1591
#region Designer generated code
using System;
using System.Threading;
using System.Threading.Tasks;
using grpc = global::Grpc.Core;
namespace SkyWalking.NetworkProtocol {
public static partial class JVMMetricsService
{
static readonly string __ServiceName = "SkyWalking.NetworkProtocol.JVMMetricsService";
static readonly grpc::Marshaller<global::SkyWalking.NetworkProtocol.JVMMetrics> __Marshaller_JVMMetrics = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::SkyWalking.NetworkProtocol.JVMMetrics.Parser.ParseFrom);
static readonly grpc::Marshaller<global::SkyWalking.NetworkProtocol.Downstream> __Marshaller_Downstream = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::SkyWalking.NetworkProtocol.Downstream.Parser.ParseFrom);
static readonly grpc::Method<global::SkyWalking.NetworkProtocol.JVMMetrics, global::SkyWalking.NetworkProtocol.Downstream> __Method_collect = new grpc::Method<global::SkyWalking.NetworkProtocol.JVMMetrics, global::SkyWalking.NetworkProtocol.Downstream>(
grpc::MethodType.Unary,
__ServiceName,
"collect",
__Marshaller_JVMMetrics,
__Marshaller_Downstream);
/// <summary>Service descriptor</summary>
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
{
get { return global::SkyWalking.NetworkProtocol.JVMMetricsServiceReflection.Descriptor.Services[0]; }
}
/// <summary>Base class for server-side implementations of JVMMetricsService</summary>
public abstract partial class JVMMetricsServiceBase
{
public virtual global::System.Threading.Tasks.Task<global::SkyWalking.NetworkProtocol.Downstream> collect(global::SkyWalking.NetworkProtocol.JVMMetrics request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
}
/// <summary>Client for JVMMetricsService</summary>
public partial class JVMMetricsServiceClient : grpc::ClientBase<JVMMetricsServiceClient>
{
/// <summary>Creates a new client for JVMMetricsService</summary>
/// <param name="channel">The channel to use to make remote calls.</param>
public JVMMetricsServiceClient(grpc::Channel channel) : base(channel)
{
}
/// <summary>Creates a new client for JVMMetricsService that uses a custom <c>CallInvoker</c>.</summary>
/// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
public JVMMetricsServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
{
}
/// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
protected JVMMetricsServiceClient() : base()
{
}
/// <summary>Protected constructor to allow creation of configured clients.</summary>
/// <param name="configuration">The client configuration.</param>
protected JVMMetricsServiceClient(ClientBaseConfiguration configuration) : base(configuration)
{
}
public virtual global::SkyWalking.NetworkProtocol.Downstream collect(global::SkyWalking.NetworkProtocol.JVMMetrics request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
return collect(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual global::SkyWalking.NetworkProtocol.Downstream collect(global::SkyWalking.NetworkProtocol.JVMMetrics request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_collect, null, options, request);
}
public virtual grpc::AsyncUnaryCall<global::SkyWalking.NetworkProtocol.Downstream> collectAsync(global::SkyWalking.NetworkProtocol.JVMMetrics request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
return collectAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncUnaryCall<global::SkyWalking.NetworkProtocol.Downstream> collectAsync(global::SkyWalking.NetworkProtocol.JVMMetrics request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_collect, null, options, request);
}
/// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
protected override JVMMetricsServiceClient NewInstance(ClientBaseConfiguration configuration)
{
return new JVMMetricsServiceClient(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(JVMMetricsServiceBase serviceImpl)
{
return grpc::ServerServiceDefinition.CreateBuilder()
.AddMethod(__Method_collect, serviceImpl.collect).Build();
}
}
}
#endregion
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: KeyWithIntegerValue.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace SkyWalking.NetworkProtocol {
/// <summary>Holder for reflection information generated from KeyWithIntegerValue.proto</summary>
public static partial class KeyWithIntegerValueReflection {
#region Descriptor
/// <summary>File descriptor for KeyWithIntegerValue.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static KeyWithIntegerValueReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChlLZXlXaXRoSW50ZWdlclZhbHVlLnByb3RvEhpTa3lXYWxraW5nLk5ldHdv",
"cmtQcm90b2NvbCIxChNLZXlXaXRoSW50ZWdlclZhbHVlEgsKA2tleRgBIAEo",
"CRINCgV2YWx1ZRgCIAEoBUIrCidvcmcuYXBhY2hlLnNreXdhbGtpbmcuYXBt",
"Lm5ldHdvcmsucHJvdG9QAWIGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::SkyWalking.NetworkProtocol.KeyWithIntegerValue), global::SkyWalking.NetworkProtocol.KeyWithIntegerValue.Parser, new[]{ "Key", "Value" }, null, null, null)
}));
}
#endregion
}
#region Messages
public sealed partial class KeyWithIntegerValue : pb::IMessage<KeyWithIntegerValue> {
private static readonly pb::MessageParser<KeyWithIntegerValue> _parser = new pb::MessageParser<KeyWithIntegerValue>(() => new KeyWithIntegerValue());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<KeyWithIntegerValue> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::SkyWalking.NetworkProtocol.KeyWithIntegerValueReflection.Descriptor.MessageTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public KeyWithIntegerValue() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public KeyWithIntegerValue(KeyWithIntegerValue other) : this() {
key_ = other.key_;
value_ = other.value_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public KeyWithIntegerValue Clone() {
return new KeyWithIntegerValue(this);
}
/// <summary>Field number for the "key" field.</summary>
public const int KeyFieldNumber = 1;
private string key_ = "";
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Key {
get { return key_; }
set {
key_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "value" field.</summary>
public const int ValueFieldNumber = 2;
private int value_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int Value {
get { return value_; }
set {
value_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as KeyWithIntegerValue);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(KeyWithIntegerValue other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Key != other.Key) return false;
if (Value != other.Value) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (Key.Length != 0) hash ^= Key.GetHashCode();
if (Value != 0) hash ^= Value.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
if (Key.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Key);
}
if (Value != 0) {
output.WriteRawTag(16);
output.WriteInt32(Value);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (Key.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Key);
}
if (Value != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(Value);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(KeyWithIntegerValue other) {
if (other == null) {
return;
}
if (other.Key.Length != 0) {
Key = other.Key;
}
if (other.Value != 0) {
Value = other.Value;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
Key = input.ReadString();
break;
}
case 16: {
Value = input.ReadInt32();
break;
}
}
}
}
}
#endregion
}
#endregion Designer generated code
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: KeyWithStringValue.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace SkyWalking.NetworkProtocol {
/// <summary>Holder for reflection information generated from KeyWithStringValue.proto</summary>
public static partial class KeyWithStringValueReflection {
#region Descriptor
/// <summary>File descriptor for KeyWithStringValue.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static KeyWithStringValueReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChhLZXlXaXRoU3RyaW5nVmFsdWUucHJvdG8SGlNreVdhbGtpbmcuTmV0d29y",
"a1Byb3RvY29sIjAKEktleVdpdGhTdHJpbmdWYWx1ZRILCgNrZXkYASABKAkS",
"DQoFdmFsdWUYAiABKAlCKwonb3JnLmFwYWNoZS5za3l3YWxraW5nLmFwbS5u",
"ZXR3b3JrLnByb3RvUAFiBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::SkyWalking.NetworkProtocol.KeyWithStringValue), global::SkyWalking.NetworkProtocol.KeyWithStringValue.Parser, new[]{ "Key", "Value" }, null, null, null)
}));
}
#endregion
}
#region Messages
public sealed partial class KeyWithStringValue : pb::IMessage<KeyWithStringValue> {
private static readonly pb::MessageParser<KeyWithStringValue> _parser = new pb::MessageParser<KeyWithStringValue>(() => new KeyWithStringValue());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<KeyWithStringValue> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::SkyWalking.NetworkProtocol.KeyWithStringValueReflection.Descriptor.MessageTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public KeyWithStringValue() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public KeyWithStringValue(KeyWithStringValue other) : this() {
key_ = other.key_;
value_ = other.value_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public KeyWithStringValue Clone() {
return new KeyWithStringValue(this);
}
/// <summary>Field number for the "key" field.</summary>
public const int KeyFieldNumber = 1;
private string key_ = "";
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Key {
get { return key_; }
set {
key_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "value" field.</summary>
public const int ValueFieldNumber = 2;
private string value_ = "";
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Value {
get { return value_; }
set {
value_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as KeyWithStringValue);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(KeyWithStringValue other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Key != other.Key) return false;
if (Value != other.Value) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (Key.Length != 0) hash ^= Key.GetHashCode();
if (Value.Length != 0) hash ^= Value.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
if (Key.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Key);
}
if (Value.Length != 0) {
output.WriteRawTag(18);
output.WriteString(Value);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (Key.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Key);
}
if (Value.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Value);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(KeyWithStringValue other) {
if (other == null) {
return;
}
if (other.Key.Length != 0) {
Key = other.Key;
}
if (other.Value.Length != 0) {
Value = other.Value;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
Key = input.ReadString();
break;
}
case 18: {
Value = input.ReadString();
break;
}
}
}
}
}
#endregion
}
#endregion Designer generated code
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: NetworkAddressRegisterService.proto
// </auto-generated>
#pragma warning disable 1591
#region Designer generated code
using System;
using System.Threading;
using System.Threading.Tasks;
using grpc = global::Grpc.Core;
namespace SkyWalking.NetworkProtocol {
public static partial class NetworkAddressRegisterService
{
static readonly string __ServiceName = "SkyWalking.NetworkProtocol.NetworkAddressRegisterService";
static readonly grpc::Marshaller<global::SkyWalking.NetworkProtocol.NetworkAddresses> __Marshaller_NetworkAddresses = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::SkyWalking.NetworkProtocol.NetworkAddresses.Parser.ParseFrom);
static readonly grpc::Marshaller<global::SkyWalking.NetworkProtocol.NetworkAddressMappings> __Marshaller_NetworkAddressMappings = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::SkyWalking.NetworkProtocol.NetworkAddressMappings.Parser.ParseFrom);
static readonly grpc::Method<global::SkyWalking.NetworkProtocol.NetworkAddresses, global::SkyWalking.NetworkProtocol.NetworkAddressMappings> __Method_batchRegister = new grpc::Method<global::SkyWalking.NetworkProtocol.NetworkAddresses, global::SkyWalking.NetworkProtocol.NetworkAddressMappings>(
grpc::MethodType.Unary,
__ServiceName,
"batchRegister",
__Marshaller_NetworkAddresses,
__Marshaller_NetworkAddressMappings);
/// <summary>Service descriptor</summary>
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
{
get { return global::SkyWalking.NetworkProtocol.NetworkAddressRegisterServiceReflection.Descriptor.Services[0]; }
}
/// <summary>Base class for server-side implementations of NetworkAddressRegisterService</summary>
public abstract partial class NetworkAddressRegisterServiceBase
{
public virtual global::System.Threading.Tasks.Task<global::SkyWalking.NetworkProtocol.NetworkAddressMappings> batchRegister(global::SkyWalking.NetworkProtocol.NetworkAddresses request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
}
/// <summary>Client for NetworkAddressRegisterService</summary>
public partial class NetworkAddressRegisterServiceClient : grpc::ClientBase<NetworkAddressRegisterServiceClient>
{
/// <summary>Creates a new client for NetworkAddressRegisterService</summary>
/// <param name="channel">The channel to use to make remote calls.</param>
public NetworkAddressRegisterServiceClient(grpc::Channel channel) : base(channel)
{
}
/// <summary>Creates a new client for NetworkAddressRegisterService that uses a custom <c>CallInvoker</c>.</summary>
/// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
public NetworkAddressRegisterServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
{
}
/// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
protected NetworkAddressRegisterServiceClient() : base()
{
}
/// <summary>Protected constructor to allow creation of configured clients.</summary>
/// <param name="configuration">The client configuration.</param>
protected NetworkAddressRegisterServiceClient(ClientBaseConfiguration configuration) : base(configuration)
{
}
public virtual global::SkyWalking.NetworkProtocol.NetworkAddressMappings batchRegister(global::SkyWalking.NetworkProtocol.NetworkAddresses request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
return batchRegister(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual global::SkyWalking.NetworkProtocol.NetworkAddressMappings batchRegister(global::SkyWalking.NetworkProtocol.NetworkAddresses request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_batchRegister, null, options, request);
}
public virtual grpc::AsyncUnaryCall<global::SkyWalking.NetworkProtocol.NetworkAddressMappings> batchRegisterAsync(global::SkyWalking.NetworkProtocol.NetworkAddresses request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
return batchRegisterAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncUnaryCall<global::SkyWalking.NetworkProtocol.NetworkAddressMappings> batchRegisterAsync(global::SkyWalking.NetworkProtocol.NetworkAddresses request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_batchRegister, null, options, request);
}
/// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
protected override NetworkAddressRegisterServiceClient NewInstance(ClientBaseConfiguration configuration)
{
return new NetworkAddressRegisterServiceClient(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(NetworkAddressRegisterServiceBase serviceImpl)
{
return grpc::ServerServiceDefinition.CreateBuilder()
.AddMethod(__Method_batchRegister, serviceImpl.batchRegister).Build();
}
}
}
#endregion
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>SkyWalking gRPC protocol and generated codes.</Description>
<AssemblyTitle>SkyWalking.NetworkProtocol</AssemblyTitle>
<TargetFrameworks>netstandard1.6;net45</TargetFrameworks>
<AssemblyName>SkyWalking.NetworkProtocol</AssemblyName>
<PackageId>SkyWalking.NetworkProtocol</PackageId>
<PackageTags>SkyWalking</PackageTags>
<PackageReleaseNotes></PackageReleaseNotes>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.5.1" />
<PackageReference Include="Google.Protobuf.Tools" Version="3.5.1" />
<PackageReference Include="Grpc" Version="1.9.0" />
<PackageReference Include="Grpc.Tools" Version="1.9.0" />
</ItemGroup>
</Project>
This diff is collapsed.
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: TraceSegmentService.proto
// </auto-generated>
#pragma warning disable 1591
#region Designer generated code
using System;
using System.Threading;
using System.Threading.Tasks;
using grpc = global::Grpc.Core;
namespace SkyWalking.NetworkProtocol {
public static partial class TraceSegmentService
{
static readonly string __ServiceName = "SkyWalking.NetworkProtocol.TraceSegmentService";
static readonly grpc::Marshaller<global::SkyWalking.NetworkProtocol.UpstreamSegment> __Marshaller_UpstreamSegment = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::SkyWalking.NetworkProtocol.UpstreamSegment.Parser.ParseFrom);
static readonly grpc::Marshaller<global::SkyWalking.NetworkProtocol.Downstream> __Marshaller_Downstream = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::SkyWalking.NetworkProtocol.Downstream.Parser.ParseFrom);
static readonly grpc::Method<global::SkyWalking.NetworkProtocol.UpstreamSegment, global::SkyWalking.NetworkProtocol.Downstream> __Method_collect = new grpc::Method<global::SkyWalking.NetworkProtocol.UpstreamSegment, global::SkyWalking.NetworkProtocol.Downstream>(
grpc::MethodType.ClientStreaming,
__ServiceName,
"collect",
__Marshaller_UpstreamSegment,
__Marshaller_Downstream);
/// <summary>Service descriptor</summary>
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
{
get { return global::SkyWalking.NetworkProtocol.TraceSegmentServiceReflection.Descriptor.Services[0]; }
}
/// <summary>Base class for server-side implementations of TraceSegmentService</summary>
public abstract partial class TraceSegmentServiceBase
{
public virtual global::System.Threading.Tasks.Task<global::SkyWalking.NetworkProtocol.Downstream> collect(grpc::IAsyncStreamReader<global::SkyWalking.NetworkProtocol.UpstreamSegment> requestStream, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
}
/// <summary>Client for TraceSegmentService</summary>
public partial class TraceSegmentServiceClient : grpc::ClientBase<TraceSegmentServiceClient>
{
/// <summary>Creates a new client for TraceSegmentService</summary>
/// <param name="channel">The channel to use to make remote calls.</param>
public TraceSegmentServiceClient(grpc::Channel channel) : base(channel)
{
}
/// <summary>Creates a new client for TraceSegmentService that uses a custom <c>CallInvoker</c>.</summary>
/// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
public TraceSegmentServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
{
}
/// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
protected TraceSegmentServiceClient() : base()
{
}
/// <summary>Protected constructor to allow creation of configured clients.</summary>
/// <param name="configuration">The client configuration.</param>
protected TraceSegmentServiceClient(ClientBaseConfiguration configuration) : base(configuration)
{
}
public virtual grpc::AsyncClientStreamingCall<global::SkyWalking.NetworkProtocol.UpstreamSegment, global::SkyWalking.NetworkProtocol.Downstream> collect(grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
return collect(new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncClientStreamingCall<global::SkyWalking.NetworkProtocol.UpstreamSegment, global::SkyWalking.NetworkProtocol.Downstream> collect(grpc::CallOptions options)
{
return CallInvoker.AsyncClientStreamingCall(__Method_collect, null, options);
}
/// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
protected override TraceSegmentServiceClient NewInstance(ClientBaseConfiguration configuration)
{
return new TraceSegmentServiceClient(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(TraceSegmentServiceBase serviceImpl)
{
return grpc::ServerServiceDefinition.CreateBuilder()
.AddMethod(__Method_collect, serviceImpl.collect).Build();
}
}
}
#endregion
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment