|
|
|
@ -381,7 +381,7 @@ def server_credentials_alts(): |
|
|
|
|
grpc_alts_credentials_options_destroy(c_options) |
|
|
|
|
return credentials |
|
|
|
|
|
|
|
|
|
cdef class GCEChannelCredentials(ChannelCredentials): |
|
|
|
|
cdef class ComputeEngineChannelCredentials(ChannelCredentials): |
|
|
|
|
cdef grpc_channel_credentials* _c_creds |
|
|
|
|
cdef grpc_call_credentials* _c_call_creds |
|
|
|
|
|
|
|
|
@ -390,12 +390,12 @@ cdef class GCEChannelCredentials(ChannelCredentials): |
|
|
|
|
self._c_call_creds = call_creds.c() |
|
|
|
|
|
|
|
|
|
cdef grpc_channel_credentials *c(self) except *: |
|
|
|
|
self._c_creds = grpc_gce_channel_credentials_create(self._c_call_creds, NULL) |
|
|
|
|
self._c_creds = grpc_compute_engine_channel_credentials_create(self._c_call_creds, NULL) |
|
|
|
|
return self._c_creds |
|
|
|
|
|
|
|
|
|
# TODO: Does this thing need to be deleted? |
|
|
|
|
# I suppose the reason the google default one doesn't need to be is |
|
|
|
|
# because there's one per process. We'll see. |
|
|
|
|
|
|
|
|
|
def channel_credentials_gce(call_creds): |
|
|
|
|
return GCEChannelCredentials(call_creds) |
|
|
|
|
def channel_credentials_compute_engine(call_creds): |
|
|
|
|
return ComputeEngineChannelCredentials(call_creds) |
|
|
|
|