A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://googlecloudplatform.github.io/functions-framework-ruby/v1.1.0/FunctionsFramework/CLI.html below:

Class: FunctionsFramework::CLI — Functions

77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/functions_framework/cli.rb', line 77

def parse_args argv   @option_parser = ::OptionParser.new do |op|     op.on "-t", "--target TARGET",
          "Set the name of the function to execute (defaults to #{DEFAULT_TARGET})" do |val|
      @target = val
    end
    op.on "-s", "--source SOURCE",
          "Set the source file to load (defaults to #{DEFAULT_SOURCE})" do |val|
      @source = val
    end
    op.on "--signature-type TYPE",
          "Asserts that the function has the given signature type." \
          " Supported values are 'http' and 'cloudevent'." do |val|
      @signature_type = val
    end
    op.on "-p", "--port PORT", "Set the port to listen to (defaults to 8080)" do |val|
      @port = val.to_i
    end
    op.on "-b", "--bind BIND", "Set the address to bind to (defaults to 0.0.0.0)" do |val|
      @bind = val
    end
    op.on "-e", "--environment ENV", "Set the Rack environment" do |val|
      @env = val
    end
    op.on "--min-threads NUM", "Set the minimum threead pool size" do |val|
      @min_threads = val
    end
    op.on "--max-threads NUM", "Set the maximum threead pool size" do |val|
      @max_threads = val
    end
    op.on "--[no-]detailed-errors", "Set whether to show error details" do |val|
      @detailed_errors = val
    end
    op.on "--verify", "Verify the app only, but do not run the server." do
      @what_to_do ||= :verify
    end
    op.on "-v", "--verbose", "Increase log verbosity" do
      @logging_level -= 1
    end
    op.on "-q", "--quiet", "Decrease log verbosity" do
      @logging_level += 1
    end
    op.on "--version", "Display the framework version" do
      @what_to_do ||= :version
    end
    op.on "--help", "Display help" do
      @what_to_do ||= :help
    end
  end
  begin
    @option_parser.parse! argv
    error! "Unrecognized arguments: #{argv}\n#{@option_parser}", 2 unless argv.empty?
  rescue ::OptionParser::ParseError => e
    error! "#{e.message}\n#{@option_parser}", 2
  end
  self
end

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4