Skip to content

Commit

Permalink
attempt to shorten doc line length to appease linter
Browse files Browse the repository at this point in the history
  • Loading branch information
cwaldren-ld committed Mar 13, 2024
1 parent 8e57ecd commit 0e8e117
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions interfaces/service_endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@ package interfaces

// ServiceEndpoints allow configuration of custom service URIs.
//
// If you want to set non-default values for any of these fields, set the ServiceEndpoints field
// in the SDK's [github.com/launchdarkly/go-server-sdk/v7.Config] struct. You may set individual
// values such as Streaming, or use the helper method
// If you want to set non-default values for any of these fields,
// set the ServiceEndpoints field in the SDK's
// [github.com/launchdarkly/go-server-sdk/v7.Config] struct.
// You may set individual values such as Streaming, or use the helper method
// [github.com/launchdarkly/go-server-sdk/v7/ldcomponents.RelayProxyEndpoints].
//
// Important note: if one or more URI is set to a custom value, then all URIs should be set to custom values.
// Otherwise, the SDK will emit an error-level log to surface this potential misconfiguration, while using default values for
// the unset URIs.
// Important note: if one or more URI is set to a custom value, then
// all URIs should be set to custom values. Otherwise, the SDK will emit
// an error-level log to surface this potential misconfiguration, while
// using default values for the unset URIs.
//
// There are some scenarios where it is desirable to set only some of the fields, but this is not recommended for general
// usage. If you're scenario requires it, you can call [WithPartialSpecification] to suppress the
// There are some scenarios where it is desirable to set only some of the
// fields, but this is not recommended for general usage. If you're scenario
// requires it, you can call [WithPartialSpecification] to suppress the
// error message.
//
// See Config.ServiceEndpoints for more details.
Expand All @@ -23,15 +26,17 @@ type ServiceEndpoints struct {
allowPartialSpecification bool
}

// WithPartialSpecification returns a copy of this ServiceEndpoints that will not trigger an error-level log message
// if only some, but not all the fields are set to custom values. This is an advanced configuration and likely not necessary
// for most use-cases.
// WithPartialSpecification returns a copy of this ServiceEndpoints that will
// not trigger an error-level log message if only some, but not all the fields
// are set to custom values. This is an advanced configuration and likely not
// necessary for most use-cases.
func (s ServiceEndpoints) WithPartialSpecification() ServiceEndpoints {
s.allowPartialSpecification = true
return s
}

// PartialSpecificationRequested returns true if this ServiceEndpoints should not be treated as malformed if some, but not all fields are set.
// PartialSpecificationRequested returns true if this ServiceEndpoints should not
// be treated as malformed if some, but not all fields are set.
func (s ServiceEndpoints) PartialSpecificationRequested() bool {
return s.allowPartialSpecification
}

0 comments on commit 0e8e117

Please sign in to comment.