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
10ddfde8
Commit
10ddfde8
authored
9 years ago
by
Tim Emiola
Browse files
Options
Downloads
Patches
Plain Diff
Adds grpc.primary_user_agent key during stub creation
parent
9a2a3aec
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/ruby/lib/grpc/generic/client_stub.rb
+2
-0
2 additions, 0 deletions
src/ruby/lib/grpc/generic/client_stub.rb
with
2 additions
and
0 deletions
src/ruby/lib/grpc/generic/client_stub.rb
+
2
−
0
View file @
10ddfde8
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
require
'grpc/generic/active_call'
require
'grpc/generic/active_call'
require
'grpc/version'
# GRPC contains the General RPC module.
# GRPC contains the General RPC module.
module
GRPC
module
GRPC
...
@@ -46,6 +47,7 @@ module GRPC
...
@@ -46,6 +47,7 @@ module GRPC
fail
(
TypeError
,
'!Channel'
)
unless
alt_chan
.
is_a?
(
Core
::
Channel
)
fail
(
TypeError
,
'!Channel'
)
unless
alt_chan
.
is_a?
(
Core
::
Channel
)
return
alt_chan
return
alt_chan
end
end
kw
[
'grpc.primary_user_agent'
]
=
"grpc-ruby/
#{
VERSION
}
"
return
Core
::
Channel
.
new
(
host
,
kw
)
if
creds
.
nil?
return
Core
::
Channel
.
new
(
host
,
kw
)
if
creds
.
nil?
fail
(
TypeError
,
'!Credentials'
)
unless
creds
.
is_a?
(
Core
::
Credentials
)
fail
(
TypeError
,
'!Credentials'
)
unless
creds
.
is_a?
(
Core
::
Credentials
)
Core
::
Channel
.
new
(
host
,
kw
,
creds
)
Core
::
Channel
.
new
(
host
,
kw
,
creds
)
...
...
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