Skip to content

Commit 522d2cc

Browse files
Merge pull request #13 from speakeasy-api/update-readmes
chore: update README to reflect current functionality
2 parents 5044ecf + 0f97dac commit 522d2cc

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ func main() {
7878

7979
This allows multiple instances of the SDK to be associated with different routers or routes within your service.
8080

81+
### On-Premise Configuration
82+
83+
The SDK provides a way to redirect the requests it captures to an on-premise deployment of the Speakeasy Platform. This is done through the use of environment variables listed below. These are to be set in the environment of your services that have integrated the SDK:
84+
85+
* `SPEAKEASY_SERVER_URL` - The url of the on-premise Speakeasy Platform's GRPC Endpoint. By default this is `grpc.prod.speakeasyapi.dev:443`.
86+
* `SPEAKEASY_SERVER_SECURE` - Whether or not to use TLS for the on-premise Speakeasy Platform. By default this is `true` set to `SPEAKEASY_SERVER_SECURE="false"` if you are using an insecure connection.
87+
8188
## Request Matching
8289

8390
The Speakeasy SDK out of the box will do its best to match requests to your provided OpenAPI Schema. It does this by extracting the path template used by one of the supported routers or frameworks above for each request captured and attempting to match it to the paths defined in the OpenAPI Schema, for example:
@@ -121,4 +128,6 @@ func MyHandler(w http.ResponseWriter, r *http.Request) {
121128
ctrl.CustomerID("a-customers-id") // This customer ID will be used to associate this instance of a request with your customers/users
122129

123130
// the rest of your handlers code
124-
}
131+
}
132+
133+
Note: This is not required, but is highly recommended. By setting a customer ID you can easily associate requests with your customers/users in the Speakeasy Dashboard, powering filters in the Request Viewer [(Coming soon)](https://docs.speakeasyapi.dev/speakeasy-user-guide/request-viewer-coming-soon).

speakeasy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const (
2828

2929
var (
3030
speakeasyVersion = "1.1.0" // TODO get this from CI
31-
serverURL = "https://grpc.prod.speakeasyapi.dev"
31+
serverURL = "grpc.prod.speakeasyapi.dev:443"
3232

3333
defaultInstance *Speakeasy
3434
)

0 commit comments

Comments
 (0)