blob: a7ea78ec82d70b5c6b83e7a9c809ea977aabdec4 [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 Timeout time.Duration `yaml:"timeout"`
24 MaxCallRecvMsgSize string `yaml:"maxCallRecvMsgSize"`
25}
26
27type KvStoreConfigSpec struct {
28 Timeout time.Duration `yaml:"timeout"`
29}
30
31type TlsConfigSpec struct {
32 UseTls bool `yaml:"useTls"`
33 CACert string `yaml:"caCert"`
34 Cert string `yaml:"cert"`
35 Key string `yaml:"key"`
36 Verify string `yaml:"verify"`
37}
38
39type GlobalConfigSpec struct {
40 Server string `yaml:"server"`
41 Kafka string `yaml:"kafka"`
42 KvStore string `yaml:"kvstore"`
43 Tls TlsConfigSpec `yaml:"tls"`
44 Grpc GrpcConfigSpec `yaml:"grpc"`
45 KvStoreConfig KvStoreConfigSpec `yaml:"kvstoreconfig"`
46 K8sConfig string `yaml:"-"`
47}