Sha256: 55453930e49c7577940f06c425159e50fe2c58e423b929c52ace917a53d8c458
Contents?: true
Size: 1.32 KB
Versions: 27
Compression:
Stored size: 1.32 KB
Contents
<%- assert_locals method -%> # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.<%= method.name %>.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::<%= method.service.gem.version_name_full %> metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id <%- if method.routing_params? && !method.client_streaming? -%> header_params = { <%- method.routing_params.each_with_index do |routing_param, index| -%> <%- comma = index == method.routing_params.count - 1 ? "" : "," -%> "<%= routing_param %>" => request.<%= routing_param %><%= comma %> <%- end -%> } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header <%- end -%> options.apply_defaults timeout: @config.rpcs.<%= method.name %>.timeout, metadata: metadata, retry_policy: @config.rpcs.<%= method.name %>.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy
Version data entries
27 entries across 27 versions & 1 rubygems