mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-20 18:23:05 -08:00
ddefee52dc
Note that by just running `make update-go-deps`, the K8s Go client was set to `k8s.io/client-go v11.0.0+incompatible`. However, that doesn't play well with `k8s.io/apimachinery v0.18.5`. I the manually changed the Go client line to `k8s.io/client-go v0.18.5`, which made everything work. I guess Go Modules got confused by the ginormous v11.0.0 version tag. Or it is a problem that pulling k8s.io/client-go with git results in a rather old repo without the v0.18.5 tag. github.com/kubernetes/client-go has all the right tags. I actually don't understand how Go Modules still correctly figures out the source from the `k8s.io/client-go v0.18.5` line. If one of the reviewers could enlighten me, I'd much appreciate it. Signed-off-by: beorn7 <beorn@grafana.com>
41 lines
1.2 KiB
Go
41 lines
1.2 KiB
Go
// Copyright 2020 Google LLC.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// Package internaloption contains options used internally by Google client code.
|
|
package internaloption
|
|
|
|
import (
|
|
"google.golang.org/api/internal"
|
|
"google.golang.org/api/option"
|
|
)
|
|
|
|
type defaultEndpointOption string
|
|
|
|
func (o defaultEndpointOption) Apply(settings *internal.DialSettings) {
|
|
settings.DefaultEndpoint = string(o)
|
|
}
|
|
|
|
// WithDefaultEndpoint is an option that indicates the default endpoint.
|
|
//
|
|
// It should only be used internally by generated clients.
|
|
//
|
|
// This is similar to WithEndpoint, but allows us to determine whether the user has overriden the default endpoint.
|
|
func WithDefaultEndpoint(url string) option.ClientOption {
|
|
return defaultEndpointOption(url)
|
|
}
|
|
|
|
type defaultMTLSEndpointOption string
|
|
|
|
func (o defaultMTLSEndpointOption) Apply(settings *internal.DialSettings) {
|
|
settings.DefaultMTLSEndpoint = string(o)
|
|
}
|
|
|
|
// WithDefaultMTLSEndpoint is an option that indicates the default mTLS endpoint.
|
|
//
|
|
// It should only be used internally by generated clients.
|
|
//
|
|
func WithDefaultMTLSEndpoint(url string) option.ClientOption {
|
|
return defaultMTLSEndpointOption(url)
|
|
}
|