const ( // DefaultStreamingBaseURI is the default base URI of the streaming service. DefaultStreamingBaseURI = "https://stream.launchdarkly.com/" // DefaultPollingBaseURI is the default base URI of the polling service. DefaultPollingBaseURI = "https://sdk.launchdarkly.com/" // DefaultEventsBaseURI is the default base URI of the events service. DefaultEventsBaseURI = "https://events.launchdarkly.com/" // StreamingRequestPath is the URL path for the server-side streaming endpoint. StreamingRequestPath = "/all" // PollingRequestPath is the URL path for the server-side polling endpoint. PollingRequestPath = "/sdk/latest-all" )
func AddPath(baseURI string, path string) string
AddPath concatenates a subpath to a URL in a way that will not cause a double slash.
func DefaultBaseURI(serviceType ServiceType) string
DefaultBaseURI returns the default base URI for the given kind of endpoint.
func IsCustom(serviceEndpoints interfaces.ServiceEndpoints, serviceType ServiceType, overrideValue string) bool
IsCustom returns true if the service endpoint has been overridden with a non-default value.
func SelectBaseURI( serviceEndpoints interfaces.ServiceEndpoints, serviceType ServiceType, overrideValue string, loggers ldlog.Loggers, ) string
SelectBaseURI is a helper for getting either a custom or a default URI for the given kind of endpoint.
ServiceType is used internally to denote which endpoint a URI is for.
type ServiceType int
const ( StreamingService ServiceType = iota //nolint:revive // don't really need doc comments here PollingService ServiceType = iota EventsService ServiceType = iota )
func (s ServiceType) String() string