blob: 1f61dfdcfb8816366b7da7d294d1a4b35a4aca94 (
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
28
29
30
31
32
33
34
35
36
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.model.container;
import com.yahoo.cloud.config.DataplaneProxyConfig;
import com.yahoo.container.jdisc.DataplaneProxyConfigurator;
import com.yahoo.vespa.model.container.component.SimpleComponent;
import java.util.Set;
public class DataplaneProxy extends SimpleComponent implements DataplaneProxyConfig.Producer {
private final int mtlsPort;
private final int tokenPort;
private final String serverCertificate;
private final String serverKey;
private final Set<String> tokenEndpoints;
public DataplaneProxy(int mtlsPort, int tokenPort, String serverCertificate, String serverKey, Set<String> tokenEndpoints) {
super(DataplaneProxyConfigurator.class.getName());
this.mtlsPort = mtlsPort;
this.tokenPort = tokenPort;
this.serverCertificate = serverCertificate;
this.serverKey = serverKey;
this.tokenEndpoints = tokenEndpoints;
}
@Override
public void getConfig(DataplaneProxyConfig.Builder builder) {
builder.mtlsPort(mtlsPort);
builder.tokenPort(tokenPort);
builder.serverCertificate(serverCertificate);
builder.serverKey(serverKey);
builder.tokenEndpoints(tokenEndpoints);
}
}
|