blob: 1c5a0d41de8344f291c85d4db5b439e5b5ed05b3 [file] [log] [blame]
David K. Bainbridge1d946442021-03-19 16:45:52 +00001/*
2 * Copyright 2021-present Ciena Corporation
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 config
17
18import (
19 "time"
20)
21
22type GrpcConfigSpec struct {
23 ConnectTimeout time.Duration `yaml:"connectTimeout"`
24 Timeout time.Duration `yaml:"timeout"`
25 MaxCallRecvMsgSize string `yaml:"maxCallRecvMsgSize"`
26}
27
28type KvStoreConfigSpec struct {
29 Timeout time.Duration `yaml:"timeout"`
30}
31
32type TlsConfigSpec struct {
33 UseTls bool `yaml:"useTls"`
34 CACert string `yaml:"caCert"`
35 Cert string `yaml:"cert"`
36 Key string `yaml:"key"`
37 Verify bool `yaml:"verify"`
38}
39
40type GlobalConfigSpec struct {
41 ApiVersion string `yaml:"apiVersion"`
42 Server string `yaml:"server"`
43 Kafka string `yaml:"kafka"`
44 KvStore string `yaml:"kvstore"`
45 Tls TlsConfigSpec `yaml:"tls"`
46 Grpc GrpcConfigSpec `yaml:"grpc"`
47 KvStoreConfig KvStoreConfigSpec `yaml:"kvstoreconfig"`
48 K8sConfig string `yaml:"-"`
49}