Skip to content

Commit

Permalink
Allow kwargs to be passed to create_channel (via synth). (#8397)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and busunkim96 committed Jun 19, 2019
1 parent 0eb1f95 commit edcbf6f
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ def __init__(
}

@classmethod
def create_channel(cls, address="monitoring.googleapis.com:443", credentials=None):
def create_channel(
cls, address="monitoring.googleapis.com:443", credentials=None, **kwargs
):
"""Create and return a gRPC channel object.
Args:
Expand All @@ -86,6 +88,8 @@ def create_channel(cls, address="monitoring.googleapis.com:443", credentials=Non
credentials identify this application to the service. If
none are specified, the client will attempt to ascertain
the credentials from the environment.
kwargs (dict): Keyword arguments, which are passed to the
channel creation.
Returns:
grpc.Channel: A gRPC channel object.
Expand All @@ -98,6 +102,7 @@ def create_channel(cls, address="monitoring.googleapis.com:443", credentials=Non
"grpc.max_send_message_length": -1,
"grpc.max_receive_message_length": -1,
}.items(),
**kwargs
)

@property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ def __init__(
}

@classmethod
def create_channel(cls, address="monitoring.googleapis.com:443", credentials=None):
def create_channel(
cls, address="monitoring.googleapis.com:443", credentials=None, **kwargs
):
"""Create and return a gRPC channel object.
Args:
Expand All @@ -84,6 +86,8 @@ def create_channel(cls, address="monitoring.googleapis.com:443", credentials=Non
credentials identify this application to the service. If
none are specified, the client will attempt to ascertain
the credentials from the environment.
kwargs (dict): Keyword arguments, which are passed to the
channel creation.
Returns:
grpc.Channel: A gRPC channel object.
Expand All @@ -96,6 +100,7 @@ def create_channel(cls, address="monitoring.googleapis.com:443", credentials=Non
"grpc.max_send_message_length": -1,
"grpc.max_receive_message_length": -1,
}.items(),
**kwargs
)

@property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ def __init__(
}

@classmethod
def create_channel(cls, address="monitoring.googleapis.com:443", credentials=None):
def create_channel(
cls, address="monitoring.googleapis.com:443", credentials=None, **kwargs
):
"""Create and return a gRPC channel object.
Args:
Expand All @@ -84,6 +86,8 @@ def create_channel(cls, address="monitoring.googleapis.com:443", credentials=Non
credentials identify this application to the service. If
none are specified, the client will attempt to ascertain
the credentials from the environment.
kwargs (dict): Keyword arguments, which are passed to the
channel creation.
Returns:
grpc.Channel: A gRPC channel object.
Expand All @@ -96,6 +100,7 @@ def create_channel(cls, address="monitoring.googleapis.com:443", credentials=Non
"grpc.max_send_message_length": -1,
"grpc.max_receive_message_length": -1,
}.items(),
**kwargs
)

@property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ def __init__(
}

@classmethod
def create_channel(cls, address="monitoring.googleapis.com:443", credentials=None):
def create_channel(
cls, address="monitoring.googleapis.com:443", credentials=None, **kwargs
):
"""Create and return a gRPC channel object.
Args:
Expand All @@ -86,6 +88,8 @@ def create_channel(cls, address="monitoring.googleapis.com:443", credentials=Non
credentials identify this application to the service. If
none are specified, the client will attempt to ascertain
the credentials from the environment.
kwargs (dict): Keyword arguments, which are passed to the
channel creation.
Returns:
grpc.Channel: A gRPC channel object.
Expand All @@ -98,6 +102,7 @@ def create_channel(cls, address="monitoring.googleapis.com:443", credentials=Non
"grpc.max_send_message_length": -1,
"grpc.max_receive_message_length": -1,
}.items(),
**kwargs
)

@property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ def __init__(
}

@classmethod
def create_channel(cls, address="monitoring.googleapis.com:443", credentials=None):
def create_channel(
cls, address="monitoring.googleapis.com:443", credentials=None, **kwargs
):
"""Create and return a gRPC channel object.
Args:
Expand All @@ -86,6 +88,8 @@ def create_channel(cls, address="monitoring.googleapis.com:443", credentials=Non
credentials identify this application to the service. If
none are specified, the client will attempt to ascertain
the credentials from the environment.
kwargs (dict): Keyword arguments, which are passed to the
channel creation.
Returns:
grpc.Channel: A gRPC channel object.
Expand All @@ -98,6 +102,7 @@ def create_channel(cls, address="monitoring.googleapis.com:443", credentials=Non
"grpc.max_send_message_length": -1,
"grpc.max_receive_message_length": -1,
}.items(),
**kwargs
)

@property
Expand Down
10 changes: 5 additions & 5 deletions monitoring/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2019-06-15T12:24:02.145928Z",
"updateTime": "2019-06-18T12:23:03.583307Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.26.0",
"dockerImage": "googleapis/artman@sha256:6db0735b0d3beec5b887153a2a7c7411fc7bb53f73f6f389a822096bd14a3a15"
"version": "0.27.0",
"dockerImage": "googleapis/artman@sha256:b036a7f4278d9deb5796f065e5c7f608d47d75369985ca7ab5039998120e972d"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "7b58b37559f6a5337c4c564518e9573d742df225",
"internalRef": "253322136"
"sha": "384aa843867c4d17756d14a01f047b6368494d32",
"internalRef": "253675319"
}
},
{
Expand Down

0 comments on commit edcbf6f

Please sign in to comment.