blob: 536bd53341c00de16037f7594cb5710b2e775185 [file] [log] [blame]
boyoung21c5f5f42018-09-27 20:29:41 +09001/*
2 * Copyright 2018-present Open Networking Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.openstacktelemetry.api.config;
17
18import java.util.Map;
19
20public interface PrometheusTelemetryConfig extends TelemetryConfig {
21
22 /**
23 * Obtains prometheus exporter IP address.
24 *
25 * @return IP address which prometheus exporter binds
26 */
27 String address();
28
29 /**
30 * Obtains prometheus exporter port number.
31 *
32 * @return prometheus exporter port number
33 */
34 int port();
35
36 /**
37 * Obtains prometheus config maps.
38 *
39 * @return prometheus config map
40 */
41 Map<String, Object> configMap();
42
43
44 /**
45 * Builder class of PrometheusTelemetryConfig.
46 */
47 interface Builder extends TelemetryConfig.Builder {
48
49 /**
50 * Sets prometheus exporter IP address.
51 *
52 * @param address prometheus exporter IP
53 * @return builder instance
54 */
55 Builder withAddress(String address);
56
57 /**
58 * Sets prometheus exporter port number.
59 *
60 * @param port prometheus exporter port
61 * @return builder instance
62 */
63 Builder withPort(int port);
64
65 // TODO add authentication.
66
67 /**
68 * Sets other prometheus configuration map.
69 *
70 * @param configMap prometheus configuration map
71 * @return builder instance
72 */
73 Builder withConfigMap(Map<String, Object> configMap);
74
75 /**
76 * Creates a prometheus telemetry config instance.
77 *
78 * @return prometheus telemetry config instance
79 */
80 PrometheusTelemetryConfig build();
81 }
82}