Sha256: 47c73977bacbd07320ecad4f86065ec801c43b2ceef5cf1933f8436a86726864
Contents?: true
Size: 1.32 KB
Versions: 8
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
8 entries across 8 versions & 1 rubygems