Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
3165c09c
Commit
3165c09c
authored
9 years ago
by
yang-g
Browse files
Options
Downloads
Patches
Plain Diff
regenerate csharp and ruby service from proto
parent
aea13f1c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/csharp/Grpc.HealthCheck/Health.cs
+22
-50
22 additions, 50 deletions
src/csharp/Grpc.HealthCheck/Health.cs
src/ruby/pb/grpc/health/v1/health.rb
+1
-2
1 addition, 2 deletions
src/ruby/pb/grpc/health/v1/health.rb
with
23 additions
and
52 deletions
src/csharp/Grpc.HealthCheck/Health.cs
+
22
−
50
View file @
3165c09c
...
...
@@ -7,7 +7,7 @@ using pb = global::Google.Protobuf;
using
pbc
=
global
::
Google
.
Protobuf
.
Collections
;
using
pbr
=
global
::
Google
.
Protobuf
.
Reflection
;
using
scg
=
global
::
System
.
Collections
.
Generic
;
namespace
Grpc.Health.V1
Alpha
{
namespace
Grpc.Health.V1
{
/// <summary>Holder for reflection information generated from health.proto</summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
()]
...
...
@@ -23,20 +23,19 @@ namespace Grpc.Health.V1Alpha {
static
HealthReflection
()
{
byte
[]
descriptorData
=
global
::
System
.
Convert
.
FromBase64String
(
string
.
Concat
(
"CgxoZWFsdGgucHJvdG8SE2d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ode
(
descriptorData
,
new
pbr
::
FileDescriptor
[]
{
},
new
pbr
::
GeneratedCodeInfo
(
null
,
new
pbr
::
GeneratedCodeInfo
[]
{
new
pbr
::
GeneratedCodeInfo
(
typeof
(
global
::
Grpc
.
Health
.
V1
Alpha
.
HealthCheckRequest
),
global
::
Grpc
.
Health
.
V1
Alpha
.
HealthCheckRequest
.
Parser
,
new
[]{
"Host"
,
"Service"
},
null
,
null
,
null
),
new
pbr
::
GeneratedCodeInfo
(
typeof
(
global
::
Grpc
.
Health
.
V1
Alpha
.
HealthCheckResponse
),
global
::
Grpc
.
Health
.
V1
Alpha
.
HealthCheckResponse
.
Parser
,
new
[]{
"Status"
},
null
,
new
[]{
typeof
(
global
::
Grpc
.
Health
.
V1
Alpha
.
HealthCheckResponse
.
Types
.
ServingStatus
)
},
null
)
new
pbr
::
GeneratedCodeInfo
(
typeof
(
global
::
Grpc
.
Health
.
V1
.
HealthCheckRequest
),
global
::
Grpc
.
Health
.
V1
.
HealthCheckRequest
.
Parser
,
new
[]{
"Service"
},
null
,
null
,
null
),
new
pbr
::
GeneratedCodeInfo
(
typeof
(
global
::
Grpc
.
Health
.
V1
.
HealthCheckResponse
),
global
::
Grpc
.
Health
.
V1
.
HealthCheckResponse
.
Parser
,
new
[]{
"Status"
},
null
,
new
[]{
typeof
(
global
::
Grpc
.
Health
.
V1
.
HealthCheckResponse
.
Types
.
ServingStatus
)
},
null
)
}));
}
#
endregion
...
...
@@ -49,7 +48,7 @@ namespace Grpc.Health.V1Alpha {
public
static
pb
::
MessageParser
<
HealthCheckRequest
>
Parser
{
get
{
return
_parser
;
}
}
public
static
pbr
::
MessageDescriptor
Descriptor
{
get
{
return
global
::
Grpc
.
Health
.
V1
Alpha
.
HealthReflection
.
Descriptor
.
MessageTypes
[
0
];
}
get
{
return
global
::
Grpc
.
Health
.
V1
.
HealthReflection
.
Descriptor
.
MessageTypes
[
0
];
}
}
pbr
::
MessageDescriptor
pb
::
IMessage
.
Descriptor
{
...
...
@@ -63,7 +62,6 @@ namespace Grpc.Health.V1Alpha {
partial
void
OnConstruction
();
public
HealthCheckRequest
(
HealthCheckRequest
other
)
:
this
()
{
host_
=
other
.
host_
;
service_
=
other
.
service_
;
}
...
...
@@ -71,18 +69,8 @@ namespace Grpc.Health.V1Alpha {
return
new
HealthCheckRequest
(
this
);
}
/// <summary>Field number for the "host" field.</summary>
public
const
int
HostFieldNumber
=
1
;
private
string
host_
=
""
;
public
string
Host
{
get
{
return
host_
;
}
set
{
host_
=
pb
::
Preconditions
.
CheckNotNull
(
value
,
"value"
);
}
}
/// <summary>Field number for the "service" field.</summary>
public
const
int
ServiceFieldNumber
=
2
;
public
const
int
ServiceFieldNumber
=
1
;
private
string
service_
=
""
;
public
string
Service
{
get
{
return
service_
;
}
...
...
@@ -102,14 +90,12 @@ namespace Grpc.Health.V1Alpha {
if
(
ReferenceEquals
(
other
,
this
))
{
return
true
;
}
if
(
Host
!=
other
.
Host
)
return
false
;
if
(
Service
!=
other
.
Service
)
return
false
;
return
true
;
}
public
override
int
GetHashCode
()
{
int
hash
=
1
;
if
(
Host
.
Length
!=
0
)
hash
^=
Host
.
GetHashCode
();
if
(
Service
.
Length
!=
0
)
hash
^=
Service
.
GetHashCode
();
return
hash
;
}
...
...
@@ -119,21 +105,14 @@ namespace Grpc.Health.V1Alpha {
}
public
void
WriteTo
(
pb
::
CodedOutputStream
output
)
{
if
(
Host
.
Length
!=
0
)
{
output
.
WriteRawTag
(
10
);
output
.
WriteString
(
Host
);
}
if
(
Service
.
Length
!=
0
)
{
output
.
WriteRawTag
(
1
8
);
output
.
WriteRawTag
(
1
0
);
output
.
WriteString
(
Service
);
}
}
public
int
CalculateSize
()
{
int
size
=
0
;
if
(
Host
.
Length
!=
0
)
{
size
+=
1
+
pb
::
CodedOutputStream
.
ComputeStringSize
(
Host
);
}
if
(
Service
.
Length
!=
0
)
{
size
+=
1
+
pb
::
CodedOutputStream
.
ComputeStringSize
(
Service
);
}
...
...
@@ -144,9 +123,6 @@ namespace Grpc.Health.V1Alpha {
if
(
other
==
null
)
{
return
;
}
if
(
other
.
Host
.
Length
!=
0
)
{
Host
=
other
.
Host
;
}
if
(
other
.
Service
.
Length
!=
0
)
{
Service
=
other
.
Service
;
}
...
...
@@ -160,10 +136,6 @@ namespace Grpc.Health.V1Alpha {
input
.
SkipLastField
();
break
;
case
10
:
{
Host
=
input
.
ReadString
();
break
;
}
case
18
:
{
Service
=
input
.
ReadString
();
break
;
}
...
...
@@ -179,7 +151,7 @@ namespace Grpc.Health.V1Alpha {
public
static
pb
::
MessageParser
<
HealthCheckResponse
>
Parser
{
get
{
return
_parser
;
}
}
public
static
pbr
::
MessageDescriptor
Descriptor
{
get
{
return
global
::
Grpc
.
Health
.
V1
Alpha
.
HealthReflection
.
Descriptor
.
MessageTypes
[
1
];
}
get
{
return
global
::
Grpc
.
Health
.
V1
.
HealthReflection
.
Descriptor
.
MessageTypes
[
1
];
}
}
pbr
::
MessageDescriptor
pb
::
IMessage
.
Descriptor
{
...
...
@@ -202,8 +174,8 @@ namespace Grpc.Health.V1Alpha {
/// <summary>Field number for the "status" field.</summary>
public
const
int
StatusFieldNumber
=
1
;
private
global
::
Grpc
.
Health
.
V1
Alpha
.
HealthCheckResponse
.
Types
.
ServingStatus
status_
=
global
::
Grpc
.
Health
.
V1
Alpha
.
HealthCheckResponse
.
Types
.
ServingStatus
.
UNKNOWN
;
public
global
::
Grpc
.
Health
.
V1
Alpha
.
HealthCheckResponse
.
Types
.
ServingStatus
Status
{
private
global
::
Grpc
.
Health
.
V1
.
HealthCheckResponse
.
Types
.
ServingStatus
status_
=
global
::
Grpc
.
Health
.
V1
.
HealthCheckResponse
.
Types
.
ServingStatus
.
UNKNOWN
;
public
global
::
Grpc
.
Health
.
V1
.
HealthCheckResponse
.
Types
.
ServingStatus
Status
{
get
{
return
status_
;
}
set
{
status_
=
value
;
...
...
@@ -227,7 +199,7 @@ namespace Grpc.Health.V1Alpha {
public
override
int
GetHashCode
()
{
int
hash
=
1
;
if
(
Status
!=
global
::
Grpc
.
Health
.
V1
Alpha
.
HealthCheckResponse
.
Types
.
ServingStatus
.
UNKNOWN
)
hash
^=
Status
.
GetHashCode
();
if
(
Status
!=
global
::
Grpc
.
Health
.
V1
.
HealthCheckResponse
.
Types
.
ServingStatus
.
UNKNOWN
)
hash
^=
Status
.
GetHashCode
();
return
hash
;
}
...
...
@@ -236,7 +208,7 @@ namespace Grpc.Health.V1Alpha {
}
public
void
WriteTo
(
pb
::
CodedOutputStream
output
)
{
if
(
Status
!=
global
::
Grpc
.
Health
.
V1
Alpha
.
HealthCheckResponse
.
Types
.
ServingStatus
.
UNKNOWN
)
{
if
(
Status
!=
global
::
Grpc
.
Health
.
V1
.
HealthCheckResponse
.
Types
.
ServingStatus
.
UNKNOWN
)
{
output
.
WriteRawTag
(
8
);
output
.
WriteEnum
((
int
)
Status
);
}
...
...
@@ -244,7 +216,7 @@ namespace Grpc.Health.V1Alpha {
public
int
CalculateSize
()
{
int
size
=
0
;
if
(
Status
!=
global
::
Grpc
.
Health
.
V1
Alpha
.
HealthCheckResponse
.
Types
.
ServingStatus
.
UNKNOWN
)
{
if
(
Status
!=
global
::
Grpc
.
Health
.
V1
.
HealthCheckResponse
.
Types
.
ServingStatus
.
UNKNOWN
)
{
size
+=
1
+
pb
::
CodedOutputStream
.
ComputeEnumSize
((
int
)
Status
);
}
return
size
;
...
...
@@ -254,7 +226,7 @@ namespace Grpc.Health.V1Alpha {
if
(
other
==
null
)
{
return
;
}
if
(
other
.
Status
!=
global
::
Grpc
.
Health
.
V1
Alpha
.
HealthCheckResponse
.
Types
.
ServingStatus
.
UNKNOWN
)
{
if
(
other
.
Status
!=
global
::
Grpc
.
Health
.
V1
.
HealthCheckResponse
.
Types
.
ServingStatus
.
UNKNOWN
)
{
Status
=
other
.
Status
;
}
}
...
...
@@ -267,7 +239,7 @@ namespace Grpc.Health.V1Alpha {
input
.
SkipLastField
();
break
;
case
8
:
{
status_
=
(
global
::
Grpc
.
Health
.
V1
Alpha
.
HealthCheckResponse
.
Types
.
ServingStatus
)
input
.
ReadEnum
();
status_
=
(
global
::
Grpc
.
Health
.
V1
.
HealthCheckResponse
.
Types
.
ServingStatus
)
input
.
ReadEnum
();
break
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/ruby/pb/grpc/health/v1/health.rb
+
1
−
2
View file @
3165c09c
...
...
@@ -5,8 +5,7 @@ require 'google/protobuf'
Google
::
Protobuf
::
DescriptorPool
.
generated_pool
.
build
do
add_message
"grpc.health.v1.HealthCheckRequest"
do
optional
:host
,
:string
,
1
optional
:service
,
:string
,
2
optional
:service
,
:string
,
1
end
add_message
"grpc.health.v1.HealthCheckResponse"
do
optional
:status
,
:enum
,
1
,
"grpc.health.v1.HealthCheckResponse.ServingStatus"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment