From d9af6a6d570cf951df9063c166e33336271a0f8d Mon Sep 17 00:00:00 2001 From: Nuno Sousa Date: Thu, 2 Nov 2023 11:58:27 +0000 Subject: [PATCH] Add endpoint docs to README (#2) --- Readme.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/Readme.md b/Readme.md index 9ba0196..c82bd94 100644 --- a/Readme.md +++ b/Readme.md @@ -30,3 +30,36 @@ func main() { client.Close() } ``` + +## Other Regions + +If you're using a [different data center](https://customer.io/docs/accounts-and-workspaces/data-centers/) such as our EU region, you can specify an alternate endpoint: + +```go +package main + +import ( + "os" + + "github.com/customerio/cdp-analytics-go" +) + +func main() { + client, err := analytics.NewWithConfig(os.Getenv("WRITE_KEY"), analytics.Config{ + Endpoint: "https://cdp-eu.customer.io", + }) + if err != nil { + panic(err) + } + + // ... +} +``` + +## Documentation + +The links below contain more detailed documentation on how to use this library: + +* [Documentation](https://customer.io/docs/cdp/sources/connections/servers/go/) +* [Specs](https://customer.io/docs/cdp/sources/source-spec/source-events/) +* [godoc](https://pkg.go.dev/github.com/customerio/cdp-analytics-go)