-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allowing custom API endpoint in NewClient config #198
Comments
Hi @alibasim86! That's an interesting thought. While we think about ways we could address this, does your API gateway support a proxy mode? We do pick up environment proxy settings if you have |
Hi, even if the API gateway supports its the system internally that is using the go-pagerduty will be pointing to a custom URL (that's the API gateway) to talk to PagerDuty public API endpoints for both API and events. Thanks |
Would a function like this do the trick? func NewClientWithAPIEndpoint(authToken, apiEndpoint string) *Client {
return &Client{
authToken: authToken,
apiEndpoint: apiEndpoint,
authType: apiToken,
HTTPClient: defaultHTTPClient,
}
} |
yep, That would do it. Thank you |
So, we went with a little bit different of an approach. The way you'll set a custom APIEndpoint will look something like this:
|
Please comment, or post another issue, if you have further trouble with this. |
Hi,
Can we allow API Endpoint customization during client creation to allow the run from an air gapped environment where calls are made via an API gateway.
go-pagerduty/client.go
Line 98 in 44f00b5
Thanks
Ali
The text was updated successfully, but these errors were encountered: