From 5e15b32ff291c053909ba9c5c14e291f808d5dbf Mon Sep 17 00:00:00 2001 From: Varun Gandhi Date: Wed, 22 Jan 2025 18:09:15 +0800 Subject: [PATCH] chore: Delete old docs for package hosts --- docs/admin/code_hosts/go.mdx | 84 --------------------------- docs/admin/code_hosts/rate_limits.mdx | 6 -- 2 files changed, 90 deletions(-) delete mode 100644 docs/admin/code_hosts/go.mdx diff --git a/docs/admin/code_hosts/go.mdx b/docs/admin/code_hosts/go.mdx deleted file mode 100644 index 4c61e5951..000000000 --- a/docs/admin/code_hosts/go.mdx +++ /dev/null @@ -1,84 +0,0 @@ -# Go dependencies - -This feature is experimental and might change or be removed in the future. - - -Site admins can sync Go modules from any from any Go module proxy, including open source code from proxy.golang.org or a private proxy such as [Athens](https://github.com/gomods/athens), to their Sourcegraph instance so that users can search and navigate the repositories. - -To add Go dependencies to Sourcegraph you need to setup a Go dependencies code host: - -1. As *site admin*: go to **Site admin > Global settings** and enable the experimental feature by adding: `{"experimentalFeatures": {"goPackages": "enabled"} }` -1. As *site admin*: go to **Site admin > Manage code hosts** -1. Select **JVM Dependencies**. -1. Configure the connection by following the instructions above the text field. Additional fields can be added using `Cmd/Ctrl+Space` for auto-completion. See the [configuration documentation below](#configuration). -1. Press **Add repositories**. - -## Repository syncing - -There are currently two ways to sync Go dependency repositories. - -* **Code host configuration**: manually list dependencies in the `"dependencies"` section of the JSON configuration when creating the Go dependency code host. This method can be useful to verify that the credentials are picked up correctly without having to run a dependencies search. - -Sourcegraph tries to find each dependency repository in all configured `"urls"` until it's found. This means you can configure a public proxy first and fallback to a private one second (e.g. `"urls": ["https://proxy.golang.org", "https://admin:foobar@athens.yourcorp.com"]`). - -## Credentials - -Each entry in the `"urls"` array can contain basic auth if needed (e.g. `https://user:password@athens.yourcorp.com`). - -## Rate limiting - -By default, requests to the Go module proxies will be rate-limited -based on a default internal limit. ([source](https://github.com/sourcegraph/sourcegraph-public-snapshot/blob/main/schema/go-modules.schema.json)) - -```json -"rateLimit": { - "enabled": true, - "requestsPerHour": 57600.0 -} -``` - -where the `requestsPerHour` field is set based on your requirements. - -**Not recommended**: Rate-limiting can be turned off entirely as well. -This increases the risk of overloading the proxy. - -```json -"rateLimit": { - "enabled": false -} -``` - -## Configuration - -Go dependencies code host connections support the following configuration options, which are specified in the JSON editor in the site admin "Manage code hosts" area. - -{/*
[View page on our docs](/integration/go) to see rendered content.
*/} - -### admin/code_hosts/go-modules.schema.json - -```json -{ - // An array of strings specifying Go modules to mirror in Sourcegraph. - "dependencies": null, - // Other example values: - // - [ - // "cloud.google.com/go/kms@v1.1.0" - // ] - - // Rate limit applied when making background API requests to the configured Go module proxies. - "rateLimit": { - "enabled": true, - "requestsPerHour": 57600 - }, - - // The list of Go module proxy URLs to fetch modules from. 404 Not found or 410 Gone responses will result in the next URL to be attempted. - "urls": [ - "https://proxy.golang.org" - ] - // Other example values: - // - [ - // "https://athens.mycorp.org", - // "https://proxy.golang.org" - // ] -} -``` diff --git a/docs/admin/code_hosts/rate_limits.mdx b/docs/admin/code_hosts/rate_limits.mdx index b0d1e60d3..c93f14ba4 100644 --- a/docs/admin/code_hosts/rate_limits.mdx +++ b/docs/admin/code_hosts/rate_limits.mdx @@ -72,9 +72,3 @@ Sourcegraph supports internal rate limit configuration for the following connect - [Bitbucket Cloud](/admin/code_hosts/bitbucket_cloud#rateLimit) - [Bitbucket Server](/admin/code_hosts/bitbucket_server#rateLimit) - [Perforce](/admin/repo/perforce#rateLimit) -- [Go Modules](/admin/code_hosts/go#rateLimit) -- [JVM Packages](/admin/code_hosts/jvm#rateLimit) -- [NPM Packages](/admin/code_hosts/npm#rateLimit) -- [Python Packages](/admin/code_hosts/python#rateLimit) -- [Ruby Packages](/admin/code_hosts/ruby#rateLimit) -- [Rust Packages](/admin/code_hosts/rust#rateLimit)