-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.go
34 lines (27 loc) · 889 Bytes
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
(C) Robert Kisteleki & RIPE NCC
See LICENSE file for the license.
*/
package goat
const version = "v0.7.3"
var (
uaString = "goat " + version
apiBaseURL = "https://atlas.ripe.net/api/v2/"
streamBaseURL = "wss://atlas-stream.ripe.net/stream/"
)
// GetUserAgent returns the user agent as a string
func UserAgent() string {
return uaString
}
// SetAPIBase allows the caller to modify the API to talk to
// This is really only useful to developers who have access to compatible APIs
func SetAPIBase(newAPIBaseURL string) {
// TODO: check sanity of new API base URL
apiBaseURL = newAPIBaseURL
}
// SetStreamBase allows the caller to modify the stream to talk to
// This is really only useful to developers who have access to compatible APIs
func SetStreamBase(newStreamBaseURL string) {
// TODO: check sanity of new API base URL
streamBaseURL = newStreamBaseURL
}