├── .DEREK.yml
├── .github
├── CODEOWNERS
├── FUNDING.yml
├── ISSUE_TEMPLATE.md
├── PULL_REQUEST_TEMPLATE.md
└── workflows
│ ├── build.yml
│ └── publish.yml
├── .gitignore
├── ADOPTERS.md
├── CONTRIBUTING.md
├── EULA.md
├── LICENSE
├── Makefile
├── README.md
├── _config.yml
├── api-docs
├── README.md
└── spec.openapi.yml
├── community.md
├── contrib
└── grafana.json
├── docs
├── CNAME
├── README.md
├── _config.yml
├── inception.png
├── of-layer-overview.png
├── of-overview.png
└── of-workflow.png
├── gateway
├── .gitignore
├── Dockerfile
├── Makefile
├── README.md
├── assets
│ ├── android-chrome-192x192.png
│ ├── android-chrome-256x256.png
│ ├── apple-touch-icon.png
│ ├── browserconfig.xml
│ ├── favicon-16x16.png
│ ├── favicon-32x32.png
│ ├── favicon.ico
│ ├── icon.png
│ ├── img
│ │ ├── icons
│ │ │ ├── baseline-add_circle_outline-24px.svg
│ │ │ ├── baseline-expand_less-24px.svg
│ │ │ ├── baseline-expand_more-24px.svg
│ │ │ ├── baseline-remove_circle_outline-24px.svg
│ │ │ ├── ic_arrow_back_white.svg
│ │ │ ├── ic_close_24px.svg
│ │ │ ├── ic_delete_black.svg
│ │ │ ├── ic_info_outline_black_24px.svg
│ │ │ ├── ic_link_black_24px.svg
│ │ │ ├── ic_menu_white.svg
│ │ │ ├── ic_search_black_24px.svg
│ │ │ ├── ic_shop_two_black_24px.svg
│ │ │ └── outline-file_copy-24px.svg
│ │ └── logo-text.svg
│ ├── index.html
│ ├── manifest.json
│ ├── mstile-150x150.png
│ ├── safari-pinned-tab.svg
│ ├── script
│ │ ├── angular_material
│ │ │ └── 1.2.1
│ │ │ │ └── angular-material.min.js
│ │ ├── angularjs
│ │ │ └── 1.8.0
│ │ │ │ ├── angular-animate.min.js
│ │ │ │ ├── angular-animate.min.js.map
│ │ │ │ ├── angular-aria.min.js
│ │ │ │ ├── angular-aria.min.js.map
│ │ │ │ ├── angular-messages.min.js
│ │ │ │ ├── angular-messages.min.js.map
│ │ │ │ ├── angular.min.js
│ │ │ │ └── angular.min.js.map
│ │ ├── bootstrap.js
│ │ └── funcstore.js
│ ├── style
│ │ ├── angular_material
│ │ │ └── 1.1.0
│ │ │ │ └── angular-material.min.css
│ │ └── bootstrap.css
│ └── templates
│ │ ├── funcstore.html
│ │ └── newfunction.html
├── go.mod
├── go.sum
├── handlers
│ ├── alerthandler.go
│ ├── alerthandler_test.go
│ ├── callid_middleware.go
│ ├── cors.go
│ ├── cors_test.go
│ ├── forwarding_proxy.go
│ ├── forwarding_proxy_test.go
│ ├── healthhandler.go
│ ├── infohandler.go
│ ├── logs.go
│ ├── logs_test.go
│ ├── namespaces_test.go
│ ├── notifier_handler.go
│ ├── notifier_wrapper_test.go
│ ├── notifiers.go
│ ├── notifiers_test.go
│ ├── queue_proxy.go
│ ├── queue_proxy_test.go
│ └── scaling.go
├── main.go
├── metrics
│ ├── add_metrics.go
│ ├── add_metrics_test.go
│ ├── exporter.go
│ ├── exporter_test.go
│ ├── metadata_query.go
│ ├── metrics.go
│ └── prometheus_query.go
├── pkg
│ └── middleware
│ │ ├── baseurlresolver_test.go
│ │ ├── basic_auth_injector.go
│ │ ├── basic_auth_injector_test.go
│ │ ├── function_prefix_trimming_url_path_transformer_test.go
│ │ ├── resolver.go
│ │ ├── service_name.go
│ │ ├── serviceauthinjector.go
│ │ └── transparent_url_path_transformer_test.go
├── plugin
│ ├── external.go
│ └── external_test.go
├── requests
│ ├── forward_request.go
│ ├── forward_request_test.go
│ ├── prometheus.go
│ └── prometheus_test.go
├── scaling
│ ├── function_cache.go
│ ├── function_cache_test.go
│ ├── function_meta.go
│ ├── function_query.go
│ ├── function_scaler.go
│ ├── ranges.go
│ ├── scaling_config.go
│ ├── service_query.go
│ └── single.go
├── types
│ ├── handler_set.go
│ ├── inforequest.go
│ ├── proxy_client.go
│ ├── readconfig.go
│ ├── readconfig_test.go
│ ├── retry.go
│ └── retry_test.go
├── vendor
│ ├── github.com
│ │ ├── beorn7
│ │ │ └── perks
│ │ │ │ ├── LICENSE
│ │ │ │ └── quantile
│ │ │ │ ├── exampledata.txt
│ │ │ │ └── stream.go
│ │ ├── cespare
│ │ │ └── xxhash
│ │ │ │ └── v2
│ │ │ │ ├── LICENSE.txt
│ │ │ │ ├── README.md
│ │ │ │ ├── testall.sh
│ │ │ │ ├── xxhash.go
│ │ │ │ ├── xxhash_amd64.s
│ │ │ │ ├── xxhash_arm64.s
│ │ │ │ ├── xxhash_asm.go
│ │ │ │ ├── xxhash_other.go
│ │ │ │ ├── xxhash_safe.go
│ │ │ │ └── xxhash_unsafe.go
│ │ ├── docker
│ │ │ └── distribution
│ │ │ │ ├── LICENSE
│ │ │ │ └── uuid
│ │ │ │ └── uuid.go
│ │ ├── gogo
│ │ │ └── protobuf
│ │ │ │ ├── AUTHORS
│ │ │ │ ├── CONTRIBUTORS
│ │ │ │ ├── LICENSE
│ │ │ │ ├── gogoproto
│ │ │ │ ├── Makefile
│ │ │ │ ├── doc.go
│ │ │ │ ├── gogo.pb.go
│ │ │ │ ├── gogo.pb.golden
│ │ │ │ ├── gogo.proto
│ │ │ │ └── helper.go
│ │ │ │ ├── proto
│ │ │ │ ├── Makefile
│ │ │ │ ├── clone.go
│ │ │ │ ├── custom_gogo.go
│ │ │ │ ├── decode.go
│ │ │ │ ├── deprecated.go
│ │ │ │ ├── discard.go
│ │ │ │ ├── duration.go
│ │ │ │ ├── duration_gogo.go
│ │ │ │ ├── encode.go
│ │ │ │ ├── encode_gogo.go
│ │ │ │ ├── equal.go
│ │ │ │ ├── extensions.go
│ │ │ │ ├── extensions_gogo.go
│ │ │ │ ├── lib.go
│ │ │ │ ├── lib_gogo.go
│ │ │ │ ├── message_set.go
│ │ │ │ ├── pointer_reflect.go
│ │ │ │ ├── pointer_reflect_gogo.go
│ │ │ │ ├── pointer_unsafe.go
│ │ │ │ ├── pointer_unsafe_gogo.go
│ │ │ │ ├── properties.go
│ │ │ │ ├── properties_gogo.go
│ │ │ │ ├── skip_gogo.go
│ │ │ │ ├── table_marshal.go
│ │ │ │ ├── table_marshal_gogo.go
│ │ │ │ ├── table_merge.go
│ │ │ │ ├── table_unmarshal.go
│ │ │ │ ├── table_unmarshal_gogo.go
│ │ │ │ ├── text.go
│ │ │ │ ├── text_gogo.go
│ │ │ │ ├── text_parser.go
│ │ │ │ ├── timestamp.go
│ │ │ │ ├── timestamp_gogo.go
│ │ │ │ ├── wrappers.go
│ │ │ │ └── wrappers_gogo.go
│ │ │ │ └── protoc-gen-gogo
│ │ │ │ └── descriptor
│ │ │ │ ├── Makefile
│ │ │ │ ├── descriptor.go
│ │ │ │ ├── descriptor.pb.go
│ │ │ │ ├── descriptor_gostring.gen.go
│ │ │ │ └── helper.go
│ │ ├── gorilla
│ │ │ └── mux
│ │ │ │ ├── .gitignore
│ │ │ │ ├── LICENSE
│ │ │ │ ├── Makefile
│ │ │ │ ├── README.md
│ │ │ │ ├── doc.go
│ │ │ │ ├── middleware.go
│ │ │ │ ├── mux.go
│ │ │ │ ├── regexp.go
│ │ │ │ ├── route.go
│ │ │ │ └── test_helpers.go
│ │ ├── klauspost
│ │ │ └── compress
│ │ │ │ ├── .gitattributes
│ │ │ │ ├── .gitignore
│ │ │ │ ├── .goreleaser.yml
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── SECURITY.md
│ │ │ │ ├── compressible.go
│ │ │ │ ├── flate
│ │ │ │ ├── deflate.go
│ │ │ │ ├── dict_decoder.go
│ │ │ │ ├── fast_encoder.go
│ │ │ │ ├── huffman_bit_writer.go
│ │ │ │ ├── huffman_code.go
│ │ │ │ ├── huffman_sortByFreq.go
│ │ │ │ ├── huffman_sortByLiteral.go
│ │ │ │ ├── inflate.go
│ │ │ │ ├── inflate_gen.go
│ │ │ │ ├── level1.go
│ │ │ │ ├── level2.go
│ │ │ │ ├── level3.go
│ │ │ │ ├── level4.go
│ │ │ │ ├── level5.go
│ │ │ │ ├── level6.go
│ │ │ │ ├── matchlen_amd64.go
│ │ │ │ ├── matchlen_amd64.s
│ │ │ │ ├── matchlen_generic.go
│ │ │ │ ├── regmask_amd64.go
│ │ │ │ ├── regmask_other.go
│ │ │ │ ├── stateless.go
│ │ │ │ └── token.go
│ │ │ │ ├── fse
│ │ │ │ ├── README.md
│ │ │ │ ├── bitreader.go
│ │ │ │ ├── bitwriter.go
│ │ │ │ ├── bytereader.go
│ │ │ │ ├── compress.go
│ │ │ │ ├── decompress.go
│ │ │ │ └── fse.go
│ │ │ │ ├── gen.sh
│ │ │ │ ├── huff0
│ │ │ │ ├── .gitignore
│ │ │ │ ├── README.md
│ │ │ │ ├── bitreader.go
│ │ │ │ ├── bitwriter.go
│ │ │ │ ├── compress.go
│ │ │ │ ├── decompress.go
│ │ │ │ ├── decompress_amd64.go
│ │ │ │ ├── decompress_amd64.s
│ │ │ │ ├── decompress_generic.go
│ │ │ │ └── huff0.go
│ │ │ │ ├── internal
│ │ │ │ ├── cpuinfo
│ │ │ │ │ ├── cpuinfo.go
│ │ │ │ │ ├── cpuinfo_amd64.go
│ │ │ │ │ └── cpuinfo_amd64.s
│ │ │ │ └── snapref
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── decode.go
│ │ │ │ │ ├── decode_other.go
│ │ │ │ │ ├── encode.go
│ │ │ │ │ ├── encode_other.go
│ │ │ │ │ └── snappy.go
│ │ │ │ ├── s2sx.mod
│ │ │ │ ├── s2sx.sum
│ │ │ │ └── zstd
│ │ │ │ ├── README.md
│ │ │ │ ├── bitreader.go
│ │ │ │ ├── bitwriter.go
│ │ │ │ ├── blockdec.go
│ │ │ │ ├── blockenc.go
│ │ │ │ ├── blocktype_string.go
│ │ │ │ ├── bytebuf.go
│ │ │ │ ├── bytereader.go
│ │ │ │ ├── decodeheader.go
│ │ │ │ ├── decoder.go
│ │ │ │ ├── decoder_options.go
│ │ │ │ ├── dict.go
│ │ │ │ ├── enc_base.go
│ │ │ │ ├── enc_best.go
│ │ │ │ ├── enc_better.go
│ │ │ │ ├── enc_dfast.go
│ │ │ │ ├── enc_fast.go
│ │ │ │ ├── encoder.go
│ │ │ │ ├── encoder_options.go
│ │ │ │ ├── framedec.go
│ │ │ │ ├── frameenc.go
│ │ │ │ ├── fse_decoder.go
│ │ │ │ ├── fse_decoder_amd64.go
│ │ │ │ ├── fse_decoder_amd64.s
│ │ │ │ ├── fse_decoder_generic.go
│ │ │ │ ├── fse_encoder.go
│ │ │ │ ├── fse_predefined.go
│ │ │ │ ├── hash.go
│ │ │ │ ├── history.go
│ │ │ │ ├── internal
│ │ │ │ └── xxhash
│ │ │ │ │ ├── LICENSE.txt
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── xxhash.go
│ │ │ │ │ ├── xxhash_amd64.s
│ │ │ │ │ ├── xxhash_arm64.s
│ │ │ │ │ ├── xxhash_asm.go
│ │ │ │ │ ├── xxhash_other.go
│ │ │ │ │ └── xxhash_safe.go
│ │ │ │ ├── matchlen_amd64.go
│ │ │ │ ├── matchlen_amd64.s
│ │ │ │ ├── matchlen_generic.go
│ │ │ │ ├── seqdec.go
│ │ │ │ ├── seqdec_amd64.go
│ │ │ │ ├── seqdec_amd64.s
│ │ │ │ ├── seqdec_generic.go
│ │ │ │ ├── seqenc.go
│ │ │ │ ├── snappy.go
│ │ │ │ ├── zip.go
│ │ │ │ └── zstd.go
│ │ ├── munnerz
│ │ │ └── goautoneg
│ │ │ │ ├── LICENSE
│ │ │ │ ├── Makefile
│ │ │ │ ├── README.txt
│ │ │ │ └── autoneg.go
│ │ ├── nats-io
│ │ │ ├── nats.go
│ │ │ │ ├── .gitignore
│ │ │ │ ├── .golangci.yaml
│ │ │ │ ├── .travis.yml
│ │ │ │ ├── .words
│ │ │ │ ├── .words.readme
│ │ │ │ ├── CODE-OF-CONDUCT.md
│ │ │ │ ├── CONTRIBUTING.md
│ │ │ │ ├── GOVERNANCE.md
│ │ │ │ ├── LICENSE
│ │ │ │ ├── MAINTAINERS.md
│ │ │ │ ├── README.md
│ │ │ │ ├── context.go
│ │ │ │ ├── dependencies.md
│ │ │ │ ├── enc.go
│ │ │ │ ├── encoders
│ │ │ │ │ └── builtin
│ │ │ │ │ │ ├── default_enc.go
│ │ │ │ │ │ ├── gob_enc.go
│ │ │ │ │ │ └── json_enc.go
│ │ │ │ ├── go_test.mod
│ │ │ │ ├── go_test.sum
│ │ │ │ ├── internal
│ │ │ │ │ └── parser
│ │ │ │ │ │ └── parse.go
│ │ │ │ ├── js.go
│ │ │ │ ├── jserrors.go
│ │ │ │ ├── jsm.go
│ │ │ │ ├── kv.go
│ │ │ │ ├── legacy_jetstream.md
│ │ │ │ ├── nats.go
│ │ │ │ ├── netchan.go
│ │ │ │ ├── object.go
│ │ │ │ ├── parser.go
│ │ │ │ ├── rand.go
│ │ │ │ ├── testing_internal.go
│ │ │ │ ├── timer.go
│ │ │ │ ├── util
│ │ │ │ │ ├── tls.go
│ │ │ │ │ └── tls_go17.go
│ │ │ │ └── ws.go
│ │ │ ├── nkeys
│ │ │ │ ├── .gitignore
│ │ │ │ ├── .goreleaser.yml
│ │ │ │ ├── GOVERNANCE.md
│ │ │ │ ├── LICENSE
│ │ │ │ ├── MAINTAINERS.md
│ │ │ │ ├── README.md
│ │ │ │ ├── TODO.md
│ │ │ │ ├── crc16.go
│ │ │ │ ├── creds_utils.go
│ │ │ │ ├── dependencies.md
│ │ │ │ ├── errors.go
│ │ │ │ ├── keypair.go
│ │ │ │ ├── nkeys.go
│ │ │ │ ├── public.go
│ │ │ │ ├── strkey.go
│ │ │ │ └── xkeys.go
│ │ │ ├── nuid
│ │ │ │ ├── .gitignore
│ │ │ │ ├── .travis.yml
│ │ │ │ ├── GOVERNANCE.md
│ │ │ │ ├── LICENSE
│ │ │ │ ├── MAINTAINERS.md
│ │ │ │ ├── README.md
│ │ │ │ └── nuid.go
│ │ │ └── stan.go
│ │ │ │ ├── .gitignore
│ │ │ │ ├── .travis.yml
│ │ │ │ ├── CODE-OF-CONDUCT.md
│ │ │ │ ├── GOVERNANCE.md
│ │ │ │ ├── LICENSE
│ │ │ │ ├── MAINTAINERS.md
│ │ │ │ ├── README.md
│ │ │ │ ├── dependencies.md
│ │ │ │ ├── go_tests.mod
│ │ │ │ ├── go_tests.sum
│ │ │ │ ├── pb
│ │ │ │ ├── protocol.pb.go
│ │ │ │ └── protocol.proto
│ │ │ │ ├── stan.go
│ │ │ │ └── sub.go
│ │ ├── openfaas
│ │ │ ├── faas-provider
│ │ │ │ ├── LICENSE
│ │ │ │ ├── auth
│ │ │ │ │ ├── basic_auth.go
│ │ │ │ │ └── credentials.go
│ │ │ │ ├── httputil
│ │ │ │ │ ├── write_interceptor.go
│ │ │ │ │ └── writers.go
│ │ │ │ └── types
│ │ │ │ │ ├── config.go
│ │ │ │ │ ├── function_deployment.go
│ │ │ │ │ ├── function_status.go
│ │ │ │ │ ├── queue.go
│ │ │ │ │ ├── read_config.go
│ │ │ │ │ ├── requests.go
│ │ │ │ │ ├── secret.go
│ │ │ │ │ └── system_events.go
│ │ │ └── nats-queue-worker
│ │ │ │ ├── LICENSE
│ │ │ │ ├── handler
│ │ │ │ ├── handler.go
│ │ │ │ ├── nats_config.go
│ │ │ │ └── nats_queue.go
│ │ │ │ └── nats
│ │ │ │ └── client.go
│ │ └── prometheus
│ │ │ ├── client_golang
│ │ │ ├── LICENSE
│ │ │ ├── NOTICE
│ │ │ ├── internal
│ │ │ │ └── github.com
│ │ │ │ │ └── golang
│ │ │ │ │ └── gddo
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ └── httputil
│ │ │ │ │ ├── header
│ │ │ │ │ └── header.go
│ │ │ │ │ └── negotiate.go
│ │ │ └── prometheus
│ │ │ │ ├── .gitignore
│ │ │ │ ├── README.md
│ │ │ │ ├── build_info_collector.go
│ │ │ │ ├── collector.go
│ │ │ │ ├── counter.go
│ │ │ │ ├── desc.go
│ │ │ │ ├── doc.go
│ │ │ │ ├── expvar_collector.go
│ │ │ │ ├── fnv.go
│ │ │ │ ├── gauge.go
│ │ │ │ ├── get_pid.go
│ │ │ │ ├── get_pid_gopherjs.go
│ │ │ │ ├── go_collector.go
│ │ │ │ ├── go_collector_go116.go
│ │ │ │ ├── go_collector_latest.go
│ │ │ │ ├── histogram.go
│ │ │ │ ├── internal
│ │ │ │ ├── almost_equal.go
│ │ │ │ ├── difflib.go
│ │ │ │ ├── go_collector_options.go
│ │ │ │ ├── go_runtime_metrics.go
│ │ │ │ └── metric.go
│ │ │ │ ├── labels.go
│ │ │ │ ├── metric.go
│ │ │ │ ├── num_threads.go
│ │ │ │ ├── num_threads_gopherjs.go
│ │ │ │ ├── observer.go
│ │ │ │ ├── process_collector.go
│ │ │ │ ├── process_collector_js.go
│ │ │ │ ├── process_collector_other.go
│ │ │ │ ├── process_collector_wasip1.go
│ │ │ │ ├── process_collector_windows.go
│ │ │ │ ├── promhttp
│ │ │ │ ├── delegator.go
│ │ │ │ ├── http.go
│ │ │ │ ├── instrument_client.go
│ │ │ │ ├── instrument_server.go
│ │ │ │ └── option.go
│ │ │ │ ├── registry.go
│ │ │ │ ├── summary.go
│ │ │ │ ├── timer.go
│ │ │ │ ├── untyped.go
│ │ │ │ ├── value.go
│ │ │ │ ├── vec.go
│ │ │ │ ├── vnext.go
│ │ │ │ └── wrap.go
│ │ │ ├── client_model
│ │ │ ├── LICENSE
│ │ │ ├── NOTICE
│ │ │ └── go
│ │ │ │ └── metrics.pb.go
│ │ │ ├── common
│ │ │ ├── LICENSE
│ │ │ ├── NOTICE
│ │ │ ├── expfmt
│ │ │ │ ├── decode.go
│ │ │ │ ├── encode.go
│ │ │ │ ├── expfmt.go
│ │ │ │ ├── fuzz.go
│ │ │ │ ├── openmetrics_create.go
│ │ │ │ ├── text_create.go
│ │ │ │ └── text_parse.go
│ │ │ └── model
│ │ │ │ ├── alert.go
│ │ │ │ ├── fingerprinting.go
│ │ │ │ ├── fnv.go
│ │ │ │ ├── labels.go
│ │ │ │ ├── labelset.go
│ │ │ │ ├── labelset_string.go
│ │ │ │ ├── metadata.go
│ │ │ │ ├── metric.go
│ │ │ │ ├── model.go
│ │ │ │ ├── signature.go
│ │ │ │ ├── silence.go
│ │ │ │ ├── time.go
│ │ │ │ ├── value.go
│ │ │ │ ├── value_float.go
│ │ │ │ ├── value_histogram.go
│ │ │ │ └── value_type.go
│ │ │ └── procfs
│ │ │ ├── .gitignore
│ │ │ ├── .golangci.yml
│ │ │ ├── CODE_OF_CONDUCT.md
│ │ │ ├── CONTRIBUTING.md
│ │ │ ├── LICENSE
│ │ │ ├── MAINTAINERS.md
│ │ │ ├── Makefile
│ │ │ ├── Makefile.common
│ │ │ ├── NOTICE
│ │ │ ├── README.md
│ │ │ ├── SECURITY.md
│ │ │ ├── arp.go
│ │ │ ├── buddyinfo.go
│ │ │ ├── cmdline.go
│ │ │ ├── cpuinfo.go
│ │ │ ├── cpuinfo_armx.go
│ │ │ ├── cpuinfo_loong64.go
│ │ │ ├── cpuinfo_mipsx.go
│ │ │ ├── cpuinfo_others.go
│ │ │ ├── cpuinfo_ppcx.go
│ │ │ ├── cpuinfo_riscvx.go
│ │ │ ├── cpuinfo_s390x.go
│ │ │ ├── cpuinfo_x86.go
│ │ │ ├── crypto.go
│ │ │ ├── doc.go
│ │ │ ├── fs.go
│ │ │ ├── fs_statfs_notype.go
│ │ │ ├── fs_statfs_type.go
│ │ │ ├── fscache.go
│ │ │ ├── internal
│ │ │ ├── fs
│ │ │ │ └── fs.go
│ │ │ └── util
│ │ │ │ ├── parse.go
│ │ │ │ ├── readfile.go
│ │ │ │ ├── sysreadfile.go
│ │ │ │ ├── sysreadfile_compat.go
│ │ │ │ └── valueparser.go
│ │ │ ├── ipvs.go
│ │ │ ├── kernel_random.go
│ │ │ ├── loadavg.go
│ │ │ ├── mdstat.go
│ │ │ ├── meminfo.go
│ │ │ ├── mountinfo.go
│ │ │ ├── mountstats.go
│ │ │ ├── net_conntrackstat.go
│ │ │ ├── net_dev.go
│ │ │ ├── net_ip_socket.go
│ │ │ ├── net_protocols.go
│ │ │ ├── net_route.go
│ │ │ ├── net_sockstat.go
│ │ │ ├── net_softnet.go
│ │ │ ├── net_tcp.go
│ │ │ ├── net_tls_stat.go
│ │ │ ├── net_udp.go
│ │ │ ├── net_unix.go
│ │ │ ├── net_wireless.go
│ │ │ ├── net_xfrm.go
│ │ │ ├── netstat.go
│ │ │ ├── proc.go
│ │ │ ├── proc_cgroup.go
│ │ │ ├── proc_cgroups.go
│ │ │ ├── proc_environ.go
│ │ │ ├── proc_fdinfo.go
│ │ │ ├── proc_interrupts.go
│ │ │ ├── proc_io.go
│ │ │ ├── proc_limits.go
│ │ │ ├── proc_maps.go
│ │ │ ├── proc_netstat.go
│ │ │ ├── proc_ns.go
│ │ │ ├── proc_psi.go
│ │ │ ├── proc_smaps.go
│ │ │ ├── proc_snmp.go
│ │ │ ├── proc_snmp6.go
│ │ │ ├── proc_stat.go
│ │ │ ├── proc_status.go
│ │ │ ├── proc_sys.go
│ │ │ ├── schedstat.go
│ │ │ ├── slab.go
│ │ │ ├── softirqs.go
│ │ │ ├── stat.go
│ │ │ ├── swaps.go
│ │ │ ├── thread.go
│ │ │ ├── ttar
│ │ │ ├── vm.go
│ │ │ └── zoneinfo.go
│ ├── go.uber.org
│ │ └── goleak
│ │ │ ├── .gitignore
│ │ │ ├── .golangci.yml
│ │ │ ├── CHANGELOG.md
│ │ │ ├── LICENSE
│ │ │ ├── Makefile
│ │ │ ├── README.md
│ │ │ ├── doc.go
│ │ │ ├── internal
│ │ │ └── stack
│ │ │ │ ├── doc.go
│ │ │ │ ├── scan.go
│ │ │ │ └── stacks.go
│ │ │ ├── leaks.go
│ │ │ ├── options.go
│ │ │ ├── testmain.go
│ │ │ └── tracestack_new.go
│ ├── golang.org
│ │ └── x
│ │ │ ├── crypto
│ │ │ ├── LICENSE
│ │ │ ├── PATENTS
│ │ │ ├── blake2b
│ │ │ │ ├── blake2b.go
│ │ │ │ ├── blake2bAVX2_amd64.go
│ │ │ │ ├── blake2bAVX2_amd64.s
│ │ │ │ ├── blake2b_amd64.s
│ │ │ │ ├── blake2b_generic.go
│ │ │ │ ├── blake2b_ref.go
│ │ │ │ ├── blake2x.go
│ │ │ │ └── register.go
│ │ │ ├── curve25519
│ │ │ │ └── curve25519.go
│ │ │ ├── internal
│ │ │ │ ├── alias
│ │ │ │ │ ├── alias.go
│ │ │ │ │ └── alias_purego.go
│ │ │ │ └── poly1305
│ │ │ │ │ ├── mac_noasm.go
│ │ │ │ │ ├── poly1305.go
│ │ │ │ │ ├── sum_amd64.go
│ │ │ │ │ ├── sum_amd64.s
│ │ │ │ │ ├── sum_generic.go
│ │ │ │ │ ├── sum_ppc64x.go
│ │ │ │ │ ├── sum_ppc64x.s
│ │ │ │ │ ├── sum_s390x.go
│ │ │ │ │ └── sum_s390x.s
│ │ │ ├── nacl
│ │ │ │ ├── box
│ │ │ │ │ └── box.go
│ │ │ │ └── secretbox
│ │ │ │ │ └── secretbox.go
│ │ │ └── salsa20
│ │ │ │ └── salsa
│ │ │ │ ├── hsalsa20.go
│ │ │ │ ├── salsa208.go
│ │ │ │ ├── salsa20_amd64.go
│ │ │ │ ├── salsa20_amd64.s
│ │ │ │ ├── salsa20_noasm.go
│ │ │ │ └── salsa20_ref.go
│ │ │ ├── sync
│ │ │ ├── LICENSE
│ │ │ ├── PATENTS
│ │ │ └── singleflight
│ │ │ │ └── singleflight.go
│ │ │ └── sys
│ │ │ ├── LICENSE
│ │ │ ├── PATENTS
│ │ │ ├── cpu
│ │ │ ├── asm_aix_ppc64.s
│ │ │ ├── asm_darwin_x86_gc.s
│ │ │ ├── byteorder.go
│ │ │ ├── cpu.go
│ │ │ ├── cpu_aix.go
│ │ │ ├── cpu_arm.go
│ │ │ ├── cpu_arm64.go
│ │ │ ├── cpu_arm64.s
│ │ │ ├── cpu_darwin_x86.go
│ │ │ ├── cpu_gc_arm64.go
│ │ │ ├── cpu_gc_s390x.go
│ │ │ ├── cpu_gc_x86.go
│ │ │ ├── cpu_gc_x86.s
│ │ │ ├── cpu_gccgo_arm64.go
│ │ │ ├── cpu_gccgo_s390x.go
│ │ │ ├── cpu_gccgo_x86.c
│ │ │ ├── cpu_gccgo_x86.go
│ │ │ ├── cpu_linux.go
│ │ │ ├── cpu_linux_arm.go
│ │ │ ├── cpu_linux_arm64.go
│ │ │ ├── cpu_linux_mips64x.go
│ │ │ ├── cpu_linux_noinit.go
│ │ │ ├── cpu_linux_ppc64x.go
│ │ │ ├── cpu_linux_riscv64.go
│ │ │ ├── cpu_linux_s390x.go
│ │ │ ├── cpu_loong64.go
│ │ │ ├── cpu_mips64x.go
│ │ │ ├── cpu_mipsx.go
│ │ │ ├── cpu_netbsd_arm64.go
│ │ │ ├── cpu_openbsd_arm64.go
│ │ │ ├── cpu_openbsd_arm64.s
│ │ │ ├── cpu_other_arm.go
│ │ │ ├── cpu_other_arm64.go
│ │ │ ├── cpu_other_mips64x.go
│ │ │ ├── cpu_other_ppc64x.go
│ │ │ ├── cpu_other_riscv64.go
│ │ │ ├── cpu_other_x86.go
│ │ │ ├── cpu_ppc64x.go
│ │ │ ├── cpu_riscv64.go
│ │ │ ├── cpu_s390x.go
│ │ │ ├── cpu_s390x.s
│ │ │ ├── cpu_wasm.go
│ │ │ ├── cpu_x86.go
│ │ │ ├── cpu_zos.go
│ │ │ ├── cpu_zos_s390x.go
│ │ │ ├── endian_big.go
│ │ │ ├── endian_little.go
│ │ │ ├── hwcap_linux.go
│ │ │ ├── parse.go
│ │ │ ├── proc_cpuinfo_linux.go
│ │ │ ├── runtime_auxv.go
│ │ │ ├── runtime_auxv_go121.go
│ │ │ ├── syscall_aix_gccgo.go
│ │ │ ├── syscall_aix_ppc64_gc.go
│ │ │ └── syscall_darwin_x86_gc.go
│ │ │ ├── unix
│ │ │ ├── .gitignore
│ │ │ ├── README.md
│ │ │ ├── affinity_linux.go
│ │ │ ├── aliases.go
│ │ │ ├── asm_aix_ppc64.s
│ │ │ ├── asm_bsd_386.s
│ │ │ ├── asm_bsd_amd64.s
│ │ │ ├── asm_bsd_arm.s
│ │ │ ├── asm_bsd_arm64.s
│ │ │ ├── asm_bsd_ppc64.s
│ │ │ ├── asm_bsd_riscv64.s
│ │ │ ├── asm_linux_386.s
│ │ │ ├── asm_linux_amd64.s
│ │ │ ├── asm_linux_arm.s
│ │ │ ├── asm_linux_arm64.s
│ │ │ ├── asm_linux_loong64.s
│ │ │ ├── asm_linux_mips64x.s
│ │ │ ├── asm_linux_mipsx.s
│ │ │ ├── asm_linux_ppc64x.s
│ │ │ ├── asm_linux_riscv64.s
│ │ │ ├── asm_linux_s390x.s
│ │ │ ├── asm_openbsd_mips64.s
│ │ │ ├── asm_solaris_amd64.s
│ │ │ ├── asm_zos_s390x.s
│ │ │ ├── bluetooth_linux.go
│ │ │ ├── bpxsvc_zos.go
│ │ │ ├── bpxsvc_zos.s
│ │ │ ├── cap_freebsd.go
│ │ │ ├── constants.go
│ │ │ ├── dev_aix_ppc.go
│ │ │ ├── dev_aix_ppc64.go
│ │ │ ├── dev_darwin.go
│ │ │ ├── dev_dragonfly.go
│ │ │ ├── dev_freebsd.go
│ │ │ ├── dev_linux.go
│ │ │ ├── dev_netbsd.go
│ │ │ ├── dev_openbsd.go
│ │ │ ├── dev_zos.go
│ │ │ ├── dirent.go
│ │ │ ├── endian_big.go
│ │ │ ├── endian_little.go
│ │ │ ├── env_unix.go
│ │ │ ├── fcntl.go
│ │ │ ├── fcntl_darwin.go
│ │ │ ├── fcntl_linux_32bit.go
│ │ │ ├── fdset.go
│ │ │ ├── gccgo.go
│ │ │ ├── gccgo_c.c
│ │ │ ├── gccgo_linux_amd64.go
│ │ │ ├── ifreq_linux.go
│ │ │ ├── ioctl_linux.go
│ │ │ ├── ioctl_signed.go
│ │ │ ├── ioctl_unsigned.go
│ │ │ ├── ioctl_zos.go
│ │ │ ├── mkall.sh
│ │ │ ├── mkerrors.sh
│ │ │ ├── mmap_nomremap.go
│ │ │ ├── mremap.go
│ │ │ ├── pagesize_unix.go
│ │ │ ├── pledge_openbsd.go
│ │ │ ├── ptrace_darwin.go
│ │ │ ├── ptrace_ios.go
│ │ │ ├── race.go
│ │ │ ├── race0.go
│ │ │ ├── readdirent_getdents.go
│ │ │ ├── readdirent_getdirentries.go
│ │ │ ├── sockcmsg_dragonfly.go
│ │ │ ├── sockcmsg_linux.go
│ │ │ ├── sockcmsg_unix.go
│ │ │ ├── sockcmsg_unix_other.go
│ │ │ ├── sockcmsg_zos.go
│ │ │ ├── symaddr_zos_s390x.s
│ │ │ ├── syscall.go
│ │ │ ├── syscall_aix.go
│ │ │ ├── syscall_aix_ppc.go
│ │ │ ├── syscall_aix_ppc64.go
│ │ │ ├── syscall_bsd.go
│ │ │ ├── syscall_darwin.go
│ │ │ ├── syscall_darwin_amd64.go
│ │ │ ├── syscall_darwin_arm64.go
│ │ │ ├── syscall_darwin_libSystem.go
│ │ │ ├── syscall_dragonfly.go
│ │ │ ├── syscall_dragonfly_amd64.go
│ │ │ ├── syscall_freebsd.go
│ │ │ ├── syscall_freebsd_386.go
│ │ │ ├── syscall_freebsd_amd64.go
│ │ │ ├── syscall_freebsd_arm.go
│ │ │ ├── syscall_freebsd_arm64.go
│ │ │ ├── syscall_freebsd_riscv64.go
│ │ │ ├── syscall_hurd.go
│ │ │ ├── syscall_hurd_386.go
│ │ │ ├── syscall_illumos.go
│ │ │ ├── syscall_linux.go
│ │ │ ├── syscall_linux_386.go
│ │ │ ├── syscall_linux_alarm.go
│ │ │ ├── syscall_linux_amd64.go
│ │ │ ├── syscall_linux_amd64_gc.go
│ │ │ ├── syscall_linux_arm.go
│ │ │ ├── syscall_linux_arm64.go
│ │ │ ├── syscall_linux_gc.go
│ │ │ ├── syscall_linux_gc_386.go
│ │ │ ├── syscall_linux_gc_arm.go
│ │ │ ├── syscall_linux_gccgo_386.go
│ │ │ ├── syscall_linux_gccgo_arm.go
│ │ │ ├── syscall_linux_loong64.go
│ │ │ ├── syscall_linux_mips64x.go
│ │ │ ├── syscall_linux_mipsx.go
│ │ │ ├── syscall_linux_ppc.go
│ │ │ ├── syscall_linux_ppc64x.go
│ │ │ ├── syscall_linux_riscv64.go
│ │ │ ├── syscall_linux_s390x.go
│ │ │ ├── syscall_linux_sparc64.go
│ │ │ ├── syscall_netbsd.go
│ │ │ ├── syscall_netbsd_386.go
│ │ │ ├── syscall_netbsd_amd64.go
│ │ │ ├── syscall_netbsd_arm.go
│ │ │ ├── syscall_netbsd_arm64.go
│ │ │ ├── syscall_openbsd.go
│ │ │ ├── syscall_openbsd_386.go
│ │ │ ├── syscall_openbsd_amd64.go
│ │ │ ├── syscall_openbsd_arm.go
│ │ │ ├── syscall_openbsd_arm64.go
│ │ │ ├── syscall_openbsd_libc.go
│ │ │ ├── syscall_openbsd_mips64.go
│ │ │ ├── syscall_openbsd_ppc64.go
│ │ │ ├── syscall_openbsd_riscv64.go
│ │ │ ├── syscall_solaris.go
│ │ │ ├── syscall_solaris_amd64.go
│ │ │ ├── syscall_unix.go
│ │ │ ├── syscall_unix_gc.go
│ │ │ ├── syscall_unix_gc_ppc64x.go
│ │ │ ├── syscall_zos_s390x.go
│ │ │ ├── sysvshm_linux.go
│ │ │ ├── sysvshm_unix.go
│ │ │ ├── sysvshm_unix_other.go
│ │ │ ├── timestruct.go
│ │ │ ├── unveil_openbsd.go
│ │ │ ├── vgetrandom_linux.go
│ │ │ ├── vgetrandom_unsupported.go
│ │ │ ├── xattr_bsd.go
│ │ │ ├── zerrors_aix_ppc.go
│ │ │ ├── zerrors_aix_ppc64.go
│ │ │ ├── zerrors_darwin_amd64.go
│ │ │ ├── zerrors_darwin_arm64.go
│ │ │ ├── zerrors_dragonfly_amd64.go
│ │ │ ├── zerrors_freebsd_386.go
│ │ │ ├── zerrors_freebsd_amd64.go
│ │ │ ├── zerrors_freebsd_arm.go
│ │ │ ├── zerrors_freebsd_arm64.go
│ │ │ ├── zerrors_freebsd_riscv64.go
│ │ │ ├── zerrors_linux.go
│ │ │ ├── zerrors_linux_386.go
│ │ │ ├── zerrors_linux_amd64.go
│ │ │ ├── zerrors_linux_arm.go
│ │ │ ├── zerrors_linux_arm64.go
│ │ │ ├── zerrors_linux_loong64.go
│ │ │ ├── zerrors_linux_mips.go
│ │ │ ├── zerrors_linux_mips64.go
│ │ │ ├── zerrors_linux_mips64le.go
│ │ │ ├── zerrors_linux_mipsle.go
│ │ │ ├── zerrors_linux_ppc.go
│ │ │ ├── zerrors_linux_ppc64.go
│ │ │ ├── zerrors_linux_ppc64le.go
│ │ │ ├── zerrors_linux_riscv64.go
│ │ │ ├── zerrors_linux_s390x.go
│ │ │ ├── zerrors_linux_sparc64.go
│ │ │ ├── zerrors_netbsd_386.go
│ │ │ ├── zerrors_netbsd_amd64.go
│ │ │ ├── zerrors_netbsd_arm.go
│ │ │ ├── zerrors_netbsd_arm64.go
│ │ │ ├── zerrors_openbsd_386.go
│ │ │ ├── zerrors_openbsd_amd64.go
│ │ │ ├── zerrors_openbsd_arm.go
│ │ │ ├── zerrors_openbsd_arm64.go
│ │ │ ├── zerrors_openbsd_mips64.go
│ │ │ ├── zerrors_openbsd_ppc64.go
│ │ │ ├── zerrors_openbsd_riscv64.go
│ │ │ ├── zerrors_solaris_amd64.go
│ │ │ ├── zerrors_zos_s390x.go
│ │ │ ├── zptrace_armnn_linux.go
│ │ │ ├── zptrace_linux_arm64.go
│ │ │ ├── zptrace_mipsnn_linux.go
│ │ │ ├── zptrace_mipsnnle_linux.go
│ │ │ ├── zptrace_x86_linux.go
│ │ │ ├── zsymaddr_zos_s390x.s
│ │ │ ├── zsyscall_aix_ppc.go
│ │ │ ├── zsyscall_aix_ppc64.go
│ │ │ ├── zsyscall_aix_ppc64_gc.go
│ │ │ ├── zsyscall_aix_ppc64_gccgo.go
│ │ │ ├── zsyscall_darwin_amd64.go
│ │ │ ├── zsyscall_darwin_amd64.s
│ │ │ ├── zsyscall_darwin_arm64.go
│ │ │ ├── zsyscall_darwin_arm64.s
│ │ │ ├── zsyscall_dragonfly_amd64.go
│ │ │ ├── zsyscall_freebsd_386.go
│ │ │ ├── zsyscall_freebsd_amd64.go
│ │ │ ├── zsyscall_freebsd_arm.go
│ │ │ ├── zsyscall_freebsd_arm64.go
│ │ │ ├── zsyscall_freebsd_riscv64.go
│ │ │ ├── zsyscall_illumos_amd64.go
│ │ │ ├── zsyscall_linux.go
│ │ │ ├── zsyscall_linux_386.go
│ │ │ ├── zsyscall_linux_amd64.go
│ │ │ ├── zsyscall_linux_arm.go
│ │ │ ├── zsyscall_linux_arm64.go
│ │ │ ├── zsyscall_linux_loong64.go
│ │ │ ├── zsyscall_linux_mips.go
│ │ │ ├── zsyscall_linux_mips64.go
│ │ │ ├── zsyscall_linux_mips64le.go
│ │ │ ├── zsyscall_linux_mipsle.go
│ │ │ ├── zsyscall_linux_ppc.go
│ │ │ ├── zsyscall_linux_ppc64.go
│ │ │ ├── zsyscall_linux_ppc64le.go
│ │ │ ├── zsyscall_linux_riscv64.go
│ │ │ ├── zsyscall_linux_s390x.go
│ │ │ ├── zsyscall_linux_sparc64.go
│ │ │ ├── zsyscall_netbsd_386.go
│ │ │ ├── zsyscall_netbsd_amd64.go
│ │ │ ├── zsyscall_netbsd_arm.go
│ │ │ ├── zsyscall_netbsd_arm64.go
│ │ │ ├── zsyscall_openbsd_386.go
│ │ │ ├── zsyscall_openbsd_386.s
│ │ │ ├── zsyscall_openbsd_amd64.go
│ │ │ ├── zsyscall_openbsd_amd64.s
│ │ │ ├── zsyscall_openbsd_arm.go
│ │ │ ├── zsyscall_openbsd_arm.s
│ │ │ ├── zsyscall_openbsd_arm64.go
│ │ │ ├── zsyscall_openbsd_arm64.s
│ │ │ ├── zsyscall_openbsd_mips64.go
│ │ │ ├── zsyscall_openbsd_mips64.s
│ │ │ ├── zsyscall_openbsd_ppc64.go
│ │ │ ├── zsyscall_openbsd_ppc64.s
│ │ │ ├── zsyscall_openbsd_riscv64.go
│ │ │ ├── zsyscall_openbsd_riscv64.s
│ │ │ ├── zsyscall_solaris_amd64.go
│ │ │ ├── zsyscall_zos_s390x.go
│ │ │ ├── zsysctl_openbsd_386.go
│ │ │ ├── zsysctl_openbsd_amd64.go
│ │ │ ├── zsysctl_openbsd_arm.go
│ │ │ ├── zsysctl_openbsd_arm64.go
│ │ │ ├── zsysctl_openbsd_mips64.go
│ │ │ ├── zsysctl_openbsd_ppc64.go
│ │ │ ├── zsysctl_openbsd_riscv64.go
│ │ │ ├── zsysnum_darwin_amd64.go
│ │ │ ├── zsysnum_darwin_arm64.go
│ │ │ ├── zsysnum_dragonfly_amd64.go
│ │ │ ├── zsysnum_freebsd_386.go
│ │ │ ├── zsysnum_freebsd_amd64.go
│ │ │ ├── zsysnum_freebsd_arm.go
│ │ │ ├── zsysnum_freebsd_arm64.go
│ │ │ ├── zsysnum_freebsd_riscv64.go
│ │ │ ├── zsysnum_linux_386.go
│ │ │ ├── zsysnum_linux_amd64.go
│ │ │ ├── zsysnum_linux_arm.go
│ │ │ ├── zsysnum_linux_arm64.go
│ │ │ ├── zsysnum_linux_loong64.go
│ │ │ ├── zsysnum_linux_mips.go
│ │ │ ├── zsysnum_linux_mips64.go
│ │ │ ├── zsysnum_linux_mips64le.go
│ │ │ ├── zsysnum_linux_mipsle.go
│ │ │ ├── zsysnum_linux_ppc.go
│ │ │ ├── zsysnum_linux_ppc64.go
│ │ │ ├── zsysnum_linux_ppc64le.go
│ │ │ ├── zsysnum_linux_riscv64.go
│ │ │ ├── zsysnum_linux_s390x.go
│ │ │ ├── zsysnum_linux_sparc64.go
│ │ │ ├── zsysnum_netbsd_386.go
│ │ │ ├── zsysnum_netbsd_amd64.go
│ │ │ ├── zsysnum_netbsd_arm.go
│ │ │ ├── zsysnum_netbsd_arm64.go
│ │ │ ├── zsysnum_openbsd_386.go
│ │ │ ├── zsysnum_openbsd_amd64.go
│ │ │ ├── zsysnum_openbsd_arm.go
│ │ │ ├── zsysnum_openbsd_arm64.go
│ │ │ ├── zsysnum_openbsd_mips64.go
│ │ │ ├── zsysnum_openbsd_ppc64.go
│ │ │ ├── zsysnum_openbsd_riscv64.go
│ │ │ ├── zsysnum_zos_s390x.go
│ │ │ ├── ztypes_aix_ppc.go
│ │ │ ├── ztypes_aix_ppc64.go
│ │ │ ├── ztypes_darwin_amd64.go
│ │ │ ├── ztypes_darwin_arm64.go
│ │ │ ├── ztypes_dragonfly_amd64.go
│ │ │ ├── ztypes_freebsd_386.go
│ │ │ ├── ztypes_freebsd_amd64.go
│ │ │ ├── ztypes_freebsd_arm.go
│ │ │ ├── ztypes_freebsd_arm64.go
│ │ │ ├── ztypes_freebsd_riscv64.go
│ │ │ ├── ztypes_linux.go
│ │ │ ├── ztypes_linux_386.go
│ │ │ ├── ztypes_linux_amd64.go
│ │ │ ├── ztypes_linux_arm.go
│ │ │ ├── ztypes_linux_arm64.go
│ │ │ ├── ztypes_linux_loong64.go
│ │ │ ├── ztypes_linux_mips.go
│ │ │ ├── ztypes_linux_mips64.go
│ │ │ ├── ztypes_linux_mips64le.go
│ │ │ ├── ztypes_linux_mipsle.go
│ │ │ ├── ztypes_linux_ppc.go
│ │ │ ├── ztypes_linux_ppc64.go
│ │ │ ├── ztypes_linux_ppc64le.go
│ │ │ ├── ztypes_linux_riscv64.go
│ │ │ ├── ztypes_linux_s390x.go
│ │ │ ├── ztypes_linux_sparc64.go
│ │ │ ├── ztypes_netbsd_386.go
│ │ │ ├── ztypes_netbsd_amd64.go
│ │ │ ├── ztypes_netbsd_arm.go
│ │ │ ├── ztypes_netbsd_arm64.go
│ │ │ ├── ztypes_openbsd_386.go
│ │ │ ├── ztypes_openbsd_amd64.go
│ │ │ ├── ztypes_openbsd_arm.go
│ │ │ ├── ztypes_openbsd_arm64.go
│ │ │ ├── ztypes_openbsd_mips64.go
│ │ │ ├── ztypes_openbsd_ppc64.go
│ │ │ ├── ztypes_openbsd_riscv64.go
│ │ │ ├── ztypes_solaris_amd64.go
│ │ │ └── ztypes_zos_s390x.go
│ │ │ └── windows
│ │ │ ├── aliases.go
│ │ │ ├── dll_windows.go
│ │ │ ├── env_windows.go
│ │ │ ├── eventlog.go
│ │ │ ├── exec_windows.go
│ │ │ ├── memory_windows.go
│ │ │ ├── mkerrors.bash
│ │ │ ├── mkknownfolderids.bash
│ │ │ ├── mksyscall.go
│ │ │ ├── race.go
│ │ │ ├── race0.go
│ │ │ ├── security_windows.go
│ │ │ ├── service.go
│ │ │ ├── setupapi_windows.go
│ │ │ ├── str.go
│ │ │ ├── syscall.go
│ │ │ ├── syscall_windows.go
│ │ │ ├── types_windows.go
│ │ │ ├── types_windows_386.go
│ │ │ ├── types_windows_amd64.go
│ │ │ ├── types_windows_arm.go
│ │ │ ├── types_windows_arm64.go
│ │ │ ├── zerrors_windows.go
│ │ │ ├── zknownfolderids_windows.go
│ │ │ └── zsyscall_windows.go
│ ├── google.golang.org
│ │ └── protobuf
│ │ │ ├── LICENSE
│ │ │ ├── PATENTS
│ │ │ ├── encoding
│ │ │ ├── protodelim
│ │ │ │ └── protodelim.go
│ │ │ ├── prototext
│ │ │ │ ├── decode.go
│ │ │ │ ├── doc.go
│ │ │ │ └── encode.go
│ │ │ └── protowire
│ │ │ │ └── wire.go
│ │ │ ├── internal
│ │ │ ├── descfmt
│ │ │ │ └── stringer.go
│ │ │ ├── descopts
│ │ │ │ └── options.go
│ │ │ ├── detrand
│ │ │ │ └── rand.go
│ │ │ ├── editiondefaults
│ │ │ │ ├── defaults.go
│ │ │ │ └── editions_defaults.binpb
│ │ │ ├── encoding
│ │ │ │ ├── defval
│ │ │ │ │ └── default.go
│ │ │ │ ├── messageset
│ │ │ │ │ └── messageset.go
│ │ │ │ ├── tag
│ │ │ │ │ └── tag.go
│ │ │ │ └── text
│ │ │ │ │ ├── decode.go
│ │ │ │ │ ├── decode_number.go
│ │ │ │ │ ├── decode_string.go
│ │ │ │ │ ├── decode_token.go
│ │ │ │ │ ├── doc.go
│ │ │ │ │ └── encode.go
│ │ │ ├── errors
│ │ │ │ ├── errors.go
│ │ │ │ ├── is_go112.go
│ │ │ │ └── is_go113.go
│ │ │ ├── filedesc
│ │ │ │ ├── build.go
│ │ │ │ ├── desc.go
│ │ │ │ ├── desc_init.go
│ │ │ │ ├── desc_lazy.go
│ │ │ │ ├── desc_list.go
│ │ │ │ ├── desc_list_gen.go
│ │ │ │ ├── editions.go
│ │ │ │ └── placeholder.go
│ │ │ ├── filetype
│ │ │ │ └── build.go
│ │ │ ├── flags
│ │ │ │ ├── flags.go
│ │ │ │ ├── proto_legacy_disable.go
│ │ │ │ └── proto_legacy_enable.go
│ │ │ ├── genid
│ │ │ │ ├── any_gen.go
│ │ │ │ ├── api_gen.go
│ │ │ │ ├── descriptor_gen.go
│ │ │ │ ├── doc.go
│ │ │ │ ├── duration_gen.go
│ │ │ │ ├── empty_gen.go
│ │ │ │ ├── field_mask_gen.go
│ │ │ │ ├── go_features_gen.go
│ │ │ │ ├── goname.go
│ │ │ │ ├── map_entry.go
│ │ │ │ ├── source_context_gen.go
│ │ │ │ ├── struct_gen.go
│ │ │ │ ├── timestamp_gen.go
│ │ │ │ ├── type_gen.go
│ │ │ │ ├── wrappers.go
│ │ │ │ └── wrappers_gen.go
│ │ │ ├── impl
│ │ │ │ ├── api_export.go
│ │ │ │ ├── checkinit.go
│ │ │ │ ├── codec_extension.go
│ │ │ │ ├── codec_field.go
│ │ │ │ ├── codec_gen.go
│ │ │ │ ├── codec_map.go
│ │ │ │ ├── codec_map_go111.go
│ │ │ │ ├── codec_map_go112.go
│ │ │ │ ├── codec_message.go
│ │ │ │ ├── codec_messageset.go
│ │ │ │ ├── codec_tables.go
│ │ │ │ ├── codec_unsafe.go
│ │ │ │ ├── convert.go
│ │ │ │ ├── convert_list.go
│ │ │ │ ├── convert_map.go
│ │ │ │ ├── decode.go
│ │ │ │ ├── encode.go
│ │ │ │ ├── enum.go
│ │ │ │ ├── equal.go
│ │ │ │ ├── extension.go
│ │ │ │ ├── legacy_enum.go
│ │ │ │ ├── legacy_export.go
│ │ │ │ ├── legacy_extension.go
│ │ │ │ ├── legacy_file.go
│ │ │ │ ├── legacy_message.go
│ │ │ │ ├── merge.go
│ │ │ │ ├── merge_gen.go
│ │ │ │ ├── message.go
│ │ │ │ ├── message_reflect.go
│ │ │ │ ├── message_reflect_field.go
│ │ │ │ ├── message_reflect_gen.go
│ │ │ │ ├── pointer_unsafe.go
│ │ │ │ ├── validate.go
│ │ │ │ └── weak.go
│ │ │ ├── order
│ │ │ │ ├── order.go
│ │ │ │ └── range.go
│ │ │ ├── pragma
│ │ │ │ └── pragma.go
│ │ │ ├── set
│ │ │ │ └── ints.go
│ │ │ ├── strs
│ │ │ │ ├── strings.go
│ │ │ │ ├── strings_unsafe_go120.go
│ │ │ │ └── strings_unsafe_go121.go
│ │ │ └── version
│ │ │ │ └── version.go
│ │ │ ├── proto
│ │ │ ├── checkinit.go
│ │ │ ├── decode.go
│ │ │ ├── decode_gen.go
│ │ │ ├── doc.go
│ │ │ ├── encode.go
│ │ │ ├── encode_gen.go
│ │ │ ├── equal.go
│ │ │ ├── extension.go
│ │ │ ├── merge.go
│ │ │ ├── messageset.go
│ │ │ ├── proto.go
│ │ │ ├── proto_methods.go
│ │ │ ├── proto_reflect.go
│ │ │ ├── reset.go
│ │ │ ├── size.go
│ │ │ ├── size_gen.go
│ │ │ └── wrappers.go
│ │ │ ├── reflect
│ │ │ ├── protoreflect
│ │ │ │ ├── methods.go
│ │ │ │ ├── proto.go
│ │ │ │ ├── source.go
│ │ │ │ ├── source_gen.go
│ │ │ │ ├── type.go
│ │ │ │ ├── value.go
│ │ │ │ ├── value_equal.go
│ │ │ │ ├── value_union.go
│ │ │ │ ├── value_unsafe_go120.go
│ │ │ │ └── value_unsafe_go121.go
│ │ │ └── protoregistry
│ │ │ │ └── registry.go
│ │ │ ├── runtime
│ │ │ ├── protoiface
│ │ │ │ ├── legacy.go
│ │ │ │ └── methods.go
│ │ │ └── protoimpl
│ │ │ │ ├── impl.go
│ │ │ │ └── version.go
│ │ │ └── types
│ │ │ └── known
│ │ │ └── timestamppb
│ │ │ └── timestamp.pb.go
│ └── modules.txt
└── version
│ └── version.go
├── go.mod
├── pro
└── EULA.md
└── sample-functions
├── .gitignore
└── README.md
/.DEREK.yml:
--------------------------------------------------------------------------------
1 | curators:
2 | - alexellis
3 | - LucasRoesler
4 | - viveksyngh
5 | - nitishkumar71
6 | - rgee0
7 | - welteki
8 |
9 | features:
10 | - dco_check
11 | - comments
12 | - pr_description_required
13 | - release_notes
14 |
15 | contributing_url: https://github.com/openfaas/faas/blob/master/CONTRIBUTING.md
16 |
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | @alexellis
2 | @welteki
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # For more options see: https://www.openfaas.com/support/
2 | github: [alexellis, openfaas]
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | **/node_modules/
2 | **/*.DS_Store
3 | .vscode
4 | .idea
5 | certifier
6 | .editorconfig
7 | /contrib/staging/
8 | **/*.sha256
9 | .vagrant
10 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | TAG?=latest
2 | NS?=openfaas
3 |
4 | .PHONY: build-gateway
5 | build-gateway:
6 | (cd gateway; docker buildx build --platform linux/amd64 -t ${NS}/gateway:latest-dev .)
7 |
8 |
9 | # generate Go models from the OpenAPI spec using https://github.com/contiamo/openapi-generator-go
10 | generate:
11 | rm gateway/models/model_*.go || true
12 | openapi-generator-go generate models -s api-docs/spec.openapi.yml -o gateway/models --package-name models
13 |
14 | # .PHONY: test-ci
15 | # test-ci:
16 | # ./contrib/ci.sh
17 |
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-cayman
2 |
3 |
--------------------------------------------------------------------------------
/api-docs/README.md:
--------------------------------------------------------------------------------
1 | ## Exploring or editing the Swagger API documentation
2 |
3 | The `spec.openapi.yml` file can be viewed and edited in the Swagger UI.
4 |
5 | * Head over to the [Swagger editor](http://editor.swagger.io/)
6 |
7 | * Now click File -> Import URL
8 |
9 | * Type in `https://raw.githubusercontent.com/openfaas/faas/master/api-docs/spec.openapi.yml` and click OK
10 |
11 | You can now view and edit the Swagger, copy back to your fork before pushing changes.
12 |
--------------------------------------------------------------------------------
/docs/CNAME:
--------------------------------------------------------------------------------
1 | docs.get-faas.com
--------------------------------------------------------------------------------
/docs/README.md:
--------------------------------------------------------------------------------
1 | ## OpenFaaS - Serverless Functions Made Simple for Docker & Kubernetes
2 |
3 | 
4 |
5 | Please see the [official documentation site](https://docs.openfaas.com) or our [more detailed set of workshops on GitHub](https://github.com/openfaas/workshop#openfaas-workshop)
6 |
--------------------------------------------------------------------------------
/docs/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-cayman
--------------------------------------------------------------------------------
/docs/inception.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openfaas/faas/7803ea1861f2a22adcbcfa8c79ed539bc6506d5b/docs/inception.png
--------------------------------------------------------------------------------
/docs/of-layer-overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openfaas/faas/7803ea1861f2a22adcbcfa8c79ed539bc6506d5b/docs/of-layer-overview.png
--------------------------------------------------------------------------------
/docs/of-overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openfaas/faas/7803ea1861f2a22adcbcfa8c79ed539bc6506d5b/docs/of-overview.png
--------------------------------------------------------------------------------
/docs/of-workflow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openfaas/faas/7803ea1861f2a22adcbcfa8c79ed539bc6506d5b/docs/of-workflow.png
--------------------------------------------------------------------------------
/gateway/.gitignore:
--------------------------------------------------------------------------------
1 | gateway
2 | sample.txt
3 |
--------------------------------------------------------------------------------
/gateway/Makefile:
--------------------------------------------------------------------------------
1 | export DOCKER_CLI_EXPERIMENTAL=enabled
2 |
3 | PLATFORM?="linux/amd64,linux/arm/v7,linux/arm64"
4 |
5 | TAG?=dev
6 | SERVER?=ttl.sh
7 | OWNER?=openfaas
8 | NAME=gateway
9 |
10 | .PHONY: buildx-local
11 | buildx-local:
12 | @echo $(SERVER)/$(OWNER)/$(NAME):$(TAG) \
13 | && docker buildx create --use --name=multiarch --node multiarch \
14 | && docker buildx build \
15 | --progress=plain \
16 | --platform linux/amd64 \
17 | --output "type=docker,push=false" \
18 | --tag $(SERVER)/$(OWNER)/$(NAME):$(TAG) .
19 |
20 | .PHONY: buildx-push
21 | buildx-push:
22 | @echo $(SERVER)/$(OWNER)/$(NAME):$(TAG) \
23 | && docker buildx create --use --name=multiarch --node multiarch \
24 | && docker buildx build \
25 | --progress=plain \
26 | --platform linux/amd64 \
27 | --output "type=image,push=true" \
28 | --tag $(SERVER)/$(OWNER)/$(NAME):$(TAG) .
29 |
30 | .PHONY: buildx-push-all
31 | buildx-push-all:
32 | @echo $(SERVER)/$(OWNER)/$(NAME):$(TAG) \
33 | && docker buildx create --use --name=multiarch --node multiarch \
34 | && docker buildx build \
35 | --progress=plain \
36 | --platform $(PLATFORM) \
37 | --output "type=image,push=true" \
38 | --tag $(SERVER)/$(OWNER)/$(NAME):$(TAG) .
39 |
--------------------------------------------------------------------------------
/gateway/assets/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openfaas/faas/7803ea1861f2a22adcbcfa8c79ed539bc6506d5b/gateway/assets/android-chrome-192x192.png
--------------------------------------------------------------------------------
/gateway/assets/android-chrome-256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openfaas/faas/7803ea1861f2a22adcbcfa8c79ed539bc6506d5b/gateway/assets/android-chrome-256x256.png
--------------------------------------------------------------------------------
/gateway/assets/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openfaas/faas/7803ea1861f2a22adcbcfa8c79ed539bc6506d5b/gateway/assets/apple-touch-icon.png
--------------------------------------------------------------------------------
/gateway/assets/browserconfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | #da532c
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/gateway/assets/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openfaas/faas/7803ea1861f2a22adcbcfa8c79ed539bc6506d5b/gateway/assets/favicon-16x16.png
--------------------------------------------------------------------------------
/gateway/assets/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openfaas/faas/7803ea1861f2a22adcbcfa8c79ed539bc6506d5b/gateway/assets/favicon-32x32.png
--------------------------------------------------------------------------------
/gateway/assets/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openfaas/faas/7803ea1861f2a22adcbcfa8c79ed539bc6506d5b/gateway/assets/favicon.ico
--------------------------------------------------------------------------------
/gateway/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openfaas/faas/7803ea1861f2a22adcbcfa8c79ed539bc6506d5b/gateway/assets/icon.png
--------------------------------------------------------------------------------
/gateway/assets/img/icons/baseline-add_circle_outline-24px.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/gateway/assets/img/icons/baseline-expand_less-24px.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/gateway/assets/img/icons/baseline-expand_more-24px.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/gateway/assets/img/icons/baseline-remove_circle_outline-24px.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/gateway/assets/img/icons/ic_arrow_back_white.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/gateway/assets/img/icons/ic_close_24px.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/gateway/assets/img/icons/ic_delete_black.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/gateway/assets/img/icons/ic_info_outline_black_24px.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/gateway/assets/img/icons/ic_link_black_24px.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/gateway/assets/img/icons/ic_menu_white.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/gateway/assets/img/icons/ic_search_black_24px.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/gateway/assets/img/icons/ic_shop_two_black_24px.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/gateway/assets/img/icons/outline-file_copy-24px.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
19 |
--------------------------------------------------------------------------------
/gateway/assets/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "",
3 | "icons": [
4 | {
5 | "src": "android-chrome-192x192.png",
6 | "sizes": "192x192",
7 | "type": "image/png"
8 | },
9 | {
10 | "src": "android-chrome-256x256.png",
11 | "sizes": "256x256",
12 | "type": "image/png"
13 | }
14 | ],
15 | "theme_color": "#ffffff",
16 | "background_color": "#ffffff",
17 | "display": "standalone"
18 | }
--------------------------------------------------------------------------------
/gateway/assets/mstile-150x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openfaas/faas/7803ea1861f2a22adcbcfa8c79ed539bc6506d5b/gateway/assets/mstile-150x150.png
--------------------------------------------------------------------------------
/gateway/handlers/callid_middleware.go:
--------------------------------------------------------------------------------
1 | // License: OpenFaaS Community Edition (CE) EULA
2 | // Copyright (c) 2017,2019-2024 OpenFaaS Author(s)
3 |
4 | // Copyright (c) OpenFaaS Author(s). All rights reserved.
5 |
6 | package handlers
7 |
8 | import (
9 | "fmt"
10 | "net/http"
11 | "time"
12 |
13 | "github.com/docker/distribution/uuid"
14 | "github.com/openfaas/faas/gateway/version"
15 | )
16 |
17 | // MakeCallIDMiddleware middleware tags a request with a uid
18 | func MakeCallIDMiddleware(next http.HandlerFunc) http.HandlerFunc {
19 |
20 | version := version.Version
21 |
22 | return func(w http.ResponseWriter, r *http.Request) {
23 | start := time.Now()
24 | if len(r.Header.Get("X-Call-Id")) == 0 {
25 | callID := uuid.Generate().String()
26 | r.Header.Add("X-Call-Id", callID)
27 | w.Header().Add("X-Call-Id", callID)
28 | }
29 |
30 | r.Header.Add("X-Start-Time", fmt.Sprintf("%d", start.UTC().UnixNano()))
31 | w.Header().Add("X-Start-Time", fmt.Sprintf("%d", start.UTC().UnixNano()))
32 |
33 | w.Header().Add("X-Served-By", fmt.Sprintf("openfaas-ce/%s", version))
34 |
35 | next(w, r)
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/gateway/handlers/cors.go:
--------------------------------------------------------------------------------
1 | // License: OpenFaaS Community Edition (CE) EULA
2 | // Copyright (c) 2017,2019-2024 OpenFaaS Author(s)
3 |
4 | // Copyright (c) OpenFaaS Author(s). All rights reserved.
5 |
6 | package handlers
7 |
8 | import "net/http"
9 |
10 | // CORSHandler set custom CORS instructions for the store.
11 | type CORSHandler struct {
12 | Upstream *http.Handler
13 | AllowedHost string
14 | }
15 |
16 | func (c CORSHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
17 | // https://raw.githubusercontent.com/openfaas/store/master/store.json
18 | w.Header().Set("Access-Control-Allow-Headers", "Content-Type")
19 | w.Header().Set("Access-Control-Allow-Methods", http.MethodGet)
20 | w.Header().Set("Access-Control-Allow-Origin", c.AllowedHost)
21 |
22 | (*c.Upstream).ServeHTTP(w, r)
23 | }
24 |
25 | // DecorateWithCORS decorate a handler with CORS-injecting middleware
26 | func DecorateWithCORS(upstream http.Handler, allowedHost string) http.Handler {
27 | return CORSHandler{
28 | Upstream: &upstream,
29 | AllowedHost: allowedHost,
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/gateway/handlers/cors_test.go:
--------------------------------------------------------------------------------
1 | // License: OpenFaaS Community Edition (CE) EULA
2 | // Copyright (c) 2017,2019-2024 OpenFaaS Author(s)
3 |
4 | // Copyright (c) OpenFaaS Author(s). All rights reserved.
5 |
6 | package handlers
7 |
8 | import (
9 | "net/http"
10 | "net/http/httptest"
11 | "testing"
12 | )
13 |
14 | type customHandler struct {
15 | }
16 |
17 | func (h customHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
18 | }
19 |
20 | func Test_HeadersAdded(t *testing.T) {
21 | rr := httptest.NewRecorder()
22 | handler := customHandler{}
23 | host := "store.openfaas.com"
24 |
25 | decorated := DecorateWithCORS(handler, host)
26 | request, _ := http.NewRequest(http.MethodGet, "/", nil)
27 | decorated.ServeHTTP(rr, request)
28 |
29 | actual := rr.Header().Get("Access-Control-Allow-Origin")
30 | if actual != host {
31 | t.Errorf("Access-Control-Allow-Origin: want: %s got: %s", host, actual)
32 | }
33 |
34 | actualMethods := rr.Header().Get("Access-Control-Allow-Methods")
35 | if actualMethods != http.MethodGet {
36 | t.Errorf("Access-Control-Allow-Methods: want: %s got: %s", http.MethodGet, actualMethods)
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/gateway/handlers/healthhandler.go:
--------------------------------------------------------------------------------
1 | // License: OpenFaaS Community Edition (CE) EULA
2 | // Copyright (c) 2017,2019-2024 OpenFaaS Author(s)
3 |
4 | // Copyright (c) OpenFaaS Author(s) 2019. All rights reserved.
5 |
6 | package handlers
7 |
8 | import "net/http"
9 |
10 | // HealthzHandler healthz hanlder for mertics server
11 | func HealthzHandler(w http.ResponseWriter, r *http.Request) {
12 |
13 | switch r.Method {
14 | case http.MethodGet:
15 | w.WriteHeader(http.StatusOK)
16 | w.Write([]byte("OK"))
17 | break
18 |
19 | default:
20 | w.WriteHeader(http.StatusMethodNotAllowed)
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/gateway/handlers/notifier_handler.go:
--------------------------------------------------------------------------------
1 | // License: OpenFaaS Community Edition (CE) EULA
2 | // Copyright (c) 2017,2019-2024 OpenFaaS Author(s)
3 |
4 | // License: OpenFaaS Community Edition (CE) EULA
5 | // Copyright (c) 2017,2019-2024 OpenFaaS Author(s)
6 |
7 | // Copyright (c) OpenFaaS Author(s) 2018. All rights reserved.
8 |
9 | package handlers
10 |
11 | import (
12 | "net/http"
13 | "time"
14 |
15 | "github.com/openfaas/faas-provider/httputil"
16 | )
17 |
18 | // MakeNotifierWrapper wraps a http.HandlerFunc in an interceptor to pass to HTTPNotifier
19 | func MakeNotifierWrapper(next http.HandlerFunc, notifiers []HTTPNotifier) http.HandlerFunc {
20 | return func(w http.ResponseWriter, r *http.Request) {
21 | then := time.Now()
22 | url := r.URL.String()
23 |
24 | writer := httputil.NewHttpWriteInterceptor(w)
25 | next(writer, r)
26 |
27 | for _, notifier := range notifiers {
28 | notifier.Notify(r.Method, url, url, writer.Status(), "completed", time.Since(then))
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/gateway/handlers/notifiers_test.go:
--------------------------------------------------------------------------------
1 | package handlers
2 |
3 | import "testing"
4 |
5 | func Test_urlToLabel_normalizeTrailing(t *testing.T) {
6 | have := "/system/functions/"
7 | want := "/system/functions"
8 | got := urlToLabel(have)
9 |
10 | if got != want {
11 | t.Errorf("want %s, got %s", want, got)
12 | }
13 | }
14 |
15 | func Test_urlToLabel_retainRoot(t *testing.T) {
16 | have := "/"
17 | want := have
18 | got := urlToLabel(have)
19 |
20 | if got != want {
21 | t.Errorf("want %s, got %s", want, got)
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/gateway/metrics/metadata_query.go:
--------------------------------------------------------------------------------
1 | package metrics
2 |
3 | import "github.com/openfaas/faas-provider/auth"
4 |
5 | type MetadataQuery struct {
6 | Credentials *auth.BasicAuthCredentials
7 | }
8 |
9 | func NewMetadataQuery(credentials *auth.BasicAuthCredentials) *MetadataQuery {
10 | return &MetadataQuery{Credentials: credentials}
11 | }
12 |
--------------------------------------------------------------------------------
/gateway/pkg/middleware/basic_auth_injector.go:
--------------------------------------------------------------------------------
1 | // License: OpenFaaS Community Edition (CE) EULA
2 | // Copyright (c) 2017,2019-2024 OpenFaaS Author(s)
3 |
4 | // Copyright (c) OpenFaaS Author(s). All rights reserved.
5 |
6 | package middleware
7 |
8 | import (
9 | "net/http"
10 |
11 | "github.com/openfaas/faas-provider/auth"
12 | )
13 |
14 | type BasicAuthInjector struct {
15 | Credentials *auth.BasicAuthCredentials
16 | }
17 |
18 | func (b BasicAuthInjector) Inject(r *http.Request) {
19 | if r != nil && b.Credentials != nil {
20 | r.SetBasicAuth(b.Credentials.User, b.Credentials.Password)
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/gateway/pkg/middleware/basic_auth_injector_test.go:
--------------------------------------------------------------------------------
1 | // License: OpenFaaS Community Edition (CE) EULA
2 | // Copyright (c) 2017,2019-2024 OpenFaaS Author(s)
3 |
4 | // Copyright (c) OpenFaaS Author(s). All rights reserved.
5 |
6 | package middleware
7 |
8 | import (
9 | "net/http"
10 | "net/http/httptest"
11 | "testing"
12 | )
13 |
14 | func Test_Inject_WithNilRequestAndNilCredentials(t *testing.T) {
15 | injector := BasicAuthInjector{}
16 | injector.Inject(nil)
17 | }
18 |
19 | func Test_Inject_WithRequestButNilCredentials(t *testing.T) {
20 | injector := BasicAuthInjector{}
21 | req := httptest.NewRequest(http.MethodGet, "/", nil)
22 | injector.Inject(req)
23 | }
24 |
--------------------------------------------------------------------------------
/gateway/pkg/middleware/service_name.go:
--------------------------------------------------------------------------------
1 | package middleware
2 |
3 | import "strings"
4 |
5 | func GetNamespace(defaultNamespace, fullName string) (string, string) {
6 | if index := strings.LastIndex(fullName, "."); index > -1 {
7 | return fullName[:index], fullName[index+1:]
8 | }
9 | return fullName, defaultNamespace
10 | }
11 |
--------------------------------------------------------------------------------
/gateway/pkg/middleware/serviceauthinjector.go:
--------------------------------------------------------------------------------
1 | package middleware
2 |
3 | import "net/http"
4 |
5 | // AuthInjector is an interface for injecting authentication information into a request
6 | // which will be proxied or made to a remote/upstream service.
7 | type AuthInjector interface {
8 | Inject(r *http.Request)
9 | }
10 |
--------------------------------------------------------------------------------
/gateway/pkg/middleware/transparent_url_path_transformer_test.go:
--------------------------------------------------------------------------------
1 | // License: OpenFaaS Community Edition (CE) EULA
2 | // Copyright (c) 2017,2019-2024 OpenFaaS Author(s)
3 |
4 | // Copyright (c) OpenFaaS Author(s). All rights reserved.
5 |
6 | package middleware
7 |
8 | import (
9 | "net/http"
10 | "testing"
11 | )
12 |
13 | func Test_Transform_DoesntTransformRootPath(t *testing.T) {
14 |
15 | req, _ := http.NewRequest(http.MethodGet, "/", nil)
16 | transformer := TransparentURLPathTransformer{}
17 | want := req.URL.Path
18 | got := transformer.Transform(req)
19 |
20 | if want != got {
21 | t.Errorf("want: %s, got: %s", want, got)
22 | }
23 | }
24 |
25 | func Test_Transform_DoesntTransformAdditionalPath(t *testing.T) {
26 |
27 | req, _ := http.NewRequest(http.MethodGet, "/employees/", nil)
28 | transformer := TransparentURLPathTransformer{}
29 | want := req.URL.Path
30 | got := transformer.Transform(req)
31 |
32 | if want != got {
33 | t.Errorf("want: %s, got: %s", want, got)
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/gateway/requests/forward_request.go:
--------------------------------------------------------------------------------
1 | package requests
2 |
3 | import "fmt"
4 | import "net/url"
5 |
6 | // ForwardRequest for proxying incoming requests
7 | type ForwardRequest struct {
8 | RawPath string
9 | RawQuery string
10 | Method string
11 | }
12 |
13 | // NewForwardRequest create a ForwardRequest
14 | func NewForwardRequest(method string, url url.URL) ForwardRequest {
15 | return ForwardRequest{
16 | Method: method,
17 | RawQuery: url.RawQuery,
18 | RawPath: url.Path,
19 | }
20 | }
21 |
22 | // ToURL create formatted URL
23 | func (f *ForwardRequest) ToURL(addr string, watchdogPort int) string {
24 | if len(f.RawQuery) > 0 {
25 | return fmt.Sprintf("http://%s:%d%s?%s", addr, watchdogPort, f.RawPath, f.RawQuery)
26 | }
27 | return fmt.Sprintf("http://%s:%d%s", addr, watchdogPort, f.RawPath)
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/gateway/requests/prometheus.go:
--------------------------------------------------------------------------------
1 | // License: OpenFaaS Community Edition (CE) EULA
2 | // Copyright (c) 2017,2019-2024 OpenFaaS Author(s)
3 |
4 | // Copyright (c) Alex Ellis 2017. All rights reserved.
5 |
6 | package requests
7 |
8 | // PrometheusInnerAlertLabel PrometheusInnerAlertLabel
9 | type PrometheusInnerAlertLabel struct {
10 | AlertName string `json:"alertname"`
11 | FunctionName string `json:"function_name"`
12 | }
13 |
14 | // PrometheusInnerAlert PrometheusInnerAlert
15 | type PrometheusInnerAlert struct {
16 | Status string `json:"status"`
17 | Labels PrometheusInnerAlertLabel `json:"labels"`
18 | }
19 |
20 | // PrometheusAlert as produced by AlertManager
21 | type PrometheusAlert struct {
22 | Status string `json:"status"`
23 | Receiver string `json:"receiver"`
24 | Alerts []PrometheusInnerAlert `json:"alerts"`
25 | }
26 |
--------------------------------------------------------------------------------
/gateway/scaling/function_meta.go:
--------------------------------------------------------------------------------
1 | // License: OpenFaaS Community Edition (CE) EULA
2 | // Copyright (c) 2017,2019-2024 OpenFaaS Author(s)
3 |
4 | // Copyright (c) OpenFaaS Author(s). All rights reserved.
5 |
6 | package scaling
7 |
8 | import (
9 | "time"
10 | )
11 |
12 | // FunctionMeta holds the last refresh and any other
13 | // meta-data needed for caching.
14 | type FunctionMeta struct {
15 | LastRefresh time.Time
16 | ServiceQueryResponse ServiceQueryResponse
17 | }
18 |
19 | // Expired find out whether the cache item has expired with
20 | // the given expiry duration from when it was stored.
21 | func (fm *FunctionMeta) Expired(expiry time.Duration) bool {
22 | return time.Now().After(fm.LastRefresh.Add(expiry))
23 | }
24 |
--------------------------------------------------------------------------------
/gateway/scaling/scaling_config.go:
--------------------------------------------------------------------------------
1 | package scaling
2 |
3 | import (
4 | "time"
5 | )
6 |
7 | // ScalingConfig for scaling behaviours
8 | type ScalingConfig struct {
9 | // MaxPollCount attempts to query a function before giving up
10 | MaxPollCount uint
11 |
12 | // FunctionPollInterval delay or interval between polling a function's
13 | // readiness status
14 | FunctionPollInterval time.Duration
15 |
16 | // CacheExpiry life-time for a cache entry before considering invalid
17 | CacheExpiry time.Duration
18 |
19 | // ServiceQuery queries available/ready replicas for function
20 | ServiceQuery ServiceQuery
21 |
22 | // SetScaleRetries is the number of times to try scaling a function before
23 | // giving up due to errors
24 | SetScaleRetries uint
25 | }
26 |
--------------------------------------------------------------------------------
/gateway/scaling/service_query.go:
--------------------------------------------------------------------------------
1 | // License: OpenFaaS Community Edition (CE) EULA
2 | // Copyright (c) 2017,2019-2024 OpenFaaS Author(s)
3 |
4 | // Copyright (c) OpenFaaS Author(s). All rights reserved.
5 |
6 | package scaling
7 |
8 | // ServiceQuery provides interface for replica querying/setting
9 | type ServiceQuery interface {
10 | GetReplicas(service, namespace string) (response ServiceQueryResponse, err error)
11 | SetReplicas(service, namespace string, count uint64) error
12 | }
13 |
14 | // ServiceQueryResponse response from querying a function status
15 | type ServiceQueryResponse struct {
16 | Replicas uint64
17 | MaxReplicas uint64
18 | MinReplicas uint64
19 | ScalingFactor uint64
20 | AvailableReplicas uint64
21 | Annotations *map[string]string
22 | }
23 |
--------------------------------------------------------------------------------
/gateway/types/inforequest.go:
--------------------------------------------------------------------------------
1 | package types
2 |
3 | import providerTypes "github.com/openfaas/faas-provider/types"
4 |
5 | // Platform architecture the gateway is running on
6 | var Arch string
7 |
8 | // GatewayInfo provides information about the gateway and it's connected components
9 | type GatewayInfo struct {
10 | Provider *providerTypes.ProviderInfo `json:"provider"`
11 | Version *providerTypes.VersionInfo `json:"version"`
12 | Arch string `json:"arch"`
13 | }
14 |
--------------------------------------------------------------------------------
/gateway/types/retry.go:
--------------------------------------------------------------------------------
1 | package types
2 |
3 | import (
4 | "log"
5 | "time"
6 | )
7 |
8 | type routine func(attempt int) error
9 |
10 | func Retry(r routine, label string, attempts int, interval time.Duration) error {
11 | var err error
12 |
13 | for i := 0; i < attempts; i++ {
14 | res := r(i)
15 | if res != nil {
16 | err = res
17 | log.Printf("[%s]: %d/%d, error: %s\n", label, i, attempts, res)
18 | } else {
19 | err = nil
20 | break
21 | }
22 | time.Sleep(interval)
23 | }
24 | return err
25 | }
26 |
--------------------------------------------------------------------------------
/gateway/types/retry_test.go:
--------------------------------------------------------------------------------
1 | package types
2 |
3 | import (
4 | "fmt"
5 | "testing"
6 | "time"
7 | )
8 |
9 | func Test_retry_early_success(t *testing.T) {
10 | called := 0
11 | maxRetries := 10
12 | routine := func(i int) error {
13 |
14 | called++
15 | if called == 5 {
16 | return nil
17 | }
18 | return fmt.Errorf("not called 5 times yet")
19 | }
20 |
21 | Retry(routine, "test", maxRetries, time.Millisecond*5)
22 |
23 | want := 5
24 | if called != want {
25 | t.Errorf("want: %d, got: %d", want, called)
26 | }
27 | }
28 |
29 | func Test_retry_until_max_attempts(t *testing.T) {
30 | called := 0
31 | maxRetries := 10
32 | routine := func(i int) error {
33 | called++
34 | return fmt.Errorf("unable to pass condition for routine")
35 | }
36 |
37 | Retry(routine, "test", maxRetries, time.Millisecond*5)
38 |
39 | want := maxRetries
40 | if called != want {
41 | t.Errorf("want: %d, got: %d", want, called)
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/beorn7/perks/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (C) 2013 Blake Mizerany
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | "Software"), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/cespare/xxhash/v2/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2016 Caleb Spare
2 |
3 | MIT License
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining
6 | a copy of this software and associated documentation files (the
7 | "Software"), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be
14 | included in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/cespare/xxhash/v2/testall.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -eu -o pipefail
3 |
4 | # Small convenience script for running the tests with various combinations of
5 | # arch/tags. This assumes we're running on amd64 and have qemu available.
6 |
7 | go test ./...
8 | go test -tags purego ./...
9 | GOARCH=arm64 go test
10 | GOARCH=arm64 go test -tags purego
11 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/cespare/xxhash/v2/xxhash_asm.go:
--------------------------------------------------------------------------------
1 | //go:build (amd64 || arm64) && !appengine && gc && !purego
2 | // +build amd64 arm64
3 | // +build !appengine
4 | // +build gc
5 | // +build !purego
6 |
7 | package xxhash
8 |
9 | // Sum64 computes the 64-bit xxHash digest of b with a zero seed.
10 | //
11 | //go:noescape
12 | func Sum64(b []byte) uint64
13 |
14 | //go:noescape
15 | func writeBlocks(d *Digest, b []byte) int
16 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go:
--------------------------------------------------------------------------------
1 | //go:build appengine
2 | // +build appengine
3 |
4 | // This file contains the safe implementations of otherwise unsafe-using code.
5 |
6 | package xxhash
7 |
8 | // Sum64String computes the 64-bit xxHash digest of s with a zero seed.
9 | func Sum64String(s string) uint64 {
10 | return Sum64([]byte(s))
11 | }
12 |
13 | // WriteString adds more data to d. It always returns len(s), nil.
14 | func (d *Digest) WriteString(s string) (n int, err error) {
15 | return d.Write([]byte(s))
16 | }
17 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/gogo/protobuf/AUTHORS:
--------------------------------------------------------------------------------
1 | # This is the official list of GoGo authors for copyright purposes.
2 | # This file is distinct from the CONTRIBUTORS file, which
3 | # lists people. For example, employees are listed in CONTRIBUTORS,
4 | # but not in AUTHORS, because the employer holds the copyright.
5 |
6 | # Names should be added to this file as one of
7 | # Organization's name
8 | # Individual's name
9 | # Individual's name
10 |
11 | # Please keep the list sorted.
12 |
13 | Sendgrid, Inc
14 | Vastech SA (PTY) LTD
15 | Walter Schulze
16 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/gogo/protobuf/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | Anton Povarov
2 | Brian Goff
3 | Clayton Coleman
4 | Denis Smirnov
5 | DongYun Kang
6 | Dwayne Schultz
7 | Georg Apitz
8 | Gustav Paul
9 | Johan Brandhorst
10 | John Shahid
11 | John Tuley
12 | Laurent
13 | Patrick Lee
14 | Peter Edge
15 | Roger Johansson
16 | Sam Nguyen
17 | Sergio Arbeo
18 | Stephen J Day
19 | Tamir Duberstein
20 | Todd Eisenberger
21 | Tormod Erevik Lea
22 | Vyacheslav Kim
23 | Walter Schulze
24 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/gorilla/mux/.gitignore:
--------------------------------------------------------------------------------
1 | coverage.coverprofile
2 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/gorilla/mux/Makefile:
--------------------------------------------------------------------------------
1 | GO_LINT=$(shell which golangci-lint 2> /dev/null || echo '')
2 | GO_LINT_URI=github.com/golangci/golangci-lint/cmd/golangci-lint@latest
3 |
4 | GO_SEC=$(shell which gosec 2> /dev/null || echo '')
5 | GO_SEC_URI=github.com/securego/gosec/v2/cmd/gosec@latest
6 |
7 | GO_VULNCHECK=$(shell which govulncheck 2> /dev/null || echo '')
8 | GO_VULNCHECK_URI=golang.org/x/vuln/cmd/govulncheck@latest
9 |
10 | .PHONY: golangci-lint
11 | golangci-lint:
12 | $(if $(GO_LINT), ,go install $(GO_LINT_URI))
13 | @echo "##### Running golangci-lint"
14 | golangci-lint run -v
15 |
16 | .PHONY: gosec
17 | gosec:
18 | $(if $(GO_SEC), ,go install $(GO_SEC_URI))
19 | @echo "##### Running gosec"
20 | gosec ./...
21 |
22 | .PHONY: govulncheck
23 | govulncheck:
24 | $(if $(GO_VULNCHECK), ,go install $(GO_VULNCHECK_URI))
25 | @echo "##### Running govulncheck"
26 | govulncheck ./...
27 |
28 | .PHONY: verify
29 | verify: golangci-lint gosec govulncheck
30 |
31 | .PHONY: test
32 | test:
33 | @echo "##### Running tests"
34 | go test -race -cover -coverprofile=coverage.coverprofile -covermode=atomic -v ./...
--------------------------------------------------------------------------------
/gateway/vendor/github.com/gorilla/mux/test_helpers.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Gorilla Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package mux
6 |
7 | import "net/http"
8 |
9 | // SetURLVars sets the URL variables for the given request, to be accessed via
10 | // mux.Vars for testing route behaviour. Arguments are not modified, a shallow
11 | // copy is returned.
12 | //
13 | // This API should only be used for testing purposes; it provides a way to
14 | // inject variables into the request context. Alternatively, URL variables
15 | // can be set by making a route that captures the required variables,
16 | // starting a server and sending the request to that server.
17 | func SetURLVars(r *http.Request, val map[string]string) *http.Request {
18 | return requestWithVars(r, val)
19 | }
20 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/klauspost/compress/.gitattributes:
--------------------------------------------------------------------------------
1 | * -text
2 | *.bin -text -diff
3 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/klauspost/compress/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 | *.test
24 | *.prof
25 | /s2/cmd/_s2sx/sfx-exe
26 |
27 | # Linux perf files
28 | perf.data
29 | perf.data.old
30 |
31 | # gdb history
32 | .gdb_history
33 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/klauspost/compress/flate/matchlen_amd64.go:
--------------------------------------------------------------------------------
1 | //go:build amd64 && !appengine && !noasm && gc
2 | // +build amd64,!appengine,!noasm,gc
3 |
4 | // Copyright 2019+ Klaus Post. All rights reserved.
5 | // License information can be found in the LICENSE file.
6 |
7 | package flate
8 |
9 | // matchLen returns how many bytes match in a and b
10 | //
11 | // It assumes that:
12 | //
13 | // len(a) <= len(b) and len(a) > 0
14 | //
15 | //go:noescape
16 | func matchLen(a []byte, b []byte) int
17 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/klauspost/compress/flate/matchlen_generic.go:
--------------------------------------------------------------------------------
1 | //go:build !amd64 || appengine || !gc || noasm
2 | // +build !amd64 appengine !gc noasm
3 |
4 | // Copyright 2019+ Klaus Post. All rights reserved.
5 | // License information can be found in the LICENSE file.
6 |
7 | package flate
8 |
9 | import (
10 | "encoding/binary"
11 | "math/bits"
12 | )
13 |
14 | // matchLen returns the maximum common prefix length of a and b.
15 | // a must be the shortest of the two.
16 | func matchLen(a, b []byte) (n int) {
17 | for ; len(a) >= 8 && len(b) >= 8; a, b = a[8:], b[8:] {
18 | diff := binary.LittleEndian.Uint64(a) ^ binary.LittleEndian.Uint64(b)
19 | if diff != 0 {
20 | return n + bits.TrailingZeros64(diff)>>3
21 | }
22 | n += 8
23 | }
24 |
25 | for i := range a {
26 | if a[i] != b[i] {
27 | break
28 | }
29 | n++
30 | }
31 | return n
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/klauspost/compress/gen.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | cd s2/cmd/_s2sx/ || exit 1
4 | go generate .
5 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/klauspost/compress/huff0/.gitignore:
--------------------------------------------------------------------------------
1 | /huff0-fuzz.zip
2 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo.go:
--------------------------------------------------------------------------------
1 | // Package cpuinfo gives runtime info about the current CPU.
2 | //
3 | // This is a very limited module meant for use internally
4 | // in this project. For more versatile solution check
5 | // https://github.com/klauspost/cpuid.
6 | package cpuinfo
7 |
8 | // HasBMI1 checks whether an x86 CPU supports the BMI1 extension.
9 | func HasBMI1() bool {
10 | return hasBMI1
11 | }
12 |
13 | // HasBMI2 checks whether an x86 CPU supports the BMI2 extension.
14 | func HasBMI2() bool {
15 | return hasBMI2
16 | }
17 |
18 | // DisableBMI2 will disable BMI2, for testing purposes.
19 | // Call returned function to restore previous state.
20 | func DisableBMI2() func() {
21 | old := hasBMI2
22 | hasBMI2 = false
23 | return func() {
24 | hasBMI2 = old
25 | }
26 | }
27 |
28 | // HasBMI checks whether an x86 CPU supports both BMI1 and BMI2 extensions.
29 | func HasBMI() bool {
30 | return HasBMI1() && HasBMI2()
31 | }
32 |
33 | var hasBMI1 bool
34 | var hasBMI2 bool
35 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo_amd64.go:
--------------------------------------------------------------------------------
1 | //go:build amd64 && !appengine && !noasm && gc
2 | // +build amd64,!appengine,!noasm,gc
3 |
4 | package cpuinfo
5 |
6 | // go:noescape
7 | func x86extensions() (bmi1, bmi2 bool)
8 |
9 | func init() {
10 | hasBMI1, hasBMI2 = x86extensions()
11 | }
12 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo_amd64.s:
--------------------------------------------------------------------------------
1 | // +build !appengine
2 | // +build gc
3 | // +build !noasm
4 |
5 | #include "textflag.h"
6 | #include "funcdata.h"
7 | #include "go_asm.h"
8 |
9 | TEXT ·x86extensions(SB), NOSPLIT, $0
10 | // 1. determine max EAX value
11 | XORQ AX, AX
12 | CPUID
13 |
14 | CMPQ AX, $7
15 | JB unsupported
16 |
17 | // 2. EAX = 7, ECX = 0 --- see Table 3-8 "Information Returned by CPUID Instruction"
18 | MOVQ $7, AX
19 | MOVQ $0, CX
20 | CPUID
21 |
22 | BTQ $3, BX // bit 3 = BMI1
23 | SETCS AL
24 |
25 | BTQ $8, BX // bit 8 = BMI2
26 | SETCS AH
27 |
28 | MOVB AL, bmi1+0(FP)
29 | MOVB AH, bmi2+1(FP)
30 | RET
31 |
32 | unsupported:
33 | XORQ AX, AX
34 | MOVB AL, bmi1+0(FP)
35 | MOVB AL, bmi2+1(FP)
36 | RET
37 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/klauspost/compress/s2sx.mod:
--------------------------------------------------------------------------------
1 | module github.com/klauspost/compress
2 |
3 | go 1.19
4 |
5 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/klauspost/compress/s2sx.sum:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openfaas/faas/7803ea1861f2a22adcbcfa8c79ed539bc6506d5b/gateway/vendor/github.com/klauspost/compress/s2sx.sum
--------------------------------------------------------------------------------
/gateway/vendor/github.com/klauspost/compress/zstd/internal/xxhash/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2016 Caleb Spare
2 |
3 | MIT License
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining
6 | a copy of this software and associated documentation files (the
7 | "Software"), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be
14 | included in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_asm.go:
--------------------------------------------------------------------------------
1 | //go:build (amd64 || arm64) && !appengine && gc && !purego && !noasm
2 | // +build amd64 arm64
3 | // +build !appengine
4 | // +build gc
5 | // +build !purego
6 | // +build !noasm
7 |
8 | package xxhash
9 |
10 | // Sum64 computes the 64-bit xxHash digest of b.
11 | //
12 | //go:noescape
13 | func Sum64(b []byte) uint64
14 |
15 | //go:noescape
16 | func writeBlocks(s *Digest, b []byte) int
17 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_safe.go:
--------------------------------------------------------------------------------
1 | package xxhash
2 |
3 | // Sum64String computes the 64-bit xxHash digest of s.
4 | func Sum64String(s string) uint64 {
5 | return Sum64([]byte(s))
6 | }
7 |
8 | // WriteString adds more data to d. It always returns len(s), nil.
9 | func (d *Digest) WriteString(s string) (n int, err error) {
10 | return d.Write([]byte(s))
11 | }
12 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/klauspost/compress/zstd/matchlen_amd64.go:
--------------------------------------------------------------------------------
1 | //go:build amd64 && !appengine && !noasm && gc
2 | // +build amd64,!appengine,!noasm,gc
3 |
4 | // Copyright 2019+ Klaus Post. All rights reserved.
5 | // License information can be found in the LICENSE file.
6 |
7 | package zstd
8 |
9 | // matchLen returns how many bytes match in a and b
10 | //
11 | // It assumes that:
12 | //
13 | // len(a) <= len(b) and len(a) > 0
14 | //
15 | //go:noescape
16 | func matchLen(a []byte, b []byte) int
17 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/klauspost/compress/zstd/matchlen_generic.go:
--------------------------------------------------------------------------------
1 | //go:build !amd64 || appengine || !gc || noasm
2 | // +build !amd64 appengine !gc noasm
3 |
4 | // Copyright 2019+ Klaus Post. All rights reserved.
5 | // License information can be found in the LICENSE file.
6 |
7 | package zstd
8 |
9 | import (
10 | "encoding/binary"
11 | "math/bits"
12 | )
13 |
14 | // matchLen returns the maximum common prefix length of a and b.
15 | // a must be the shortest of the two.
16 | func matchLen(a, b []byte) (n int) {
17 | for ; len(a) >= 8 && len(b) >= 8; a, b = a[8:], b[8:] {
18 | diff := binary.LittleEndian.Uint64(a) ^ binary.LittleEndian.Uint64(b)
19 | if diff != 0 {
20 | return n + bits.TrailingZeros64(diff)>>3
21 | }
22 | n += 8
23 | }
24 |
25 | for i := range a {
26 | if a[i] != b[i] {
27 | break
28 | }
29 | n++
30 | }
31 | return n
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/munnerz/goautoneg/Makefile:
--------------------------------------------------------------------------------
1 | include $(GOROOT)/src/Make.inc
2 |
3 | TARG=bitbucket.org/ww/goautoneg
4 | GOFILES=autoneg.go
5 |
6 | include $(GOROOT)/src/Make.pkg
7 |
8 | format:
9 | gofmt -w *.go
10 |
11 | docs:
12 | gomake clean
13 | godoc ${TARG} > README.txt
14 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/nats-io/nats.go/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 |
24 | # Emacs
25 | *~
26 | \#*\#
27 | .\#*
28 |
29 | # vi/vim
30 | .??*.swp
31 |
32 | # Mac
33 | .DS_Store
34 |
35 | # Eclipse
36 | .project
37 | .settings/
38 |
39 | # bin
40 |
41 | # Goland
42 | .idea
43 |
44 | # VS Code
45 | .vscode
--------------------------------------------------------------------------------
/gateway/vendor/github.com/nats-io/nats.go/.golangci.yaml:
--------------------------------------------------------------------------------
1 | issues:
2 | max-issues-per-linter: 0
3 | max-same-issues: 0
4 | exclude-rules:
5 | - linters:
6 | - errcheck
7 | text: "Unsubscribe"
8 | - linters:
9 | - errcheck
10 | text: "Drain"
11 | - linters:
12 | - errcheck
13 | text: "msg.Ack"
14 | - linters:
15 | - errcheck
16 | text: "watcher.Stop"
17 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/nats-io/nats.go/CODE-OF-CONDUCT.md:
--------------------------------------------------------------------------------
1 | ## Community Code of Conduct
2 |
3 | NATS follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).
4 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/nats-io/nats.go/GOVERNANCE.md:
--------------------------------------------------------------------------------
1 | # NATS Go Client Governance
2 |
3 | NATS Go Client (go-nats) is part of the NATS project and is subject to the [NATS Governance](https://github.com/nats-io/nats-general/blob/master/GOVERNANCE.md).
--------------------------------------------------------------------------------
/gateway/vendor/github.com/nats-io/nats.go/MAINTAINERS.md:
--------------------------------------------------------------------------------
1 | # Maintainers
2 |
3 | Maintainership is on a per project basis.
4 |
5 | ### Maintainers
6 | - Derek Collison [@derekcollison](https://github.com/derekcollison)
7 | - Ivan Kozlovic [@kozlovic](https://github.com/kozlovic)
8 | - Waldemar Quevedo [@wallyqs](https://github.com/wallyqs)
9 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/nats-io/nats.go/dependencies.md:
--------------------------------------------------------------------------------
1 | # External Dependencies
2 |
3 | This file lists the dependencies used in this repository.
4 |
5 | | Dependency | License |
6 | |-----------------------------------|--------------|
7 | | Go | BSD 3-Clause |
8 | | github.com/golang/protobuf/proto | BSD-3-Clause |
9 | | github.com/klauspost/compress | BSD-3-Clause |
10 | | github.com/nats-io/nats-server/v2 | Apache-2.0 |
11 | | github.com/nats-io/nkeys | Apache-2.0 |
12 | | github.com/nats-io/nuid | Apache-2.0 |
13 | | go.uber.org/goleak | MIT |
14 | | golang.org/x/text | BSD-3-Clause |
15 | | google.golang.org/protobuf | BSD-3-Clause |
16 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/nats-io/nats.go/go_test.mod:
--------------------------------------------------------------------------------
1 | module github.com/nats-io/nats.go
2 |
3 | go 1.21
4 |
5 | toolchain go1.22.5
6 |
7 | require (
8 | github.com/golang/protobuf v1.4.2
9 | github.com/klauspost/compress v1.17.9
10 | github.com/nats-io/jwt v1.2.2
11 | github.com/nats-io/nats-server/v2 v2.10.17
12 | github.com/nats-io/nkeys v0.4.7
13 | github.com/nats-io/nuid v1.0.1
14 | go.uber.org/goleak v1.3.0
15 | golang.org/x/text v0.16.0
16 | google.golang.org/protobuf v1.23.0
17 | )
18 |
19 | require (
20 | github.com/minio/highwayhash v1.0.2 // indirect
21 | github.com/nats-io/jwt/v2 v2.5.7 // indirect
22 | golang.org/x/crypto v0.24.0 // indirect
23 | golang.org/x/sys v0.21.0 // indirect
24 | golang.org/x/time v0.5.0 // indirect
25 | )
26 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/nats-io/nats.go/rand.go:
--------------------------------------------------------------------------------
1 | // Copyright 2023 The NATS Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build !go1.20
15 | // +build !go1.20
16 |
17 | // A Go client for the NATS messaging system (https://nats.io).
18 | package nats
19 |
20 | import (
21 | "math/rand"
22 | "time"
23 | )
24 |
25 | func init() {
26 | // This is not needed since Go 1.20 because now rand.Seed always happens
27 | // by default (uses runtime.fastrand64 instead as source).
28 | rand.Seed(time.Now().UnixNano())
29 | }
30 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/nats-io/nats.go/util/tls.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017-2022 The NATS Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build go1.8
15 | // +build go1.8
16 |
17 | package util
18 |
19 | import "crypto/tls"
20 |
21 | // CloneTLSConfig returns a copy of c.
22 | func CloneTLSConfig(c *tls.Config) *tls.Config {
23 | if c == nil {
24 | return &tls.Config{}
25 | }
26 |
27 | return c.Clone()
28 | }
29 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/nats-io/nkeys/.gitignore:
--------------------------------------------------------------------------------
1 | # Binaries for programs and plugins
2 | *.exe
3 | *.dll
4 | *.so
5 | *.dylib
6 | build/
7 |
8 | # Test binary, build with `go test -c`
9 | *.test
10 |
11 | # Output of the go coverage tool, specifically when used with LiteIDE
12 | *.out
13 |
14 | # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
15 | .glide/
16 | .idea/
17 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/nats-io/nkeys/GOVERNANCE.md:
--------------------------------------------------------------------------------
1 | # NATS NKEYS Governance
2 |
3 | NATS NKEYS is part of the NATS project and is subject to the [NATS Governance](https://github.com/nats-io/nats-general/blob/master/GOVERNANCE.md).
--------------------------------------------------------------------------------
/gateway/vendor/github.com/nats-io/nkeys/MAINTAINERS.md:
--------------------------------------------------------------------------------
1 | # Maintainers
2 |
3 | Maintainership is on a per project basis.
4 |
5 | ### Maintainers
6 | - Derek Collison [@derekcollison](https://github.com/derekcollison)
7 | - Ivan Kozlovic [@kozlovic](https://github.com/kozlovic)
8 | - Waldemar Quevedo [@wallyqs](https://github.com/wallyqs)
9 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/nats-io/nkeys/TODO.md:
--------------------------------------------------------------------------------
1 |
2 | # General
3 |
4 | - [ ] Child key derivation
5 | - [ ] Hardware support, e.g. YubiHSM
6 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/nats-io/nkeys/dependencies.md:
--------------------------------------------------------------------------------
1 | # External Dependencies
2 |
3 | This file lists the dependencies used in this repository.
4 |
5 | | Dependency | License |
6 | |-|-|
7 | | Go | BSD 3-Clause "New" or "Revised" License |
8 | | golang.org/x/crypto v0.3.0 | BSD 3-Clause "New" or "Revised" License |
9 | | golang.org/x/net v0.2.0 | BSD 3-Clause "New" or "Revised" License |
10 | | golang.org/x/sys v0.2.0 | BSD 3-Clause "New" or "Revised" License |
11 | | golang.org/x/term v0.2.0 | BSD 3-Clause "New" or "Revised" License |
12 | | golang.org/x/text v0.4.0 | BSD 3-Clause "New" or "Revised" License |
13 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/nats-io/nuid/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 | *.test
24 | *.prof
25 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/nats-io/nuid/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | sudo: false
3 | go:
4 | - 1.9.x
5 | - 1.10.x
6 |
7 | install:
8 | - go get -t ./...
9 | - go get github.com/mattn/goveralls
10 |
11 | script:
12 | - go fmt ./...
13 | - go vet ./...
14 | - go test -v
15 | - go test -v --race
16 | - go test -v -covermode=count -coverprofile=coverage.out
17 | - $HOME/gopath/bin/goveralls -coverprofile coverage.out -service travis-ci
18 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/nats-io/nuid/GOVERNANCE.md:
--------------------------------------------------------------------------------
1 | # NATS NUID Governance
2 |
3 | NATS NUID is part of the NATS project and is subject to the [NATS Governance](https://github.com/nats-io/nats-general/blob/master/GOVERNANCE.md).
--------------------------------------------------------------------------------
/gateway/vendor/github.com/nats-io/nuid/MAINTAINERS.md:
--------------------------------------------------------------------------------
1 | # Maintainers
2 |
3 | Maintainership is on a per project basis.
4 |
5 | ### Core-maintainers
6 | - Derek Collison [@derekcollison](https://github.com/derekcollison)
--------------------------------------------------------------------------------
/gateway/vendor/github.com/nats-io/stan.go/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 | *.test
24 | *.prof
25 |
26 | # Eclipse stuff
27 | .project
28 | .settings/
29 | .idea
--------------------------------------------------------------------------------
/gateway/vendor/github.com/nats-io/stan.go/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go:
3 | - 1.19.x
4 | - 1.18.x
5 | go_import_path: github.com/nats-io/stan.go
6 | install:
7 | - if [[ "$TRAVIS_GO_VERSION" =~ 1.19 ]]; then go install honnef.co/go/tools/cmd/staticcheck@latest; fi
8 | - go install github.com/client9/misspell/cmd/misspell@latest
9 | before_script:
10 | - $(exit $(go fmt ./... | wc -l))
11 | - go vet -modfile go_tests.mod ./...
12 | - find . -type f -name "*.go" | grep -v "/pb/" | xargs misspell -error -locale US
13 | - if [[ "$TRAVIS_GO_VERSION" =~ 1.19 ]]; then staticcheck -tests=false ./...; fi
14 | script:
15 | - go test -v -race . -modfile go_tests.mod
16 | after_success:
17 | - if [[ "$TRAVIS_GO_VERSION" =~ 1.19 ]]; then ./scripts/cov.sh TRAVIS; fi
18 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/nats-io/stan.go/CODE-OF-CONDUCT.md:
--------------------------------------------------------------------------------
1 | ## Community Code of Conduct
2 |
3 | NATS follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).
4 |
5 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/nats-io/stan.go/GOVERNANCE.md:
--------------------------------------------------------------------------------
1 | # NATS Streaming Governance
2 |
3 | NATS Streaming is part of the NATS project and is subject to the [NATS Governance](https://github.com/nats-io/nats-general/blob/master/GOVERNANCE.md).
--------------------------------------------------------------------------------
/gateway/vendor/github.com/nats-io/stan.go/MAINTAINERS.md:
--------------------------------------------------------------------------------
1 | # Maintainers
2 |
3 | Maintainership is on a per project basis.
4 |
5 | ### Maintainers
6 | - Derek Collison [@derekcollison](https://github.com/derekcollison)
7 | - Ivan Kozlovic [@kozlovic](https://github.com/kozlovic)
8 | - Alberto Ricart [@aricart](https://github.com/aricart)
9 | - Colin Sullivan [@ColinSullivan1](https://github.com/ColinSullivan1)
10 | - Waldemar Quevedo [@wallyqs](https://github.com/wallyqs)
11 | - R.I. Pienaar [@ripienaar](https://github.com/ripienaar)
12 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/nats-io/stan.go/go_tests.mod:
--------------------------------------------------------------------------------
1 | module github.com/nats-io/stan.go
2 |
3 | go 1.14
4 |
5 | require (
6 | github.com/gogo/protobuf v1.3.2
7 | github.com/nats-io/nats-server/v2 v2.9.11
8 | github.com/nats-io/nats-streaming-server v0.25.3-0.20230111211943-d51efd049657
9 | github.com/nats-io/nats.go v1.22.1
10 | github.com/nats-io/nuid v1.0.1
11 | )
12 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/openfaas/faas-provider/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Alex Ellis
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/openfaas/faas-provider/auth/basic_auth.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) OpenFaaS Author(s). All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | package auth
5 |
6 | import (
7 | "crypto/subtle"
8 | "net/http"
9 | )
10 |
11 | // DecorateWithBasicAuth enforces basic auth as a middleware with given credentials
12 | func DecorateWithBasicAuth(next http.HandlerFunc, credentials *BasicAuthCredentials) http.HandlerFunc {
13 | return func(w http.ResponseWriter, r *http.Request) {
14 |
15 | user, password, ok := r.BasicAuth()
16 |
17 | const noMatch = 0
18 | if !ok ||
19 | user != credentials.User ||
20 | subtle.ConstantTimeCompare([]byte(credentials.Password), []byte(password)) == noMatch {
21 |
22 | w.Header().Set("WWW-Authenticate", `Basic realm="Restricted"`)
23 | w.WriteHeader(http.StatusUnauthorized)
24 | w.Write([]byte("invalid credentials"))
25 | return
26 | }
27 |
28 | next.ServeHTTP(w, r)
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/openfaas/faas-provider/httputil/writers.go:
--------------------------------------------------------------------------------
1 | package httputil
2 |
3 | import (
4 | "fmt"
5 | "net/http"
6 | )
7 |
8 | // Errorf sets the response status code and write formats the provided message as the
9 | // response body
10 | func Errorf(w http.ResponseWriter, statusCode int, msg string, args ...interface{}) {
11 | http.Error(w, fmt.Sprintf(msg, args...), statusCode)
12 | }
13 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/openfaas/faas-provider/types/secret.go:
--------------------------------------------------------------------------------
1 | package types
2 |
3 | // Secret for underlying orchestrator
4 | type Secret struct {
5 | // Name of the secret
6 | Name string `json:"name"`
7 |
8 | // Namespace if applicable for the secret
9 | Namespace string `json:"namespace,omitempty"`
10 |
11 | // Value is a string representing the string's value
12 | Value string `json:"value,omitempty"`
13 |
14 | // RawValue can be used to provide binary data when
15 | // Value is not set
16 | RawValue []byte `json:"rawValue,omitempty"`
17 | }
18 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/openfaas/nats-queue-worker/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2016-2017 Alex Ellis
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/openfaas/nats-queue-worker/handler/handler.go:
--------------------------------------------------------------------------------
1 | package handler
2 |
3 | import (
4 | "fmt"
5 | "log"
6 | "sync"
7 | )
8 |
9 | const sharedQueue = "faas-request"
10 |
11 | // CreateNATSQueue ready for asynchronous message processing of paylods of
12 | // up to a maximum of 256KB in size.
13 | func CreateNATSQueue(address string, port int, clusterName, channel string, clientConfig NATSConfig) (*NATSQueue, error) {
14 | var err error
15 | natsURL := fmt.Sprintf("nats://%s:%d", address, port)
16 | log.Printf("Opening connection to %s\n", natsURL)
17 |
18 | clientID := clientConfig.GetClientID()
19 |
20 | // If 'channel' is empty, use the previous default.
21 | if channel == "" {
22 | channel = sharedQueue
23 | }
24 |
25 | queue1 := NATSQueue{
26 | ClientID: clientID,
27 | ClusterID: clusterName,
28 | NATSURL: natsURL,
29 | Topic: channel,
30 | maxReconnect: clientConfig.GetMaxReconnect(),
31 | reconnectDelay: clientConfig.GetReconnectDelay(),
32 | ncMutex: &sync.RWMutex{},
33 | }
34 |
35 | err = queue1.connect()
36 |
37 | return &queue1, err
38 | }
39 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/openfaas/nats-queue-worker/handler/nats_config.go:
--------------------------------------------------------------------------------
1 | package handler
2 |
3 | import (
4 | "os"
5 | "time"
6 |
7 | "github.com/openfaas/nats-queue-worker/nats"
8 | )
9 |
10 | type NATSConfig interface {
11 | GetClientID() string
12 | GetMaxReconnect() int
13 | GetReconnectDelay() time.Duration
14 | }
15 |
16 | type DefaultNATSConfig struct {
17 | maxReconnect int
18 | reconnectDelay time.Duration
19 | }
20 |
21 | func NewDefaultNATSConfig(maxReconnect int, reconnectDelay time.Duration) DefaultNATSConfig {
22 | return DefaultNATSConfig{maxReconnect, reconnectDelay}
23 | }
24 |
25 | // GetClientID returns the ClientID assigned to this producer/consumer.
26 | func (DefaultNATSConfig) GetClientID() string {
27 | val, _ := os.Hostname()
28 | return getClientID(val)
29 | }
30 |
31 | func (c DefaultNATSConfig) GetMaxReconnect() int {
32 | return c.maxReconnect
33 | }
34 |
35 | func (c DefaultNATSConfig) GetReconnectDelay() time.Duration {
36 | return c.reconnectDelay
37 | }
38 |
39 | func getClientID(hostname string) string {
40 | return "faas-publisher-" + nats.GetClientID(hostname)
41 | }
42 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/openfaas/nats-queue-worker/nats/client.go:
--------------------------------------------------------------------------------
1 | package nats
2 |
3 | import "regexp"
4 |
5 | var supportedCharacters = regexp.MustCompile("[^a-zA-Z0-9-_]+")
6 |
7 | func GetClientID(value string) string {
8 | return supportedCharacters.ReplaceAllString(value, "_")
9 | }
10 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/client_golang/NOTICE:
--------------------------------------------------------------------------------
1 | Prometheus instrumentation library for Go applications
2 | Copyright 2012-2015 The Prometheus Authors
3 |
4 | This product includes software developed at
5 | SoundCloud Ltd. (http://soundcloud.com/).
6 |
7 |
8 | The following components are included in this product:
9 |
10 | perks - a fork of https://github.com/bmizerany/perks
11 | https://github.com/beorn7/perks
12 | Copyright 2013-2015 Blake Mizerany, Björn Rabenstein
13 | See https://github.com/beorn7/perks/blob/master/README.md for license details.
14 |
15 | Go support for Protocol Buffers - Google's data interchange format
16 | http://github.com/golang/protobuf/
17 | Copyright 2010 The Go Authors
18 | See source code for license details.
19 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/client_golang/prometheus/.gitignore:
--------------------------------------------------------------------------------
1 | command-line-arguments.test
2 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/client_golang/prometheus/README.md:
--------------------------------------------------------------------------------
1 | See [](https://pkg.go.dev/github.com/prometheus/client_golang/prometheus).
2 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/client_golang/prometheus/get_pid.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build !js || wasm
15 | // +build !js wasm
16 |
17 | package prometheus
18 |
19 | import "os"
20 |
21 | func getPIDFn() func() (int, error) {
22 | pid := os.Getpid()
23 | return func() (int, error) {
24 | return pid, nil
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/client_golang/prometheus/get_pid_gopherjs.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build js && !wasm
15 | // +build js,!wasm
16 |
17 | package prometheus
18 |
19 | func getPIDFn() func() (int, error) {
20 | return func() (int, error) {
21 | return 1, nil
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/client_golang/prometheus/num_threads.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build !js || wasm
15 | // +build !js wasm
16 |
17 | package prometheus
18 |
19 | import "runtime"
20 |
21 | // getRuntimeNumThreads returns the number of open OS threads.
22 | func getRuntimeNumThreads() float64 {
23 | n, _ := runtime.ThreadCreateProfile(nil)
24 | return float64(n)
25 | }
26 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/client_golang/prometheus/num_threads_gopherjs.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build js && !wasm
15 | // +build js,!wasm
16 |
17 | package prometheus
18 |
19 | // getRuntimeNumThreads returns the number of open OS threads.
20 | func getRuntimeNumThreads() float64 {
21 | return 1
22 | }
23 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/client_golang/prometheus/process_collector_js.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build js
15 | // +build js
16 |
17 | package prometheus
18 |
19 | func canCollectProcess() bool {
20 | return false
21 | }
22 |
23 | func (c *processCollector) processCollect(ch chan<- Metric) {
24 | // noop on this platform
25 | return
26 | }
27 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/client_golang/prometheus/process_collector_wasip1.go:
--------------------------------------------------------------------------------
1 | // Copyright 2023 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build wasip1
15 | // +build wasip1
16 |
17 | package prometheus
18 |
19 | func canCollectProcess() bool {
20 | return false
21 | }
22 |
23 | func (*processCollector) processCollect(chan<- Metric) {
24 | // noop on this platform
25 | return
26 | }
27 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/client_golang/prometheus/vnext.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | package prometheus
15 |
16 | type v2 struct{}
17 |
18 | // V2 is a struct that can be referenced to access experimental API that might
19 | // be present in v2 of client golang someday. It offers extended functionality
20 | // of v1 with slightly changed API. It is acceptable to use some pieces from v1
21 | // and e.g `prometheus.NewGauge` and some from v2 e.g. `prometheus.V2.NewDesc`
22 | // in the same codebase.
23 | var V2 = v2{}
24 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/client_model/NOTICE:
--------------------------------------------------------------------------------
1 | Data model artifacts for Prometheus.
2 | Copyright 2012-2015 The Prometheus Authors
3 |
4 | This product includes software developed at
5 | SoundCloud Ltd. (http://soundcloud.com/).
6 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/common/NOTICE:
--------------------------------------------------------------------------------
1 | Common libraries shared by Prometheus Go components.
2 | Copyright 2015 The Prometheus Authors
3 |
4 | This product includes software developed at
5 | SoundCloud Ltd. (http://soundcloud.com/).
6 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/common/model/model.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | // Package model contains common data structures that are shared across
15 | // Prometheus components and libraries.
16 | package model
17 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/procfs/.gitignore:
--------------------------------------------------------------------------------
1 | /testdata/fixtures/
2 | /fixtures
3 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/procfs/.golangci.yml:
--------------------------------------------------------------------------------
1 | ---
2 | linters:
3 | enable:
4 | - errcheck
5 | - godot
6 | - gosimple
7 | - govet
8 | - ineffassign
9 | - misspell
10 | - revive
11 | - staticcheck
12 | - testifylint
13 | - unused
14 |
15 | linter-settings:
16 | godot:
17 | capital: true
18 | exclude:
19 | # Ignore "See: URL"
20 | - 'See:'
21 | misspell:
22 | locale: US
23 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/procfs/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Prometheus Community Code of Conduct
2 |
3 | Prometheus follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md).
4 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/procfs/MAINTAINERS.md:
--------------------------------------------------------------------------------
1 | * Johannes 'fish' Ziemke @discordianfish
2 | * Paul Gier @pgier
3 | * Ben Kochie @SuperQ
4 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/procfs/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2018 The Prometheus Authors
2 | # Licensed under the Apache License, Version 2.0 (the "License");
3 | # you may not use this file except in compliance with the License.
4 | # You may obtain a copy of the License at
5 | #
6 | # http://www.apache.org/licenses/LICENSE-2.0
7 | #
8 | # Unless required by applicable law or agreed to in writing, software
9 | # distributed under the License is distributed on an "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | # See the License for the specific language governing permissions and
12 | # limitations under the License.
13 |
14 | include Makefile.common
15 |
16 | %/.unpacked: %.ttar
17 | @echo ">> extracting fixtures $*"
18 | ./ttar -C $(dir $*) -x -f $*.ttar
19 | touch $@
20 |
21 | fixtures: testdata/fixtures/.unpacked
22 |
23 | update_fixtures:
24 | rm -vf testdata/fixtures/.unpacked
25 | ./ttar -c -f testdata/fixtures.ttar -C testdata/ fixtures/
26 |
27 | .PHONY: build
28 | build:
29 |
30 | .PHONY: test
31 | test: testdata/fixtures/.unpacked common-test
32 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/procfs/NOTICE:
--------------------------------------------------------------------------------
1 | procfs provides functions to retrieve system, kernel and process
2 | metrics from the pseudo-filesystem proc.
3 |
4 | Copyright 2014-2015 The Prometheus Authors
5 |
6 | This product includes software developed at
7 | SoundCloud Ltd. (http://soundcloud.com/).
8 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/procfs/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Reporting a security issue
2 |
3 | The Prometheus security policy, including how to report vulnerabilities, can be
4 | found here:
5 |
6 |
7 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/procfs/cmdline.go:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | package procfs
15 |
16 | import (
17 | "strings"
18 |
19 | "github.com/prometheus/procfs/internal/util"
20 | )
21 |
22 | // CmdLine returns the command line of the kernel.
23 | func (fs FS) CmdLine() ([]string, error) {
24 | data, err := util.ReadFileNoStat(fs.proc.Path("cmdline"))
25 | if err != nil {
26 | return nil, err
27 | }
28 |
29 | return strings.Fields(string(data)), nil
30 | }
31 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/procfs/cpuinfo_armx.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build linux && (arm || arm64)
15 | // +build linux
16 | // +build arm arm64
17 |
18 | package procfs
19 |
20 | var parseCPUInfo = parseCPUInfoARM
21 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/procfs/cpuinfo_loong64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build linux
15 | // +build linux
16 |
17 | package procfs
18 |
19 | var parseCPUInfo = parseCPUInfoLoong
20 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/procfs/cpuinfo_mipsx.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build linux && (mips || mipsle || mips64 || mips64le)
15 | // +build linux
16 | // +build mips mipsle mips64 mips64le
17 |
18 | package procfs
19 |
20 | var parseCPUInfo = parseCPUInfoMips
21 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/procfs/cpuinfo_others.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build linux && !386 && !amd64 && !arm && !arm64 && !loong64 && !mips && !mips64 && !mips64le && !mipsle && !ppc64 && !ppc64le && !riscv64 && !s390x
15 | // +build linux,!386,!amd64,!arm,!arm64,!loong64,!mips,!mips64,!mips64le,!mipsle,!ppc64,!ppc64le,!riscv64,!s390x
16 |
17 | package procfs
18 |
19 | var parseCPUInfo = parseCPUInfoDummy
20 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/procfs/cpuinfo_ppcx.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build linux && (ppc64 || ppc64le)
15 | // +build linux
16 | // +build ppc64 ppc64le
17 |
18 | package procfs
19 |
20 | var parseCPUInfo = parseCPUInfoPPC
21 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build linux && (riscv || riscv64)
15 | // +build linux
16 | // +build riscv riscv64
17 |
18 | package procfs
19 |
20 | var parseCPUInfo = parseCPUInfoRISCV
21 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/procfs/cpuinfo_s390x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build linux
15 | // +build linux
16 |
17 | package procfs
18 |
19 | var parseCPUInfo = parseCPUInfoS390X
20 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/procfs/cpuinfo_x86.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build linux && (386 || amd64)
15 | // +build linux
16 | // +build 386 amd64
17 |
18 | package procfs
19 |
20 | var parseCPUInfo = parseCPUInfoX86
21 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/procfs/fs_statfs_notype.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build !freebsd && !linux
15 | // +build !freebsd,!linux
16 |
17 | package procfs
18 |
19 | // isRealProc returns true on architectures that don't have a Type argument
20 | // in their Statfs_t struct
21 | func isRealProc(mountPoint string) (bool, error) {
22 | return true, nil
23 | }
24 |
--------------------------------------------------------------------------------
/gateway/vendor/github.com/prometheus/procfs/internal/util/sysreadfile_compat.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Prometheus Authors
2 | // Licensed under the Apache License, Version 2.0 (the "License");
3 | // you may not use this file except in compliance with the License.
4 | // You may obtain a copy of the License at
5 | //
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | //go:build (linux && appengine) || (!linux && !darwin)
15 | // +build linux,appengine !linux,!darwin
16 |
17 | package util
18 |
19 | import (
20 | "fmt"
21 | )
22 |
23 | // SysReadFile is here implemented as a noop for builds that do not support
24 | // the read syscall. For example Windows, or Linux on Google App Engine.
25 | func SysReadFile(file string) (string, error) {
26 | return "", fmt.Errorf("not supported on this platform")
27 | }
28 |
--------------------------------------------------------------------------------
/gateway/vendor/go.uber.org/goleak/.gitignore:
--------------------------------------------------------------------------------
1 | vendor/
2 | /bin
3 | /lint.log
4 | /cover.out
5 | /cover.html
6 |
--------------------------------------------------------------------------------
/gateway/vendor/go.uber.org/goleak/.golangci.yml:
--------------------------------------------------------------------------------
1 | output:
2 | # Make output more digestible with quickfix in vim/emacs/etc.
3 | sort-results: true
4 | print-issued-lines: false
5 |
6 | linters:
7 | enable:
8 | - gofumpt
9 | - nolintlint
10 | - revive
11 |
12 | linters-settings:
13 | govet:
14 | # These govet checks are disabled by default, but they're useful.
15 | enable:
16 | - niliness
17 | - reflectvaluecompare
18 | - sortslice
19 | - unusedwrite
20 |
21 | issues:
22 | # Print all issues reported by all linters.
23 | max-issues-per-linter: 0
24 | max-same-issues: 0
25 |
26 | # Don't ignore some of the issues that golangci-lint considers okay.
27 | # This includes documenting all exported entities.
28 | exclude-use-default: false
29 |
--------------------------------------------------------------------------------
/gateway/vendor/go.uber.org/goleak/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2018 Uber Technologies, Inc.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/gateway/vendor/go.uber.org/goleak/Makefile:
--------------------------------------------------------------------------------
1 | # Directory containing the Makefile.
2 | PROJECT_ROOT = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
3 |
4 | export GOBIN = $(PROJECT_ROOT)/bin
5 | export PATH := $(GOBIN):$(PATH)
6 |
7 | GO_FILES = $(shell find . \
8 | -path '*/.*' -prune -o \
9 | '(' -type f -a -name '*.go' ')' -print)
10 |
11 | # Additional test flags.
12 | TEST_FLAGS ?=
13 |
14 | .PHONY: all
15 | all: lint build test
16 |
17 | .PHONY: lint
18 | lint: golangci-lint tidy-lint
19 |
20 | .PHONY: build
21 | build:
22 | go build ./...
23 |
24 | .PHONY: test
25 | test:
26 | go test -v -race ./...
27 | go test -v -trace=/dev/null .
28 |
29 | .PHONY: cover
30 | cover:
31 | go test -race -coverprofile=cover.out -coverpkg=./... ./...
32 | go tool cover -html=cover.out -o cover.html
33 |
34 | .PHONY: golangci-lint
35 | golangci-lint:
36 | golangci-lint run
37 |
38 | .PHONY: tidy
39 | tidy:
40 | go mod tidy
41 |
42 | .PHONY: tidy-lint
43 | tidy-lint:
44 | go mod tidy
45 | git diff --exit-code -- go.mod go.sum
46 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build amd64 && gc && !purego
6 |
7 | package blake2b
8 |
9 | import "golang.org/x/sys/cpu"
10 |
11 | func init() {
12 | useAVX2 = cpu.X86.HasAVX2
13 | useAVX = cpu.X86.HasAVX
14 | useSSE4 = cpu.X86.HasSSE41
15 | }
16 |
17 | //go:noescape
18 | func hashBlocksAVX2(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)
19 |
20 | //go:noescape
21 | func hashBlocksAVX(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)
22 |
23 | //go:noescape
24 | func hashBlocksSSE4(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)
25 |
26 | func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) {
27 | switch {
28 | case useAVX2:
29 | hashBlocksAVX2(h, c, flag, blocks)
30 | case useAVX:
31 | hashBlocksAVX(h, c, flag, blocks)
32 | case useSSE4:
33 | hashBlocksSSE4(h, c, flag, blocks)
34 | default:
35 | hashBlocksGeneric(h, c, flag, blocks)
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/crypto/blake2b/blake2b_ref.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !amd64 || purego || !gc
6 |
7 | package blake2b
8 |
9 | func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) {
10 | hashBlocksGeneric(h, c, flag, blocks)
11 | }
12 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/crypto/blake2b/register.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package blake2b
6 |
7 | import (
8 | "crypto"
9 | "hash"
10 | )
11 |
12 | func init() {
13 | newHash256 := func() hash.Hash {
14 | h, _ := New256(nil)
15 | return h
16 | }
17 | newHash384 := func() hash.Hash {
18 | h, _ := New384(nil)
19 | return h
20 | }
21 |
22 | newHash512 := func() hash.Hash {
23 | h, _ := New512(nil)
24 | return h
25 | }
26 |
27 | crypto.RegisterHash(crypto.BLAKE2b_256, newHash256)
28 | crypto.RegisterHash(crypto.BLAKE2b_384, newHash384)
29 | crypto.RegisterHash(crypto.BLAKE2b_512, newHash512)
30 | }
31 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (!amd64 && !ppc64le && !ppc64 && !s390x) || !gc || purego
6 |
7 | package poly1305
8 |
9 | type mac struct{ macGeneric }
10 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build amd64 && !purego && gc
6 |
7 | package salsa
8 |
9 | //go:noescape
10 |
11 | // salsa2020XORKeyStream is implemented in salsa20_amd64.s.
12 | func salsa2020XORKeyStream(out, in *byte, n uint64, nonce, key *byte)
13 |
14 | // XORKeyStream crypts bytes from in to out using the given key and counters.
15 | // In and out must overlap entirely or not at all. Counter
16 | // contains the raw salsa20 counter bytes (both nonce and block counter).
17 | func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) {
18 | if len(in) == 0 {
19 | return
20 | }
21 | _ = out[len(in)-1]
22 | salsa2020XORKeyStream(&out[0], &in[0], uint64(len(in)), &counter[0], &key[0])
23 | }
24 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_noasm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !amd64 || purego || !gc
6 |
7 | package salsa
8 |
9 | // XORKeyStream crypts bytes from in to out using the given key and counters.
10 | // In and out must overlap entirely or not at all. Counter
11 | // contains the raw salsa20 counter bytes (both nonce and block counter).
12 | func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) {
13 | genericXORKeyStream(out, in, counter, key)
14 | }
15 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gc
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go
11 | //
12 |
13 | TEXT ·syscall6(SB),NOSPLIT,$0-88
14 | JMP syscall·syscall6(SB)
15 |
16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88
17 | JMP syscall·rawSyscall6(SB)
18 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/asm_darwin_x86_gc.s:
--------------------------------------------------------------------------------
1 | // Copyright 2024 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build darwin && amd64 && gc
6 |
7 | #include "textflag.h"
8 |
9 | TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
10 | JMP libc_sysctl(SB)
11 | GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
12 | DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
13 |
14 | TEXT libc_sysctlbyname_trampoline<>(SB),NOSPLIT,$0-0
15 | JMP libc_sysctlbyname(SB)
16 | GLOBL ·libc_sysctlbyname_trampoline_addr(SB), RODATA, $8
17 | DATA ·libc_sysctlbyname_trampoline_addr(SB)/8, $libc_sysctlbyname_trampoline<>(SB)
18 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_aix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix
6 |
7 | package cpu
8 |
9 | const (
10 | // getsystemcfg constants
11 | _SC_IMPL = 2
12 | _IMPL_POWER8 = 0x10000
13 | _IMPL_POWER9 = 0x20000
14 | )
15 |
16 | func archInit() {
17 | impl := getsystemcfg(_SC_IMPL)
18 | if impl&_IMPL_POWER8 != 0 {
19 | PPC64.IsPOWER8 = true
20 | }
21 | if impl&_IMPL_POWER9 != 0 {
22 | PPC64.IsPOWER8 = true
23 | PPC64.IsPOWER9 = true
24 | }
25 |
26 | Initialized = true
27 | }
28 |
29 | func getsystemcfg(label int) (n uint64) {
30 | r0, _ := callgetsystemcfg(label)
31 | n = uint64(r0)
32 | return
33 | }
34 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gc
6 |
7 | #include "textflag.h"
8 |
9 | // func getisar0() uint64
10 | TEXT ·getisar0(SB),NOSPLIT,$0-8
11 | // get Instruction Set Attributes 0 into x0
12 | // mrs x0, ID_AA64ISAR0_EL1 = d5380600
13 | WORD $0xd5380600
14 | MOVD R0, ret+0(FP)
15 | RET
16 |
17 | // func getisar1() uint64
18 | TEXT ·getisar1(SB),NOSPLIT,$0-8
19 | // get Instruction Set Attributes 1 into x0
20 | // mrs x0, ID_AA64ISAR1_EL1 = d5380620
21 | WORD $0xd5380620
22 | MOVD R0, ret+0(FP)
23 | RET
24 |
25 | // func getpfr0() uint64
26 | TEXT ·getpfr0(SB),NOSPLIT,$0-8
27 | // get Processor Feature Register 0 into x0
28 | // mrs x0, ID_AA64PFR0_EL1 = d5380400
29 | WORD $0xd5380400
30 | MOVD R0, ret+0(FP)
31 | RET
32 |
33 | // func getzfr0() uint64
34 | TEXT ·getzfr0(SB),NOSPLIT,$0-8
35 | // get SVE Feature Register 0 into x0
36 | // mrs x0, ID_AA64ZFR0_EL1 = d5380480
37 | WORD $0xd5380480
38 | MOVD R0, ret+0(FP)
39 | RET
40 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gc
6 |
7 | package cpu
8 |
9 | func getisar0() uint64
10 | func getisar1() uint64
11 | func getpfr0() uint64
12 | func getzfr0() uint64
13 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gc
6 |
7 | package cpu
8 |
9 | // haveAsmFunctions reports whether the other functions in this file can
10 | // be safely called.
11 | func haveAsmFunctions() bool { return true }
12 |
13 | // The following feature detection functions are defined in cpu_s390x.s.
14 | // They are likely to be expensive to call so the results should be cached.
15 | func stfle() facilityList
16 | func kmQuery() queryResult
17 | func kmcQuery() queryResult
18 | func kmctrQuery() queryResult
19 | func kmaQuery() queryResult
20 | func kimdQuery() queryResult
21 | func klmdQuery() queryResult
22 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (386 || amd64 || amd64p32) && gc
6 |
7 | package cpu
8 |
9 | // cpuid is implemented in cpu_gc_x86.s for gc compiler
10 | // and in cpu_gccgo.c for gccgo.
11 | func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)
12 |
13 | // xgetbv with ecx = 0 is implemented in cpu_gc_x86.s for gc compiler
14 | // and in cpu_gccgo.c for gccgo.
15 | func xgetbv() (eax, edx uint32)
16 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_gc_x86.s:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (386 || amd64 || amd64p32) && gc
6 |
7 | #include "textflag.h"
8 |
9 | // func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)
10 | TEXT ·cpuid(SB), NOSPLIT, $0-24
11 | MOVL eaxArg+0(FP), AX
12 | MOVL ecxArg+4(FP), CX
13 | CPUID
14 | MOVL AX, eax+8(FP)
15 | MOVL BX, ebx+12(FP)
16 | MOVL CX, ecx+16(FP)
17 | MOVL DX, edx+20(FP)
18 | RET
19 |
20 | // func xgetbv() (eax, edx uint32)
21 | TEXT ·xgetbv(SB), NOSPLIT, $0-8
22 | MOVL $0, CX
23 | XGETBV
24 | MOVL AX, eax+0(FP)
25 | MOVL DX, edx+4(FP)
26 | RET
27 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gccgo
6 |
7 | package cpu
8 |
9 | func getisar0() uint64 { return 0 }
10 | func getisar1() uint64 { return 0 }
11 | func getpfr0() uint64 { return 0 }
12 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gccgo
6 |
7 | package cpu
8 |
9 | // haveAsmFunctions reports whether the other functions in this file can
10 | // be safely called.
11 | func haveAsmFunctions() bool { return false }
12 |
13 | // TODO(mundaym): the following feature detection functions are currently
14 | // stubs. See https://golang.org/cl/162887 for how to fix this.
15 | // They are likely to be expensive to call so the results should be cached.
16 | func stfle() facilityList { panic("not implemented for gccgo") }
17 | func kmQuery() queryResult { panic("not implemented for gccgo") }
18 | func kmcQuery() queryResult { panic("not implemented for gccgo") }
19 | func kmctrQuery() queryResult { panic("not implemented for gccgo") }
20 | func kmaQuery() queryResult { panic("not implemented for gccgo") }
21 | func kimdQuery() queryResult { panic("not implemented for gccgo") }
22 | func klmdQuery() queryResult { panic("not implemented for gccgo") }
23 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (386 || amd64 || amd64p32) && gccgo
6 |
7 | package cpu
8 |
9 | //extern gccgoGetCpuidCount
10 | func gccgoGetCpuidCount(eaxArg, ecxArg uint32, eax, ebx, ecx, edx *uint32)
11 |
12 | func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) {
13 | var a, b, c, d uint32
14 | gccgoGetCpuidCount(eaxArg, ecxArg, &a, &b, &c, &d)
15 | return a, b, c, d
16 | }
17 |
18 | //extern gccgoXgetbv
19 | func gccgoXgetbv(eax, edx *uint32)
20 |
21 | func xgetbv() (eax, edx uint32) {
22 | var a, d uint32
23 | gccgoXgetbv(&a, &d)
24 | return a, d
25 | }
26 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !386 && !amd64 && !amd64p32 && !arm64
6 |
7 | package cpu
8 |
9 | func archInit() {
10 | if err := readHWCAP(); err != nil {
11 | return
12 | }
13 | doinit()
14 | Initialized = true
15 | }
16 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && (mips64 || mips64le)
6 |
7 | package cpu
8 |
9 | // HWCAP bits. These are exposed by the Linux kernel 5.4.
10 | const (
11 | // CPU features
12 | hwcap_MIPS_MSA = 1 << 1
13 | )
14 |
15 | func doinit() {
16 | // HWCAP feature bits
17 | MIPS64X.HasMSA = isSet(hwCap, hwcap_MIPS_MSA)
18 | }
19 |
20 | func isSet(hwc uint, value uint) bool {
21 | return hwc&value != 0
22 | }
23 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && !arm && !arm64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x && !riscv64
6 |
7 | package cpu
8 |
9 | func doinit() {}
10 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && (ppc64 || ppc64le)
6 |
7 | package cpu
8 |
9 | // HWCAP/HWCAP2 bits. These are exposed by the kernel.
10 | const (
11 | // ISA Level
12 | _PPC_FEATURE2_ARCH_2_07 = 0x80000000
13 | _PPC_FEATURE2_ARCH_3_00 = 0x00800000
14 |
15 | // CPU features
16 | _PPC_FEATURE2_DARN = 0x00200000
17 | _PPC_FEATURE2_SCV = 0x00100000
18 | )
19 |
20 | func doinit() {
21 | // HWCAP2 feature bits
22 | PPC64.IsPOWER8 = isSet(hwCap2, _PPC_FEATURE2_ARCH_2_07)
23 | PPC64.IsPOWER9 = isSet(hwCap2, _PPC_FEATURE2_ARCH_3_00)
24 | PPC64.HasDARN = isSet(hwCap2, _PPC_FEATURE2_DARN)
25 | PPC64.HasSCV = isSet(hwCap2, _PPC_FEATURE2_SCV)
26 | }
27 |
28 | func isSet(hwc uint, value uint) bool {
29 | return hwc&value != 0
30 | }
31 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cpu
6 |
7 | const (
8 | // bit mask values from /usr/include/bits/hwcap.h
9 | hwcap_ZARCH = 2
10 | hwcap_STFLE = 4
11 | hwcap_MSA = 8
12 | hwcap_LDISP = 16
13 | hwcap_EIMM = 32
14 | hwcap_DFP = 64
15 | hwcap_ETF3EH = 256
16 | hwcap_VX = 2048
17 | hwcap_VXE = 8192
18 | )
19 |
20 | func initS390Xbase() {
21 | // test HWCAP bit vector
22 | has := func(featureMask uint) bool {
23 | return hwCap&featureMask == featureMask
24 | }
25 |
26 | // mandatory
27 | S390X.HasZARCH = has(hwcap_ZARCH)
28 |
29 | // optional
30 | S390X.HasSTFLE = has(hwcap_STFLE)
31 | S390X.HasLDISP = has(hwcap_LDISP)
32 | S390X.HasEIMM = has(hwcap_EIMM)
33 | S390X.HasETF3EH = has(hwcap_ETF3EH)
34 | S390X.HasDFP = has(hwcap_DFP)
35 | S390X.HasMSA = has(hwcap_MSA)
36 | S390X.HasVX = has(hwcap_VX)
37 | if S390X.HasVX {
38 | S390X.HasVXE = has(hwcap_VXE)
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_loong64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build loong64
6 |
7 | package cpu
8 |
9 | const cacheLineSize = 64
10 |
11 | func initOptions() {
12 | }
13 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_mips64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build mips64 || mips64le
6 |
7 | package cpu
8 |
9 | const cacheLineSize = 32
10 |
11 | func initOptions() {
12 | options = []option{
13 | {Name: "msa", Feature: &MIPS64X.HasMSA},
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_mipsx.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build mips || mipsle
6 |
7 | package cpu
8 |
9 | const cacheLineSize = 32
10 |
11 | func initOptions() {}
12 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | #include "textflag.h"
6 |
7 | TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
8 | JMP libc_sysctl(SB)
9 |
10 | GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
11 | DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
12 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_other_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !linux && arm
6 |
7 | package cpu
8 |
9 | func archInit() {}
10 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !linux && !netbsd && !openbsd && arm64
6 |
7 | package cpu
8 |
9 | func doinit() {}
10 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !linux && (mips64 || mips64le)
6 |
7 | package cpu
8 |
9 | func archInit() {
10 | Initialized = true
11 | }
12 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !aix && !linux && (ppc64 || ppc64le)
6 |
7 | package cpu
8 |
9 | func archInit() {
10 | PPC64.IsPOWER8 = true
11 | Initialized = true
12 | }
13 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !linux && riscv64
6 |
7 | package cpu
8 |
9 | func archInit() {
10 | Initialized = true
11 | }
12 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_other_x86.go:
--------------------------------------------------------------------------------
1 | // Copyright 2024 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build 386 || amd64p32 || (amd64 && (!darwin || !gc))
6 |
7 | package cpu
8 |
9 | func darwinSupportsAVX512() bool {
10 | panic("only implemented for gc && amd64 && darwin")
11 | }
12 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build ppc64 || ppc64le
6 |
7 | package cpu
8 |
9 | const cacheLineSize = 128
10 |
11 | func initOptions() {
12 | options = []option{
13 | {Name: "darn", Feature: &PPC64.HasDARN},
14 | {Name: "scv", Feature: &PPC64.HasSCV},
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_riscv64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build riscv64
6 |
7 | package cpu
8 |
9 | const cacheLineSize = 64
10 |
11 | func initOptions() {
12 | options = []option{
13 | {Name: "fastmisaligned", Feature: &RISCV64.HasFastMisaligned},
14 | {Name: "c", Feature: &RISCV64.HasC},
15 | {Name: "v", Feature: &RISCV64.HasV},
16 | {Name: "zba", Feature: &RISCV64.HasZba},
17 | {Name: "zbb", Feature: &RISCV64.HasZbb},
18 | {Name: "zbs", Feature: &RISCV64.HasZbs},
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_wasm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build wasm
6 |
7 | package cpu
8 |
9 | // We're compiling the cpu package for an unknown (software-abstracted) CPU.
10 | // Make CacheLinePad an empty struct and hope that the usual struct alignment
11 | // rules are good enough.
12 |
13 | const cacheLineSize = 0
14 |
15 | func initOptions() {}
16 |
17 | func archInit() {}
18 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_zos.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cpu
6 |
7 | func archInit() {
8 | doinit()
9 | Initialized = true
10 | }
11 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/cpu_zos_s390x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cpu
6 |
7 | func initS390Xbase() {
8 | // get the facilities list
9 | facilities := stfle()
10 |
11 | // mandatory
12 | S390X.HasZARCH = facilities.Has(zarch)
13 | S390X.HasSTFLE = facilities.Has(stflef)
14 | S390X.HasLDISP = facilities.Has(ldisp)
15 | S390X.HasEIMM = facilities.Has(eimm)
16 |
17 | // optional
18 | S390X.HasETF3EH = facilities.Has(etf3eh)
19 | S390X.HasDFP = facilities.Has(dfp)
20 | S390X.HasMSA = facilities.Has(msa)
21 | S390X.HasVX = facilities.Has(vx)
22 | if S390X.HasVX {
23 | S390X.HasVXE = facilities.Has(vxe)
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/endian_big.go:
--------------------------------------------------------------------------------
1 | // Copyright 2023 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64
6 |
7 | package cpu
8 |
9 | // IsBigEndian records whether the GOARCH's byte order is big endian.
10 | const IsBigEndian = true
11 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/endian_little.go:
--------------------------------------------------------------------------------
1 | // Copyright 2023 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh || wasm
6 |
7 | package cpu
8 |
9 | // IsBigEndian records whether the GOARCH's byte order is big endian.
10 | const IsBigEndian = false
11 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/parse.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cpu
6 |
7 | import "strconv"
8 |
9 | // parseRelease parses a dot-separated version number. It follows the semver
10 | // syntax, but allows the minor and patch versions to be elided.
11 | //
12 | // This is a copy of the Go runtime's parseRelease from
13 | // https://golang.org/cl/209597.
14 | func parseRelease(rel string) (major, minor, patch int, ok bool) {
15 | // Strip anything after a dash or plus.
16 | for i := 0; i < len(rel); i++ {
17 | if rel[i] == '-' || rel[i] == '+' {
18 | rel = rel[:i]
19 | break
20 | }
21 | }
22 |
23 | next := func() (int, bool) {
24 | for i := 0; i < len(rel); i++ {
25 | if rel[i] == '.' {
26 | ver, err := strconv.Atoi(rel[:i])
27 | rel = rel[i+1:]
28 | return ver, err == nil
29 | }
30 | }
31 | ver, err := strconv.Atoi(rel)
32 | rel = ""
33 | return ver, err == nil
34 | }
35 | if major, ok = next(); !ok || rel == "" {
36 | return
37 | }
38 | if minor, ok = next(); !ok || rel == "" {
39 | return
40 | }
41 | patch, ok = next()
42 | return
43 | }
44 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/runtime_auxv.go:
--------------------------------------------------------------------------------
1 | // Copyright 2023 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cpu
6 |
7 | // getAuxvFn is non-nil on Go 1.21+ (via runtime_auxv_go121.go init)
8 | // on platforms that use auxv.
9 | var getAuxvFn func() []uintptr
10 |
11 | func getAuxv() []uintptr {
12 | if getAuxvFn == nil {
13 | return nil
14 | }
15 | return getAuxvFn()
16 | }
17 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go:
--------------------------------------------------------------------------------
1 | // Copyright 2023 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build go1.21
6 |
7 | package cpu
8 |
9 | import (
10 | _ "unsafe" // for linkname
11 | )
12 |
13 | //go:linkname runtime_getAuxv runtime.getAuxv
14 | func runtime_getAuxv() []uintptr
15 |
16 | func init() {
17 | getAuxvFn = runtime_getAuxv
18 | }
19 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Recreate a getsystemcfg syscall handler instead of
6 | // using the one provided by x/sys/unix to avoid having
7 | // the dependency between them. (See golang.org/issue/32102)
8 | // Moreover, this file will be used during the building of
9 | // gccgo's libgo and thus must not used a CGo method.
10 |
11 | //go:build aix && gccgo
12 |
13 | package cpu
14 |
15 | import (
16 | "syscall"
17 | )
18 |
19 | //extern getsystemcfg
20 | func gccgoGetsystemcfg(label uint32) (r uint64)
21 |
22 | func callgetsystemcfg(label int) (r1 uintptr, e1 syscall.Errno) {
23 | r1 = uintptr(gccgoGetsystemcfg(uint32(label)))
24 | e1 = syscall.GetErrno()
25 | return
26 | }
27 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Minimal copy of x/sys/unix so the cpu package can make a
6 | // system call on AIX without depending on x/sys/unix.
7 | // (See golang.org/issue/32102)
8 |
9 | //go:build aix && ppc64 && gc
10 |
11 | package cpu
12 |
13 | import (
14 | "syscall"
15 | "unsafe"
16 | )
17 |
18 | //go:cgo_import_dynamic libc_getsystemcfg getsystemcfg "libc.a/shr_64.o"
19 |
20 | //go:linkname libc_getsystemcfg libc_getsystemcfg
21 |
22 | type syscallFunc uintptr
23 |
24 | var libc_getsystemcfg syscallFunc
25 |
26 | type errno = syscall.Errno
27 |
28 | // Implemented in runtime/syscall_aix.go.
29 | func rawSyscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err errno)
30 | func syscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err errno)
31 |
32 | func callgetsystemcfg(label int) (r1 uintptr, e1 errno) {
33 | r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getsystemcfg)), 1, uintptr(label), 0, 0, 0, 0, 0)
34 | return
35 | }
36 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/.gitignore:
--------------------------------------------------------------------------------
1 | _obj/
2 | unix.test
3 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/aliases.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | type Signal = syscall.Signal
12 | type Errno = syscall.Errno
13 | type SysProcAttr = syscall.SysProcAttr
14 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gc
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go
11 | //
12 |
13 | TEXT ·syscall6(SB),NOSPLIT,$0-88
14 | JMP syscall·syscall6(SB)
15 |
16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88
17 | JMP syscall·rawSyscall6(SB)
18 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/asm_bsd_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (freebsd || netbsd || openbsd) && gc
6 |
7 | #include "textflag.h"
8 |
9 | // System call support for 386 BSD
10 |
11 | // Just jump to package syscall's implementation for all these functions.
12 | // The runtime may know about them.
13 |
14 | TEXT ·Syscall(SB),NOSPLIT,$0-28
15 | JMP syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
18 | JMP syscall·Syscall6(SB)
19 |
20 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
21 | JMP syscall·Syscall9(SB)
22 |
23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
24 | JMP syscall·RawSyscall(SB)
25 |
26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
27 | JMP syscall·RawSyscall6(SB)
28 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/asm_bsd_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc
6 |
7 | #include "textflag.h"
8 |
9 | // System call support for AMD64 BSD
10 |
11 | // Just jump to package syscall's implementation for all these functions.
12 | // The runtime may know about them.
13 |
14 | TEXT ·Syscall(SB),NOSPLIT,$0-56
15 | JMP syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
18 | JMP syscall·Syscall6(SB)
19 |
20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
21 | JMP syscall·Syscall9(SB)
22 |
23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
24 | JMP syscall·RawSyscall(SB)
25 |
26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
27 | JMP syscall·RawSyscall6(SB)
28 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/asm_bsd_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (freebsd || netbsd || openbsd) && gc
6 |
7 | #include "textflag.h"
8 |
9 | // System call support for ARM BSD
10 |
11 | // Just jump to package syscall's implementation for all these functions.
12 | // The runtime may know about them.
13 |
14 | TEXT ·Syscall(SB),NOSPLIT,$0-28
15 | B syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
18 | B syscall·Syscall6(SB)
19 |
20 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
21 | B syscall·Syscall9(SB)
22 |
23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
24 | B syscall·RawSyscall(SB)
25 |
26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
27 | B syscall·RawSyscall6(SB)
28 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/asm_bsd_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc
6 |
7 | #include "textflag.h"
8 |
9 | // System call support for ARM64 BSD
10 |
11 | // Just jump to package syscall's implementation for all these functions.
12 | // The runtime may know about them.
13 |
14 | TEXT ·Syscall(SB),NOSPLIT,$0-56
15 | JMP syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
18 | JMP syscall·Syscall6(SB)
19 |
20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
21 | JMP syscall·Syscall9(SB)
22 |
23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
24 | JMP syscall·RawSyscall(SB)
25 |
26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
27 | JMP syscall·RawSyscall6(SB)
28 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ppc64, BSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc
6 |
7 | #include "textflag.h"
8 |
9 | // System call support for RISCV64 BSD
10 |
11 | // Just jump to package syscall's implementation for all these functions.
12 | // The runtime may know about them.
13 |
14 | TEXT ·Syscall(SB),NOSPLIT,$0-56
15 | JMP syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
18 | JMP syscall·Syscall6(SB)
19 |
20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
21 | JMP syscall·Syscall9(SB)
22 |
23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
24 | JMP syscall·RawSyscall(SB)
25 |
26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
27 | JMP syscall·RawSyscall6(SB)
28 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && (ppc64 || ppc64le) && gc
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for ppc64, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
17 | BL runtime·entersyscall(SB)
18 | MOVD a1+8(FP), R3
19 | MOVD a2+16(FP), R4
20 | MOVD a3+24(FP), R5
21 | MOVD R0, R6
22 | MOVD R0, R7
23 | MOVD R0, R8
24 | MOVD trap+0(FP), R9 // syscall entry
25 | SYSCALL R9
26 | MOVD R3, r1+32(FP)
27 | MOVD R4, r2+40(FP)
28 | BL runtime·exitsyscall(SB)
29 | RET
30 |
31 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
32 | MOVD a1+8(FP), R3
33 | MOVD a2+16(FP), R4
34 | MOVD a3+24(FP), R5
35 | MOVD R0, R6
36 | MOVD R0, R7
37 | MOVD R0, R8
38 | MOVD trap+0(FP), R9 // syscall entry
39 | SYSCALL R9
40 | MOVD R3, r1+32(FP)
41 | MOVD R4, r2+40(FP)
42 | RET
43 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gc
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for mips64, OpenBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gc
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go
11 | //
12 |
13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88
14 | JMP syscall·sysvicall6(SB)
15 |
16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88
17 | JMP syscall·rawSysvicall6(SB)
18 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/bluetooth_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Bluetooth sockets and messages
6 |
7 | package unix
8 |
9 | // Bluetooth Protocols
10 | const (
11 | BTPROTO_L2CAP = 0
12 | BTPROTO_HCI = 1
13 | BTPROTO_SCO = 2
14 | BTPROTO_RFCOMM = 3
15 | BTPROTO_BNEP = 4
16 | BTPROTO_CMTP = 5
17 | BTPROTO_HIDP = 6
18 | BTPROTO_AVDTP = 7
19 | )
20 |
21 | const (
22 | HCI_CHANNEL_RAW = 0
23 | HCI_CHANNEL_USER = 1
24 | HCI_CHANNEL_MONITOR = 2
25 | HCI_CHANNEL_CONTROL = 3
26 | HCI_CHANNEL_LOGGING = 4
27 | )
28 |
29 | // Socketoption Level
30 | const (
31 | SOL_BLUETOOTH = 0x112
32 | SOL_HCI = 0x0
33 | SOL_L2CAP = 0x6
34 | SOL_RFCOMM = 0x12
35 | SOL_SCO = 0x11
36 | )
37 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/constants.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
6 |
7 | package unix
8 |
9 | const (
10 | R_OK = 0x4
11 | W_OK = 0x2
12 | X_OK = 0x1
13 | )
14 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/dev_aix_ppc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix && ppc
6 |
7 | // Functions to access/create device major and minor numbers matching the
8 | // encoding used by AIX.
9 |
10 | package unix
11 |
12 | // Major returns the major component of a Linux device number.
13 | func Major(dev uint64) uint32 {
14 | return uint32((dev >> 16) & 0xffff)
15 | }
16 |
17 | // Minor returns the minor component of a Linux device number.
18 | func Minor(dev uint64) uint32 {
19 | return uint32(dev & 0xffff)
20 | }
21 |
22 | // Mkdev returns a Linux device number generated from the given major and minor
23 | // components.
24 | func Mkdev(major, minor uint32) uint64 {
25 | return uint64(((major) << 16) | (minor))
26 | }
27 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix && ppc64
6 |
7 | // Functions to access/create device major and minor numbers matching the
8 | // encoding used AIX.
9 |
10 | package unix
11 |
12 | // Major returns the major component of a Linux device number.
13 | func Major(dev uint64) uint32 {
14 | return uint32((dev & 0x3fffffff00000000) >> 32)
15 | }
16 |
17 | // Minor returns the minor component of a Linux device number.
18 | func Minor(dev uint64) uint32 {
19 | return uint32((dev & 0x00000000ffffffff) >> 0)
20 | }
21 |
22 | // Mkdev returns a Linux device number generated from the given major and minor
23 | // components.
24 | func Mkdev(major, minor uint32) uint64 {
25 | var DEVNO64 uint64
26 | DEVNO64 = 0x8000000000000000
27 | return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64)
28 | }
29 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/dev_darwin.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in Darwin's sys/types.h header.
7 |
8 | package unix
9 |
10 | // Major returns the major component of a Darwin device number.
11 | func Major(dev uint64) uint32 {
12 | return uint32((dev >> 24) & 0xff)
13 | }
14 |
15 | // Minor returns the minor component of a Darwin device number.
16 | func Minor(dev uint64) uint32 {
17 | return uint32(dev & 0xffffff)
18 | }
19 |
20 | // Mkdev returns a Darwin device number generated from the given major and minor
21 | // components.
22 | func Mkdev(major, minor uint32) uint64 {
23 | return (uint64(major) << 24) | uint64(minor)
24 | }
25 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/dev_dragonfly.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in Dragonfly's sys/types.h header.
7 | //
8 | // The information below is extracted and adapted from sys/types.h:
9 | //
10 | // Minor gives a cookie instead of an index since in order to avoid changing the
11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for
12 | // devices that don't use them.
13 |
14 | package unix
15 |
16 | // Major returns the major component of a DragonFlyBSD device number.
17 | func Major(dev uint64) uint32 {
18 | return uint32((dev >> 8) & 0xff)
19 | }
20 |
21 | // Minor returns the minor component of a DragonFlyBSD device number.
22 | func Minor(dev uint64) uint32 {
23 | return uint32(dev & 0xffff00ff)
24 | }
25 |
26 | // Mkdev returns a DragonFlyBSD device number generated from the given major and
27 | // minor components.
28 | func Mkdev(major, minor uint32) uint64 {
29 | return (uint64(major) << 8) | uint64(minor)
30 | }
31 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/dev_freebsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in FreeBSD's sys/types.h header.
7 | //
8 | // The information below is extracted and adapted from sys/types.h:
9 | //
10 | // Minor gives a cookie instead of an index since in order to avoid changing the
11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for
12 | // devices that don't use them.
13 |
14 | package unix
15 |
16 | // Major returns the major component of a FreeBSD device number.
17 | func Major(dev uint64) uint32 {
18 | return uint32((dev >> 8) & 0xff)
19 | }
20 |
21 | // Minor returns the minor component of a FreeBSD device number.
22 | func Minor(dev uint64) uint32 {
23 | return uint32(dev & 0xffff00ff)
24 | }
25 |
26 | // Mkdev returns a FreeBSD device number generated from the given major and
27 | // minor components.
28 | func Mkdev(major, minor uint32) uint64 {
29 | return (uint64(major) << 8) | uint64(minor)
30 | }
31 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/dev_netbsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in NetBSD's sys/types.h header.
7 |
8 | package unix
9 |
10 | // Major returns the major component of a NetBSD device number.
11 | func Major(dev uint64) uint32 {
12 | return uint32((dev & 0x000fff00) >> 8)
13 | }
14 |
15 | // Minor returns the minor component of a NetBSD device number.
16 | func Minor(dev uint64) uint32 {
17 | minor := uint32((dev & 0x000000ff) >> 0)
18 | minor |= uint32((dev & 0xfff00000) >> 12)
19 | return minor
20 | }
21 |
22 | // Mkdev returns a NetBSD device number generated from the given major and minor
23 | // components.
24 | func Mkdev(major, minor uint32) uint64 {
25 | dev := (uint64(major) << 8) & 0x000fff00
26 | dev |= (uint64(minor) << 12) & 0xfff00000
27 | dev |= (uint64(minor) << 0) & 0x000000ff
28 | return dev
29 | }
30 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/dev_openbsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in OpenBSD's sys/types.h header.
7 |
8 | package unix
9 |
10 | // Major returns the major component of an OpenBSD device number.
11 | func Major(dev uint64) uint32 {
12 | return uint32((dev & 0x0000ff00) >> 8)
13 | }
14 |
15 | // Minor returns the minor component of an OpenBSD device number.
16 | func Minor(dev uint64) uint32 {
17 | minor := uint32((dev & 0x000000ff) >> 0)
18 | minor |= uint32((dev & 0xffff0000) >> 8)
19 | return minor
20 | }
21 |
22 | // Mkdev returns an OpenBSD device number generated from the given major and minor
23 | // components.
24 | func Mkdev(major, minor uint32) uint64 {
25 | dev := (uint64(major) << 8) & 0x0000ff00
26 | dev |= (uint64(minor) << 8) & 0xffff0000
27 | dev |= (uint64(minor) << 0) & 0x000000ff
28 | return dev
29 | }
30 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/dev_zos.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build zos && s390x
6 |
7 | // Functions to access/create device major and minor numbers matching the
8 | // encoding used by z/OS.
9 | //
10 | // The information below is extracted and adapted from macros.
11 |
12 | package unix
13 |
14 | // Major returns the major component of a z/OS device number.
15 | func Major(dev uint64) uint32 {
16 | return uint32((dev >> 16) & 0x0000FFFF)
17 | }
18 |
19 | // Minor returns the minor component of a z/OS device number.
20 | func Minor(dev uint64) uint32 {
21 | return uint32(dev & 0x0000FFFF)
22 | }
23 |
24 | // Mkdev returns a z/OS device number generated from the given major and minor
25 | // components.
26 | func Mkdev(major, minor uint32) uint64 {
27 | return (uint64(major) << 16) | uint64(minor)
28 | }
29 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/endian_big.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 | //
5 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64
6 |
7 | package unix
8 |
9 | const isBigEndian = true
10 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/endian_little.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 | //
5 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh
6 |
7 | package unix
8 |
9 | const isBigEndian = false
10 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/env_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
6 |
7 | // Unix environment variables.
8 |
9 | package unix
10 |
11 | import "syscall"
12 |
13 | func Getenv(key string) (value string, found bool) {
14 | return syscall.Getenv(key)
15 | }
16 |
17 | func Setenv(key, value string) error {
18 | return syscall.Setenv(key, value)
19 | }
20 |
21 | func Clearenv() {
22 | syscall.Clearenv()
23 | }
24 |
25 | func Environ() []string {
26 | return syscall.Environ()
27 | }
28 |
29 | func Unsetenv(key string) error {
30 | return syscall.Unsetenv(key)
31 | }
32 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/fcntl_darwin.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package unix
6 |
7 | import "unsafe"
8 |
9 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument.
10 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
11 | return fcntl(int(fd), cmd, arg)
12 | }
13 |
14 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
15 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
16 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk))))
17 | return err
18 | }
19 |
20 | // FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command.
21 | func FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error {
22 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore))))
23 | return err
24 | }
25 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc)
6 |
7 | package unix
8 |
9 | func init() {
10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's
11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL.
12 | fcntl64Syscall = SYS_FCNTL64
13 | }
14 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/fdset.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
6 |
7 | package unix
8 |
9 | // Set adds fd to the set fds.
10 | func (fds *FdSet) Set(fd int) {
11 | fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS))
12 | }
13 |
14 | // Clear removes fd from the set fds.
15 | func (fds *FdSet) Clear(fd int) {
16 | fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS))
17 | }
18 |
19 | // IsSet returns whether fd is in the set fds.
20 | func (fds *FdSet) IsSet(fd int) bool {
21 | return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0
22 | }
23 |
24 | // Zero clears the set fds.
25 | func (fds *FdSet) Zero() {
26 | for i := range fds.Bits {
27 | fds.Bits[i] = 0
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gccgo && linux && amd64
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | //extern gettimeofday
12 | func realGettimeofday(*Timeval, *byte) int32
13 |
14 | func gettimeofday(tv *Timeval) (err syscall.Errno) {
15 | r := realGettimeofday(tv, nil)
16 | if r < 0 {
17 | return syscall.GetErrno()
18 | }
19 | return 0
20 | }
21 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/mmap_nomremap.go:
--------------------------------------------------------------------------------
1 | // Copyright 2023 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || darwin || dragonfly || freebsd || openbsd || solaris || zos
6 |
7 | package unix
8 |
9 | var mapper = &mmapper{
10 | active: make(map[*byte][]byte),
11 | mmap: mmap,
12 | munmap: munmap,
13 | }
14 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/pagesize_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
6 |
7 | // For Unix, get the pagesize from the runtime.
8 |
9 | package unix
10 |
11 | import "syscall"
12 |
13 | func Getpagesize() int {
14 | return syscall.Getpagesize()
15 | }
16 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/ptrace_darwin.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build darwin && !ios
6 |
7 | package unix
8 |
9 | func ptrace(request int, pid int, addr uintptr, data uintptr) error {
10 | return ptrace1(request, pid, addr, data)
11 | }
12 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/ptrace_ios.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build ios
6 |
7 | package unix
8 |
9 | func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
10 | return ENOTSUP
11 | }
12 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/race.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (darwin && race) || (linux && race) || (freebsd && race)
6 |
7 | package unix
8 |
9 | import (
10 | "runtime"
11 | "unsafe"
12 | )
13 |
14 | const raceenabled = true
15 |
16 | func raceAcquire(addr unsafe.Pointer) {
17 | runtime.RaceAcquire(addr)
18 | }
19 |
20 | func raceReleaseMerge(addr unsafe.Pointer) {
21 | runtime.RaceReleaseMerge(addr)
22 | }
23 |
24 | func raceReadRange(addr unsafe.Pointer, len int) {
25 | runtime.RaceReadRange(addr, len)
26 | }
27 |
28 | func raceWriteRange(addr unsafe.Pointer, len int) {
29 | runtime.RaceWriteRange(addr, len)
30 | }
31 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/race0.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos
6 |
7 | package unix
8 |
9 | import (
10 | "unsafe"
11 | )
12 |
13 | const raceenabled = false
14 |
15 | func raceAcquire(addr unsafe.Pointer) {
16 | }
17 |
18 | func raceReleaseMerge(addr unsafe.Pointer) {
19 | }
20 |
21 | func raceReadRange(addr unsafe.Pointer, len int) {
22 | }
23 |
24 | func raceWriteRange(addr unsafe.Pointer, len int) {
25 | }
26 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/readdirent_getdents.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || dragonfly || freebsd || linux || netbsd || openbsd
6 |
7 | package unix
8 |
9 | // ReadDirent reads directory entries from fd and writes them into buf.
10 | func ReadDirent(fd int, buf []byte) (n int, err error) {
11 | return Getdents(fd, buf)
12 | }
13 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build darwin || zos
6 |
7 | package unix
8 |
9 | import "unsafe"
10 |
11 | // ReadDirent reads directory entries from fd and writes them into buf.
12 | func ReadDirent(fd int, buf []byte) (n int, err error) {
13 | // Final argument is (basep *uintptr) and the syscall doesn't take nil.
14 | // 64 bits should be enough. (32 bits isn't even on 386). Since the
15 | // actual system call is getdirentries64, 64 is a good guess.
16 | // TODO(rsc): Can we use a single global basep for all calls?
17 | var base = (*uintptr)(unsafe.Pointer(new(uint64)))
18 | return Getdirentries(fd, buf, base)
19 | }
20 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package unix
6 |
7 | // Round the length of a raw sockaddr up to align it properly.
8 | func cmsgAlignOf(salen int) int {
9 | salign := SizeofPtr
10 | if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) {
11 | // 64-bit Dragonfly before the September 2019 ABI changes still requires
12 | // 32-bit aligned access to network subsystem.
13 | salign = 4
14 | }
15 | return (salen + salign - 1) & ^(salign - 1)
16 | }
17 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/syscall_hurd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build hurd
6 |
7 | package unix
8 |
9 | /*
10 | #include
11 | int ioctl(int, unsigned long int, uintptr_t);
12 | */
13 | import "C"
14 | import "unsafe"
15 |
16 | func ioctl(fd int, req uint, arg uintptr) (err error) {
17 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg))
18 | if r0 == -1 && er != nil {
19 | err = er
20 | }
21 | return
22 | }
23 |
24 | func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
25 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(uintptr(arg)))
26 | if r0 == -1 && er != nil {
27 | err = er
28 | }
29 | return
30 | }
31 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/syscall_hurd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build 386 && hurd
6 |
7 | package unix
8 |
9 | const (
10 | TIOCGETA = 0x62251713
11 | )
12 |
13 | type Winsize struct {
14 | Row uint16
15 | Col uint16
16 | Xpixel uint16
17 | Ypixel uint16
18 | }
19 |
20 | type Termios struct {
21 | Iflag uint32
22 | Oflag uint32
23 | Cflag uint32
24 | Lflag uint32
25 | Cc [20]uint8
26 | Ispeed int32
27 | Ospeed int32
28 | }
29 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/syscall_linux_alarm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64)
6 |
7 | package unix
8 |
9 | // SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH
10 | // values.
11 |
12 | //sys Alarm(seconds uint) (remaining uint, err error)
13 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build amd64 && linux && gc
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | //go:noescape
12 | func gettimeofday(tv *Timeval) (err syscall.Errno)
13 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/syscall_linux_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && gc
6 |
7 | package unix
8 |
9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail.
10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
11 |
12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't
13 | // fail.
14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
15 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && gc && 386
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | // Underlying system call writes to newoffset via pointer.
12 | // Implemented in assembly to avoid allocation.
13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
14 |
15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
17 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build arm && gc && linux
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | // Underlying system call writes to newoffset via pointer.
12 | // Implemented in assembly to avoid allocation.
13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
14 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && gccgo && 386
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
15 | var newoffset int64
16 | offsetLow := uint32(offset & 0xffffffff)
17 | offsetHigh := uint32((offset >> 32) & 0xffffffff)
18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
19 | return newoffset, err
20 | }
21 |
22 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) {
23 | fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0)
24 | return int(fd), err
25 | }
26 |
27 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) {
28 | fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0)
29 | return int(fd), err
30 | }
31 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && gccgo && arm
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
15 | var newoffset int64
16 | offsetLow := uint32(offset & 0xffffffff)
17 | offsetHigh := uint32((offset >> 32) & 0xffffffff)
18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
19 | return newoffset, err
20 | }
21 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build 386 && netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = int32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build amd64 && netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = int32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build arm && netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = int32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build arm64 && netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = int32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build 386 && openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/386 the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build amd64 && openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build arm && openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/arm the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build arm64 && openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package unix
6 |
7 | func setTimespec(sec, nsec int64) Timespec {
8 | return Timespec{Sec: sec, Nsec: nsec}
9 | }
10 |
11 | func setTimeval(sec, usec int64) Timeval {
12 | return Timeval{Sec: sec, Usec: usec}
13 | }
14 |
15 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
16 | k.Ident = uint64(fd)
17 | k.Filter = int16(mode)
18 | k.Flags = uint16(flags)
19 | }
20 |
21 | func (iov *Iovec) SetLen(length int) {
22 | iov.Len = uint64(length)
23 | }
24 |
25 | func (msghdr *Msghdr) SetControllen(length int) {
26 | msghdr.Controllen = uint32(length)
27 | }
28 |
29 | func (msghdr *Msghdr) SetIovlen(length int) {
30 | msghdr.Iovlen = uint32(length)
31 | }
32 |
33 | func (cmsg *Cmsghdr) SetLen(length int) {
34 | cmsg.Len = uint32(length)
35 | }
36 |
37 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
38 | // of OpenBSD the syscall is called sysctl instead of __sysctl.
39 | const SYS___SYSCTL = SYS_SYSCTL
40 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build ppc64 && openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/ppc64 the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build riscv64 && openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/riscv64 the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build amd64 && solaris
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func (iov *Iovec) SetLen(length int) {
18 | iov.Len = uint64(length)
19 | }
20 |
21 | func (msghdr *Msghdr) SetIovlen(length int) {
22 | msghdr.Iovlen = int32(length)
23 | }
24 |
25 | func (cmsg *Cmsghdr) SetLen(length int) {
26 | cmsg.Len = uint32(length)
27 | }
28 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/syscall_unix_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
12 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
13 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
14 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
15 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && (ppc64le || ppc64) && gc
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
12 | return syscall.Syscall(trap, a1, a2, a3)
13 | }
14 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
15 | return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6)
16 | }
17 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
18 | return syscall.RawSyscall(trap, a1, a2, a3)
19 | }
20 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
21 | return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6)
22 | }
23 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/sysvshm_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux
6 |
7 | package unix
8 |
9 | import "runtime"
10 |
11 | // SysvShmCtl performs control operations on the shared memory segment
12 | // specified by id.
13 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
14 | if runtime.GOARCH == "arm" ||
15 | runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" {
16 | cmd |= ipc_64
17 | }
18 |
19 | return shmctl(id, cmd, desc)
20 | }
21 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (darwin && !ios) || zos
6 |
7 | package unix
8 |
9 | // SysvShmCtl performs control operations on the shared memory segment
10 | // specified by id.
11 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
12 | return shmctl(id, cmd, desc)
13 | }
14 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/vgetrandom_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2024 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && go1.24
6 |
7 | package unix
8 |
9 | import _ "unsafe"
10 |
11 | //go:linkname vgetrandom runtime.vgetrandom
12 | //go:noescape
13 | func vgetrandom(p []byte, flags uint32) (ret int, supported bool)
14 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go:
--------------------------------------------------------------------------------
1 | // Copyright 2024 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !linux || !go1.24
6 |
7 | package unix
8 |
9 | func vgetrandom(p []byte, flags uint32) (ret int, supported bool) {
10 | return -1, false
11 | }
12 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go:
--------------------------------------------------------------------------------
1 | // Code generated by linux/mkall.go generatePtraceRegSet("arm64"). DO NOT EDIT.
2 |
3 | package unix
4 |
5 | import "unsafe"
6 |
7 | // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries.
8 | func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error {
9 | iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))}
10 | return ptracePtr(PTRACE_GETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec))
11 | }
12 |
13 | // PtraceSetRegSetArm64 sets the registers used by arm64 binaries.
14 | func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error {
15 | iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))}
16 | return ptracePtr(PTRACE_SETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec))
17 | }
18 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/windows/aliases.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build windows
6 |
7 | package windows
8 |
9 | import "syscall"
10 |
11 | type Errno = syscall.Errno
12 | type SysProcAttr = syscall.SysProcAttr
13 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/windows/eventlog.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build windows
6 |
7 | package windows
8 |
9 | const (
10 | EVENTLOG_SUCCESS = 0
11 | EVENTLOG_ERROR_TYPE = 1
12 | EVENTLOG_WARNING_TYPE = 2
13 | EVENTLOG_INFORMATION_TYPE = 4
14 | EVENTLOG_AUDIT_SUCCESS = 8
15 | EVENTLOG_AUDIT_FAILURE = 16
16 | )
17 |
18 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW
19 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource
20 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW
21 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/windows/mksyscall.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build generate
6 |
7 | package windows
8 |
9 | //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go setupapi_windows.go
10 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/windows/race.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build windows && race
6 |
7 | package windows
8 |
9 | import (
10 | "runtime"
11 | "unsafe"
12 | )
13 |
14 | const raceenabled = true
15 |
16 | func raceAcquire(addr unsafe.Pointer) {
17 | runtime.RaceAcquire(addr)
18 | }
19 |
20 | func raceReleaseMerge(addr unsafe.Pointer) {
21 | runtime.RaceReleaseMerge(addr)
22 | }
23 |
24 | func raceReadRange(addr unsafe.Pointer, len int) {
25 | runtime.RaceReadRange(addr, len)
26 | }
27 |
28 | func raceWriteRange(addr unsafe.Pointer, len int) {
29 | runtime.RaceWriteRange(addr, len)
30 | }
31 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/windows/race0.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build windows && !race
6 |
7 | package windows
8 |
9 | import (
10 | "unsafe"
11 | )
12 |
13 | const raceenabled = false
14 |
15 | func raceAcquire(addr unsafe.Pointer) {
16 | }
17 |
18 | func raceReleaseMerge(addr unsafe.Pointer) {
19 | }
20 |
21 | func raceReadRange(addr unsafe.Pointer, len int) {
22 | }
23 |
24 | func raceWriteRange(addr unsafe.Pointer, len int) {
25 | }
26 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/windows/str.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build windows
6 |
7 | package windows
8 |
9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency
10 | if val < 0 {
11 | return "-" + itoa(-val)
12 | }
13 | var buf [32]byte // big enough for int64
14 | i := len(buf) - 1
15 | for val >= 10 {
16 | buf[i] = byte(val%10 + '0')
17 | i--
18 | val /= 10
19 | }
20 | buf[i] = byte(val + '0')
21 | return string(buf[i:])
22 | }
23 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/windows/types_windows_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package windows
6 |
7 | type WSAData struct {
8 | Version uint16
9 | HighVersion uint16
10 | Description [WSADESCRIPTION_LEN + 1]byte
11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte
12 | MaxSockets uint16
13 | MaxUdpDg uint16
14 | VendorInfo *byte
15 | }
16 |
17 | type Servent struct {
18 | Name *byte
19 | Aliases **byte
20 | Port uint16
21 | Proto *byte
22 | }
23 |
24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct {
25 | PerProcessUserTimeLimit int64
26 | PerJobUserTimeLimit int64
27 | LimitFlags uint32
28 | MinimumWorkingSetSize uintptr
29 | MaximumWorkingSetSize uintptr
30 | ActiveProcessLimit uint32
31 | Affinity uintptr
32 | PriorityClass uint32
33 | SchedulingClass uint32
34 | _ uint32 // pad to 8 byte boundary
35 | }
36 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/windows/types_windows_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package windows
6 |
7 | type WSAData struct {
8 | Version uint16
9 | HighVersion uint16
10 | MaxSockets uint16
11 | MaxUdpDg uint16
12 | VendorInfo *byte
13 | Description [WSADESCRIPTION_LEN + 1]byte
14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte
15 | }
16 |
17 | type Servent struct {
18 | Name *byte
19 | Aliases **byte
20 | Proto *byte
21 | Port uint16
22 | }
23 |
24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct {
25 | PerProcessUserTimeLimit int64
26 | PerJobUserTimeLimit int64
27 | LimitFlags uint32
28 | MinimumWorkingSetSize uintptr
29 | MaximumWorkingSetSize uintptr
30 | ActiveProcessLimit uint32
31 | Affinity uintptr
32 | PriorityClass uint32
33 | SchedulingClass uint32
34 | }
35 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/windows/types_windows_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package windows
6 |
7 | type WSAData struct {
8 | Version uint16
9 | HighVersion uint16
10 | Description [WSADESCRIPTION_LEN + 1]byte
11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte
12 | MaxSockets uint16
13 | MaxUdpDg uint16
14 | VendorInfo *byte
15 | }
16 |
17 | type Servent struct {
18 | Name *byte
19 | Aliases **byte
20 | Port uint16
21 | Proto *byte
22 | }
23 |
24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct {
25 | PerProcessUserTimeLimit int64
26 | PerJobUserTimeLimit int64
27 | LimitFlags uint32
28 | MinimumWorkingSetSize uintptr
29 | MaximumWorkingSetSize uintptr
30 | ActiveProcessLimit uint32
31 | Affinity uintptr
32 | PriorityClass uint32
33 | SchedulingClass uint32
34 | _ uint32 // pad to 8 byte boundary
35 | }
36 |
--------------------------------------------------------------------------------
/gateway/vendor/golang.org/x/sys/windows/types_windows_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package windows
6 |
7 | type WSAData struct {
8 | Version uint16
9 | HighVersion uint16
10 | MaxSockets uint16
11 | MaxUdpDg uint16
12 | VendorInfo *byte
13 | Description [WSADESCRIPTION_LEN + 1]byte
14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte
15 | }
16 |
17 | type Servent struct {
18 | Name *byte
19 | Aliases **byte
20 | Proto *byte
21 | Port uint16
22 | }
23 |
24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct {
25 | PerProcessUserTimeLimit int64
26 | PerJobUserTimeLimit int64
27 | LimitFlags uint32
28 | MinimumWorkingSetSize uintptr
29 | MaximumWorkingSetSize uintptr
30 | ActiveProcessLimit uint32
31 | Affinity uintptr
32 | PriorityClass uint32
33 | SchedulingClass uint32
34 | }
35 |
--------------------------------------------------------------------------------
/gateway/vendor/google.golang.org/protobuf/encoding/prototext/doc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Package prototext marshals and unmarshals protocol buffer messages as the
6 | // textproto format.
7 | package prototext
8 |
--------------------------------------------------------------------------------
/gateway/vendor/google.golang.org/protobuf/internal/editiondefaults/defaults.go:
--------------------------------------------------------------------------------
1 | // Copyright 2024 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Package editiondefaults contains the binary representation of the editions
6 | // defaults.
7 | package editiondefaults
8 |
9 | import _ "embed"
10 |
11 | //go:embed editions_defaults.binpb
12 | var Defaults []byte
13 |
--------------------------------------------------------------------------------
/gateway/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openfaas/faas/7803ea1861f2a22adcbcfa8c79ed539bc6506d5b/gateway/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb
--------------------------------------------------------------------------------
/gateway/vendor/google.golang.org/protobuf/internal/errors/is_go112.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !go1.13
6 | // +build !go1.13
7 |
8 | package errors
9 |
10 | import "reflect"
11 |
12 | // Is is a copy of Go 1.13's errors.Is for use with older Go versions.
13 | func Is(err, target error) bool {
14 | if target == nil {
15 | return err == target
16 | }
17 |
18 | isComparable := reflect.TypeOf(target).Comparable()
19 | for {
20 | if isComparable && err == target {
21 | return true
22 | }
23 | if x, ok := err.(interface{ Is(error) bool }); ok && x.Is(target) {
24 | return true
25 | }
26 | if err = unwrap(err); err == nil {
27 | return false
28 | }
29 | }
30 | }
31 |
32 | func unwrap(err error) error {
33 | u, ok := err.(interface {
34 | Unwrap() error
35 | })
36 | if !ok {
37 | return nil
38 | }
39 | return u.Unwrap()
40 | }
41 |
--------------------------------------------------------------------------------
/gateway/vendor/google.golang.org/protobuf/internal/errors/is_go113.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build go1.13
6 | // +build go1.13
7 |
8 | package errors
9 |
10 | import "errors"
11 |
12 | // Is is errors.Is.
13 | func Is(err, target error) bool { return errors.Is(err, target) }
14 |
--------------------------------------------------------------------------------
/gateway/vendor/google.golang.org/protobuf/internal/flags/flags.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Package flags provides a set of flags controlled by build tags.
6 | package flags
7 |
8 | // ProtoLegacy specifies whether to enable support for legacy functionality
9 | // such as MessageSets, weak fields, and various other obscure behavior
10 | // that is necessary to maintain backwards compatibility with proto1 or
11 | // the pre-release variants of proto2 and proto3.
12 | //
13 | // This is disabled by default unless built with the "protolegacy" tag.
14 | //
15 | // WARNING: The compatibility agreement covers nothing provided by this flag.
16 | // As such, functionality may suddenly be removed or changed at our discretion.
17 | const ProtoLegacy = protoLegacy
18 |
19 | // LazyUnmarshalExtensions specifies whether to lazily unmarshal extensions.
20 | //
21 | // Lazy extension unmarshaling validates the contents of message-valued
22 | // extension fields at unmarshal time, but defers creating the message
23 | // structure until the extension is first accessed.
24 | const LazyUnmarshalExtensions = ProtoLegacy
25 |
--------------------------------------------------------------------------------
/gateway/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !protolegacy
6 | // +build !protolegacy
7 |
8 | package flags
9 |
10 | const protoLegacy = false
11 |
--------------------------------------------------------------------------------
/gateway/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build protolegacy
6 | // +build protolegacy
7 |
8 | package flags
9 |
10 | const protoLegacy = true
11 |
--------------------------------------------------------------------------------
/gateway/vendor/google.golang.org/protobuf/internal/genid/any_gen.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Code generated by generate-protos. DO NOT EDIT.
6 |
7 | package genid
8 |
9 | import (
10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect"
11 | )
12 |
13 | const File_google_protobuf_any_proto = "google/protobuf/any.proto"
14 |
15 | // Names for google.protobuf.Any.
16 | const (
17 | Any_message_name protoreflect.Name = "Any"
18 | Any_message_fullname protoreflect.FullName = "google.protobuf.Any"
19 | )
20 |
21 | // Field names for google.protobuf.Any.
22 | const (
23 | Any_TypeUrl_field_name protoreflect.Name = "type_url"
24 | Any_Value_field_name protoreflect.Name = "value"
25 |
26 | Any_TypeUrl_field_fullname protoreflect.FullName = "google.protobuf.Any.type_url"
27 | Any_Value_field_fullname protoreflect.FullName = "google.protobuf.Any.value"
28 | )
29 |
30 | // Field numbers for google.protobuf.Any.
31 | const (
32 | Any_TypeUrl_field_number protoreflect.FieldNumber = 1
33 | Any_Value_field_number protoreflect.FieldNumber = 2
34 | )
35 |
--------------------------------------------------------------------------------
/gateway/vendor/google.golang.org/protobuf/internal/genid/doc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Package genid contains constants for declarations in descriptor.proto
6 | // and the well-known types.
7 | package genid
8 |
9 | import "google.golang.org/protobuf/reflect/protoreflect"
10 |
11 | const GoogleProtobuf_package protoreflect.FullName = "google.protobuf"
12 |
--------------------------------------------------------------------------------
/gateway/vendor/google.golang.org/protobuf/internal/genid/empty_gen.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Code generated by generate-protos. DO NOT EDIT.
6 |
7 | package genid
8 |
9 | import (
10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect"
11 | )
12 |
13 | const File_google_protobuf_empty_proto = "google/protobuf/empty.proto"
14 |
15 | // Names for google.protobuf.Empty.
16 | const (
17 | Empty_message_name protoreflect.Name = "Empty"
18 | Empty_message_fullname protoreflect.FullName = "google.protobuf.Empty"
19 | )
20 |
--------------------------------------------------------------------------------
/gateway/vendor/google.golang.org/protobuf/internal/genid/field_mask_gen.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Code generated by generate-protos. DO NOT EDIT.
6 |
7 | package genid
8 |
9 | import (
10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect"
11 | )
12 |
13 | const File_google_protobuf_field_mask_proto = "google/protobuf/field_mask.proto"
14 |
15 | // Names for google.protobuf.FieldMask.
16 | const (
17 | FieldMask_message_name protoreflect.Name = "FieldMask"
18 | FieldMask_message_fullname protoreflect.FullName = "google.protobuf.FieldMask"
19 | )
20 |
21 | // Field names for google.protobuf.FieldMask.
22 | const (
23 | FieldMask_Paths_field_name protoreflect.Name = "paths"
24 |
25 | FieldMask_Paths_field_fullname protoreflect.FullName = "google.protobuf.FieldMask.paths"
26 | )
27 |
28 | // Field numbers for google.protobuf.FieldMask.
29 | const (
30 | FieldMask_Paths_field_number protoreflect.FieldNumber = 1
31 | )
32 |
--------------------------------------------------------------------------------
/gateway/vendor/google.golang.org/protobuf/internal/genid/goname.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package genid
6 |
7 | // Go names of implementation-specific struct fields in generated messages.
8 | const (
9 | State_goname = "state"
10 |
11 | SizeCache_goname = "sizeCache"
12 | SizeCacheA_goname = "XXX_sizecache"
13 |
14 | WeakFields_goname = "weakFields"
15 | WeakFieldsA_goname = "XXX_weak"
16 |
17 | UnknownFields_goname = "unknownFields"
18 | UnknownFieldsA_goname = "XXX_unrecognized"
19 |
20 | ExtensionFields_goname = "extensionFields"
21 | ExtensionFieldsA_goname = "XXX_InternalExtensions"
22 | ExtensionFieldsB_goname = "XXX_extensions"
23 |
24 | WeakFieldPrefix_goname = "XXX_weak_"
25 | )
26 |
--------------------------------------------------------------------------------
/gateway/vendor/google.golang.org/protobuf/internal/genid/map_entry.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package genid
6 |
7 | import "google.golang.org/protobuf/reflect/protoreflect"
8 |
9 | // Generic field names and numbers for synthetic map entry messages.
10 | const (
11 | MapEntry_Key_field_name protoreflect.Name = "key"
12 | MapEntry_Value_field_name protoreflect.Name = "value"
13 |
14 | MapEntry_Key_field_number protoreflect.FieldNumber = 1
15 | MapEntry_Value_field_number protoreflect.FieldNumber = 2
16 | )
17 |
--------------------------------------------------------------------------------
/gateway/vendor/google.golang.org/protobuf/internal/genid/source_context_gen.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Code generated by generate-protos. DO NOT EDIT.
6 |
7 | package genid
8 |
9 | import (
10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect"
11 | )
12 |
13 | const File_google_protobuf_source_context_proto = "google/protobuf/source_context.proto"
14 |
15 | // Names for google.protobuf.SourceContext.
16 | const (
17 | SourceContext_message_name protoreflect.Name = "SourceContext"
18 | SourceContext_message_fullname protoreflect.FullName = "google.protobuf.SourceContext"
19 | )
20 |
21 | // Field names for google.protobuf.SourceContext.
22 | const (
23 | SourceContext_FileName_field_name protoreflect.Name = "file_name"
24 |
25 | SourceContext_FileName_field_fullname protoreflect.FullName = "google.protobuf.SourceContext.file_name"
26 | )
27 |
28 | // Field numbers for google.protobuf.SourceContext.
29 | const (
30 | SourceContext_FileName_field_number protoreflect.FieldNumber = 1
31 | )
32 |
--------------------------------------------------------------------------------
/gateway/vendor/google.golang.org/protobuf/internal/genid/wrappers.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package genid
6 |
7 | import "google.golang.org/protobuf/reflect/protoreflect"
8 |
9 | // Generic field name and number for messages in wrappers.proto.
10 | const (
11 | WrapperValue_Value_field_name protoreflect.Name = "value"
12 | WrapperValue_Value_field_number protoreflect.FieldNumber = 1
13 | )
14 |
--------------------------------------------------------------------------------
/gateway/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !go1.12
6 | // +build !go1.12
7 |
8 | package impl
9 |
10 | import "reflect"
11 |
12 | type mapIter struct {
13 | v reflect.Value
14 | keys []reflect.Value
15 | }
16 |
17 | // mapRange provides a less-efficient equivalent to
18 | // the Go 1.12 reflect.Value.MapRange method.
19 | func mapRange(v reflect.Value) *mapIter {
20 | return &mapIter{v: v}
21 | }
22 |
23 | func (i *mapIter) Next() bool {
24 | if i.keys == nil {
25 | i.keys = i.v.MapKeys()
26 | } else {
27 | i.keys = i.keys[1:]
28 | }
29 | return len(i.keys) > 0
30 | }
31 |
32 | func (i *mapIter) Key() reflect.Value {
33 | return i.keys[0]
34 | }
35 |
36 | func (i *mapIter) Value() reflect.Value {
37 | return i.v.MapIndex(i.keys[0])
38 | }
39 |
--------------------------------------------------------------------------------
/gateway/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build go1.12
6 | // +build go1.12
7 |
8 | package impl
9 |
10 | import "reflect"
11 |
12 | func mapRange(v reflect.Value) *reflect.MapIter { return v.MapRange() }
13 |
--------------------------------------------------------------------------------
/gateway/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package impl
6 |
7 | // When using unsafe pointers, we can just treat enum values as int32s.
8 |
9 | var (
10 | coderEnumNoZero = coderInt32NoZero
11 | coderEnum = coderInt32
12 | coderEnumPtr = coderInt32Ptr
13 | coderEnumSlice = coderInt32Slice
14 | coderEnumPackedSlice = coderInt32PackedSlice
15 | )
16 |
--------------------------------------------------------------------------------
/gateway/vendor/google.golang.org/protobuf/internal/impl/enum.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package impl
6 |
7 | import (
8 | "reflect"
9 |
10 | "google.golang.org/protobuf/reflect/protoreflect"
11 | )
12 |
13 | type EnumInfo struct {
14 | GoReflectType reflect.Type // int32 kind
15 | Desc protoreflect.EnumDescriptor
16 | }
17 |
18 | func (t *EnumInfo) New(n protoreflect.EnumNumber) protoreflect.Enum {
19 | return reflect.ValueOf(n).Convert(t.GoReflectType).Interface().(protoreflect.Enum)
20 | }
21 | func (t *EnumInfo) Descriptor() protoreflect.EnumDescriptor { return t.Desc }
22 |
--------------------------------------------------------------------------------
/gateway/vendor/google.golang.org/protobuf/proto/proto_methods.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // The protoreflect build tag disables use of fast-path methods.
6 | //go:build !protoreflect
7 | // +build !protoreflect
8 |
9 | package proto
10 |
11 | import (
12 | "google.golang.org/protobuf/reflect/protoreflect"
13 | "google.golang.org/protobuf/runtime/protoiface"
14 | )
15 |
16 | const hasProtoMethods = true
17 |
18 | func protoMethods(m protoreflect.Message) *protoiface.Methods {
19 | return m.ProtoMethods()
20 | }
21 |
--------------------------------------------------------------------------------
/gateway/vendor/google.golang.org/protobuf/proto/proto_reflect.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // The protoreflect build tag disables use of fast-path methods.
6 | //go:build protoreflect
7 | // +build protoreflect
8 |
9 | package proto
10 |
11 | import (
12 | "google.golang.org/protobuf/reflect/protoreflect"
13 | "google.golang.org/protobuf/runtime/protoiface"
14 | )
15 |
16 | const hasProtoMethods = false
17 |
18 | func protoMethods(m protoreflect.Message) *protoiface.Methods {
19 | return nil
20 | }
21 |
--------------------------------------------------------------------------------
/gateway/vendor/google.golang.org/protobuf/proto/reset.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package proto
6 |
7 | import (
8 | "fmt"
9 |
10 | "google.golang.org/protobuf/reflect/protoreflect"
11 | )
12 |
13 | // Reset clears every field in the message.
14 | // The resulting message shares no observable memory with its previous state
15 | // other than the memory for the message itself.
16 | func Reset(m Message) {
17 | if mr, ok := m.(interface{ Reset() }); ok && hasProtoMethods {
18 | mr.Reset()
19 | return
20 | }
21 | resetMessage(m.ProtoReflect())
22 | }
23 |
24 | func resetMessage(m protoreflect.Message) {
25 | if !m.IsValid() {
26 | panic(fmt.Sprintf("cannot reset invalid %v message", m.Descriptor().FullName()))
27 | }
28 |
29 | // Clear all known fields.
30 | fds := m.Descriptor().Fields()
31 | for i := 0; i < fds.Len(); i++ {
32 | m.Clear(fds.Get(i))
33 | }
34 |
35 | // Clear extension fields.
36 | m.Range(func(fd protoreflect.FieldDescriptor, _ protoreflect.Value) bool {
37 | m.Clear(fd)
38 | return true
39 | })
40 |
41 | // Clear unknown fields.
42 | m.SetUnknown(nil)
43 | }
44 |
--------------------------------------------------------------------------------
/gateway/vendor/google.golang.org/protobuf/runtime/protoiface/legacy.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package protoiface
6 |
7 | type MessageV1 interface {
8 | Reset()
9 | String() string
10 | ProtoMessage()
11 | }
12 |
13 | type ExtensionRangeV1 struct {
14 | Start, End int32 // both inclusive
15 | }
16 |
--------------------------------------------------------------------------------
/gateway/version/version.go:
--------------------------------------------------------------------------------
1 | package version
2 |
3 | var (
4 | // Version release version of the provider
5 | Version string
6 |
7 | // GitCommitSHA is the Git SHA of the latest tag/release
8 | GitCommitSHA string
9 |
10 | // GitCommitMessage as read from the latest tag/release
11 | GitCommitMessage = "See GitHub for latest changes"
12 |
13 | // DevVersion string for the development version
14 | DevVersion = "dev"
15 | )
16 |
17 | // BuildVersion returns current version of the provider
18 | func BuildVersion() string {
19 | if len(Version) == 0 {
20 | return DevVersion
21 | }
22 | return Version
23 | }
24 |
--------------------------------------------------------------------------------
/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/openfaas/faas
2 |
3 | go 1.22
4 |
--------------------------------------------------------------------------------
/sample-functions/.gitignore:
--------------------------------------------------------------------------------
1 | master.zip
2 | build
3 | template
4 | .vscode
5 |
--------------------------------------------------------------------------------