-
Notifications
You must be signed in to change notification settings - Fork 33
/
types-generic.go
137 lines (127 loc) · 3.58 KB
/
types-generic.go
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
/*
Copyright 2019 HAProxy Technologies
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
//nolint:godot
package types
// Enabled is used by parsers Daemon, MasterWorker, ExternalCheck, NoSplice, CompressionOffload
//
//generate:type:Daemon
//name:daemon
//create:type:bool
//test:ok:daemon
//test:ok:daemon # comment
//generate:type:MasterWorker
//name:master-worker
//create:type:bool
//test:ok:master-worker
//test:ok:master-worker # comment
//generate:type:ExternalCheck
//name:external-check
//create:type:bool
//test:ok:external-check
//test:ok:external-check # comment
//generate:type:NoSplice
//name:nosplice
//create:type:bool
//test:ok:nosplice
//test:ok:nosplice # comment
//generate:type:CompressionOffload
//name:compression offload
//create:type:bool
//test:ok:compression offload
//test:ok:compression offload # comment
type Enabled struct {
Comment string
}
// Int64 is used by parsers MaxConn, NbProc, NbThread
//
//generate:type:MaxConn
//name:maxconn
//test:ok:maxconn 10000
//test:ok:maxconn 10000 # comment
//test:fail:maxconn
//generate:type:NbProc
//name:nbproc
//test:ok:nbproc 4
//test:ok:nbproc 4 # comment
//test:fail:nbproc
//generate:type:NbThread
//name:nbthread
//test:ok:nbthread 4
//test:ok:nbthread 4 # comment
//test:fail:nbthread
//generate:type:StatsMaxconn
//name:stats maxconn
//test:ok:stats maxconn 10
//test:fail:stats
//test:fail:maxconn
//test:fail:stats maxconn
//test:fail:stats maxconn string
type Int64C struct {
Value int64
Comment string
}
// String is used by parsers Mode, DefaultBackend, SimpleTimeTwoWords, StatsTimeout
//
//generate:type:Mode
//name:mode
//test:ok:mode tcp
//test:ok:mode http
//test:ok:mode tcp # comment
//test:fail:mode
//generate:type:DefaultBackend
//name:default_backend
//test:ok:default_backend http
//test:fail:default_backend
//generate:type:StatsTimeout
//name:stats timeout
//test:ok:stats timeout 4
//test:ok:stats timeout 4 # comment
//test:fail:stats timeout
//test:fail:stats
//test:fail:timeout
//generate:type:LogSendHostName
//name:log-send-hostname
//test:ok:log-send-hostname
//test:ok:log-send-hostname something
type StringC struct {
Value string
Comment string
}
// StringSliceC is used by ConfigSnippet, CompressionAlgo, CompressionType
//
//generate:type:ConfigSnippet
//name:config-snippet
//test:ok:###_config-snippet_### BEGIN\n tune.ssl.default-dh-param 2048\n tune.bufsize 32768\n ###_config-snippet_### END
//test:fail:tune.ssl.default-dh-param 2048\ntune.bufsize 32768
//generate:type:CompressionAlgo
//name:compression algo
//test:ok:compression algo identity
//test:ok:compression algo identity raw-deflate
//test:fail:compression algo
//generate:type:CompressionType
//name:compression type
//test:ok:compression type text/plain
//test:ok:compression type text/plain application/json
//test:fail:compression type
type StringSliceC struct {
Value []string
Comment string
}
// StringKeyValueC is a simple key value, for example environment variables.
type StringKeyValueC struct {
Key string
Value string
Comment string
}
// Filters are not here, see parsers/filters
// ==============================================================================