aboutsummaryrefslogtreecommitdiffstats
path: root/metrics-proxy/src/test/java/ai/vespa/metricsproxy/service/MockConfigSentinelClient.java
blob: 97f6600c2edc2cd3c39b18d23c4e528aa93a8510 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package ai.vespa.metricsproxy.service;

/**
 * Mock config sentinel
 *
 * @author hmusum
 */
public class MockConfigSentinelClient extends ConfigSentinelClient implements AutoCloseable {

    private final ConfigSentinelDummy configSentinel;

    public MockConfigSentinelClient(ConfigSentinelDummy configSentinel) {
        super();
        this.configSentinel = configSentinel;
    }

    @Override
    String sentinelLs() {
        return configSentinel.getServiceList();
    }

    @Override
    public void close() {
        super.deconstruct();
    }
}