aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo/vespa/model/container/DataplaneProxy.java
blob: fe7d9581e468cb614acb2f8a261039d2c95cbd36 (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
// Copyright Yahoo. 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;

public class DataplaneProxy extends SimpleComponent implements DataplaneProxyConfig.Producer {

    private final Integer port;
    private final String serverCertificate;
    private final String serverKey;

    public DataplaneProxy(Integer port, String serverCertificate, String serverKey) {
        super(DataplaneProxyConfigurator.class.getName());
        this.port = port;
        this.serverCertificate = serverCertificate;
        this.serverKey = serverKey;
    }

    @Override
    public void getConfig(DataplaneProxyConfig.Builder builder) {
        builder.port(port);
        builder.serverCertificate(serverCertificate);
        builder.serverKey(serverKey);
    }

}