Documentation
¶
Index ¶
- Constants
- type Client
- type Item
- type Items
- func (items Items) Contains(needle string) bool
- func (items Items) ContainsDelegation() bool
- func (items Items) ContainsDiscovery() bool
- func (items Items) ContainsFederation() bool
- func (items Items) ContainsMSC1929() bool
- func (items Items) ContainsSuffix(needle string) bool
- func (items Items) GetDomains() []string
Constants ¶
const ( // DefaultUserAgent is the default user agent used by the client DefaultUserAgent = "Go-PSD-client/v0.0.0" // DefaultMaxRetries is the default number of retries for failed requests DefaultMaxRetries = 3 // DefaultMaxIdleConns is the maximum number of idle connections across all hosts. DefaultMaxIdleConns = 256 // DefaultMaxIdleConnsPerHost is the maximum idle connections per host. DefaultMaxIdleConnsPerHost = 256 // DefaultMaxConnsPerHost is the maximum total connections per host. DefaultMaxConnsPerHost = 256 // DefaultIdleConnTimeout controls how long idle keep-alive connections stay around. DefaultIdleConnTimeout = 90 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the client to interact with the Prometheus Service Discovery HTTP API
func (*Client) GetRaw ¶
func (p *Client) GetRaw(ctx context.Context, identifier string, jobOverride ...string) ([]byte, error)
GetRaw returns the raw data for the given identifier, without using the cache or parsing the response. Do not use this method unless you need the raw data, as it does not parse the response
type Item ¶
Item is a struct that represents a single set of targets in Prometheus Service Discovery
type Items ¶
type Items []*Item
Items is a slice of Prometheus Service Discovery items
func (Items) ContainsDelegation ¶
ContainsDelegation - check if service discovery items contain matrix server delegation endpoint
func (Items) ContainsDiscovery ¶
ContainsDiscovery - check if service discovery items contain matrix client discovery endpoint
func (Items) ContainsFederation ¶
ContainsFederation - check if service discovery items contain matrix federation endpoint
func (Items) ContainsMSC1929 ¶
ContainsMSC1929 - check if service discovery items contain matrix MSC1929 endpoint
func (Items) ContainsSuffix ¶
ContainsSuffix - check if any target in service discovery items ends with the given suffix
func (Items) GetDomains ¶
GetDomains - get domains from service discovery labels