mirror of
https://github.com/prometheus/prometheus.git
synced 2026-05-05 04:16:15 +02:00
update deprecated calls
Signed-off-by: alex boten <223565+codeboten@users.noreply.github.com>
This commit is contained in:
parent
39672984b5
commit
ab63eeb0d2
@ -146,7 +146,6 @@ func NewDockerDiscovery(conf *DockerSDConfig, opts discovery.DiscovererOptions)
|
||||
|
||||
clientOpts := []client.Opt{
|
||||
client.WithHost(conf.Host),
|
||||
client.WithAPIVersionNegotiation(),
|
||||
}
|
||||
|
||||
d.filters = make(client.Filters)
|
||||
@ -176,7 +175,7 @@ func NewDockerDiscovery(conf *DockerSDConfig, opts discovery.DiscovererOptions)
|
||||
)
|
||||
}
|
||||
|
||||
d.client, err = client.NewClientWithOpts(clientOpts...)
|
||||
d.client, err = client.New(clientOpts...)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error setting up docker client: %w", err)
|
||||
}
|
||||
|
||||
@ -140,7 +140,6 @@ func NewDiscovery(conf *DockerSwarmSDConfig, opts discovery.DiscovererOptions) (
|
||||
|
||||
clientOpts := []client.Opt{
|
||||
client.WithHost(conf.Host),
|
||||
client.WithAPIVersionNegotiation(),
|
||||
}
|
||||
|
||||
d.filters = make(client.Filters)
|
||||
@ -170,7 +169,7 @@ func NewDiscovery(conf *DockerSwarmSDConfig, opts discovery.DiscovererOptions) (
|
||||
)
|
||||
}
|
||||
|
||||
d.client, err = client.NewClientWithOpts(clientOpts...)
|
||||
d.client, err = client.New(clientOpts...)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error setting up docker swarm client: %w", err)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user