-
Notifications
You must be signed in to change notification settings - Fork 432
/
upstream.pb.go
313 lines (285 loc) · 11.1 KB
/
upstream.pb.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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: upstream.proto
package v1
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import google_protobuf "github.com/gogo/protobuf/types"
import _ "github.com/gogo/protobuf/types"
import _ "github.com/gogo/protobuf/gogoproto"
import time "time"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
var _ = time.Kitchen
// *
// Upstream represents a destination for routing. Upstreams can be compared to
// [clusters](https://www.envoyproxy.io/docs/envoy/latest/api-v1/cluster_manager/cluster.html?highlight=cluster) in Envoy terminology.
// Upstreams can take a variety of types<!--(TODO)--> in gloo. Language extensions known as plugins<!--(TODO)--> allow the addition of new
// types of upstreams. <!--See [upstream types](TODO) for a detailed description of available upstream types.-->
type Upstream struct {
// Name of the upstream. Names must be unique and follow the following syntax rules:
// One or more lowercase rfc1035/rfc1123 labels separated by '.' with a maximum length of 253 characters.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Type indicates the type of the upstream. Examples include static<!--(TODO)-->, kubernetes<!--(TODO)-->, and [aws](../plugins/aws.md)
// Types are defined by the plugin<!--(TODO)--> associated with them.
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
// Connection Timeout tells gloo to set a timeout for unresponsive connections created to this upstream.
// If not provided by the user, it will set to a default value
ConnectionTimeout time.Duration `protobuf:"bytes,3,opt,name=connection_timeout,json=connectionTimeout,stdduration" json:"connection_timeout"`
// Spec contains properties that are specific to the upstream type. The spec is always required, but
// the expected content is specified by the [upstream plugin] for the given upstream type.
// Most often the upstream spec will be a map<string, string>
Spec *google_protobuf.Struct `protobuf:"bytes,4,opt,name=spec" json:"spec,omitempty"`
// Certain upstream types support (and may require) [functions](../introduction/concepts.md#Functions).
// Functions allow function-level routing to be done. For example, the [AWS lambda](../plugins/aws.md) upstream type
// Permits routing to AWS lambda function].
// [routes](virtualservice.md#Route) on virtualservices can specify function destinations to route to specific functions.
Functions []*Function `protobuf:"bytes,5,rep,name=functions" json:"functions,omitempty"`
// Service Info contains information about the service running on the upstream
// Service Info is optional, but is used by certain plugins (such as the gRPC plugin)
// as well as discovery services to provide sophistocated routing features for well-known
// types of services
ServiceInfo *ServiceInfo `protobuf:"bytes,8,opt,name=service_info,json=serviceInfo" json:"service_info,omitempty"`
// Status indicates the validation status of the upstream resource. Status is read-only by clients, and set by gloo during validation
Status *Status `protobuf:"bytes,6,opt,name=status" json:"status,omitempty" testdiff:"ignore"`
// Metadata contains the resource metadata for the upstream
Metadata *Metadata `protobuf:"bytes,7,opt,name=metadata" json:"metadata,omitempty"`
}
func (m *Upstream) Reset() { *m = Upstream{} }
func (m *Upstream) String() string { return proto.CompactTextString(m) }
func (*Upstream) ProtoMessage() {}
func (*Upstream) Descriptor() ([]byte, []int) { return fileDescriptorUpstream, []int{0} }
func (m *Upstream) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Upstream) GetType() string {
if m != nil {
return m.Type
}
return ""
}
func (m *Upstream) GetConnectionTimeout() time.Duration {
if m != nil {
return m.ConnectionTimeout
}
return 0
}
func (m *Upstream) GetSpec() *google_protobuf.Struct {
if m != nil {
return m.Spec
}
return nil
}
func (m *Upstream) GetFunctions() []*Function {
if m != nil {
return m.Functions
}
return nil
}
func (m *Upstream) GetServiceInfo() *ServiceInfo {
if m != nil {
return m.ServiceInfo
}
return nil
}
func (m *Upstream) GetStatus() *Status {
if m != nil {
return m.Status
}
return nil
}
func (m *Upstream) GetMetadata() *Metadata {
if m != nil {
return m.Metadata
}
return nil
}
type ServiceInfo struct {
// Type indicates the type of service running on the upstream.
// Current options include `REST`, `gRPC`, and `NATS`
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
// Properties contains properties that describe the service. The spec may be required
// by the Upstream Plugin that handles the given Service Type
// Most often the service properties will be a map<string, string>
Properties *google_protobuf.Struct `protobuf:"bytes,2,opt,name=properties" json:"properties,omitempty"`
}
func (m *ServiceInfo) Reset() { *m = ServiceInfo{} }
func (m *ServiceInfo) String() string { return proto.CompactTextString(m) }
func (*ServiceInfo) ProtoMessage() {}
func (*ServiceInfo) Descriptor() ([]byte, []int) { return fileDescriptorUpstream, []int{1} }
func (m *ServiceInfo) GetType() string {
if m != nil {
return m.Type
}
return ""
}
func (m *ServiceInfo) GetProperties() *google_protobuf.Struct {
if m != nil {
return m.Properties
}
return nil
}
type Function struct {
// Name of the function. Functions are referenced by name from routes and therefore must be unique within an upstream
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Spec for the function. Like [upstream specs](TODO), the content of function specs is specified by the [upstream plugin](TODO) for the upstream's type.
Spec *google_protobuf.Struct `protobuf:"bytes,4,opt,name=spec" json:"spec,omitempty"`
}
func (m *Function) Reset() { *m = Function{} }
func (m *Function) String() string { return proto.CompactTextString(m) }
func (*Function) ProtoMessage() {}
func (*Function) Descriptor() ([]byte, []int) { return fileDescriptorUpstream, []int{2} }
func (m *Function) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Function) GetSpec() *google_protobuf.Struct {
if m != nil {
return m.Spec
}
return nil
}
func init() {
proto.RegisterType((*Upstream)(nil), "gloo.api.v1.Upstream")
proto.RegisterType((*ServiceInfo)(nil), "gloo.api.v1.ServiceInfo")
proto.RegisterType((*Function)(nil), "gloo.api.v1.Function")
}
func (this *Upstream) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*Upstream)
if !ok {
that2, ok := that.(Upstream)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Name != that1.Name {
return false
}
if this.Type != that1.Type {
return false
}
if this.ConnectionTimeout != that1.ConnectionTimeout {
return false
}
if !this.Spec.Equal(that1.Spec) {
return false
}
if len(this.Functions) != len(that1.Functions) {
return false
}
for i := range this.Functions {
if !this.Functions[i].Equal(that1.Functions[i]) {
return false
}
}
if !this.ServiceInfo.Equal(that1.ServiceInfo) {
return false
}
if !this.Status.Equal(that1.Status) {
return false
}
if !this.Metadata.Equal(that1.Metadata) {
return false
}
return true
}
func (this *ServiceInfo) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*ServiceInfo)
if !ok {
that2, ok := that.(ServiceInfo)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Type != that1.Type {
return false
}
if !this.Properties.Equal(that1.Properties) {
return false
}
return true
}
func (this *Function) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*Function)
if !ok {
that2, ok := that.(Function)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Name != that1.Name {
return false
}
if !this.Spec.Equal(that1.Spec) {
return false
}
return true
}
func init() { proto.RegisterFile("upstream.proto", fileDescriptorUpstream) }
var fileDescriptorUpstream = []byte{
// 431 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x51, 0xd1, 0x8a, 0x13, 0x31,
0x14, 0x75, 0x6c, 0xad, 0xb3, 0x99, 0x65, 0x61, 0xa3, 0x8b, 0x71, 0x91, 0x6d, 0x99, 0xa7, 0x82,
0x98, 0xd0, 0xdd, 0x07, 0x41, 0xdf, 0x8a, 0x08, 0x22, 0xbe, 0xcc, 0xea, 0xcb, 0xbe, 0x2c, 0xe9,
0x34, 0x33, 0x06, 0x3b, 0x73, 0xc3, 0xe4, 0xa6, 0xe0, 0x9f, 0xf8, 0xe0, 0x07, 0xf8, 0x29, 0x7e,
0xc5, 0x0a, 0x7e, 0x82, 0x5f, 0x20, 0x93, 0x49, 0xdb, 0xa9, 0x8a, 0xb0, 0x6f, 0xf7, 0xde, 0x73,
0xce, 0xcd, 0xc9, 0xb9, 0xe4, 0xc8, 0x19, 0x8b, 0x8d, 0x92, 0x15, 0x37, 0x0d, 0x20, 0xd0, 0xa4,
0x5c, 0x01, 0x70, 0x69, 0x34, 0x5f, 0xcf, 0x4e, 0x9f, 0x94, 0x00, 0xe5, 0x4a, 0x09, 0x0f, 0x2d,
0x5c, 0x21, 0x2c, 0x36, 0x2e, 0xc7, 0x8e, 0x7a, 0x7a, 0xf6, 0x27, 0xba, 0x74, 0x8d, 0x44, 0x0d,
0x75, 0xc0, 0x1f, 0x96, 0x50, 0x82, 0x2f, 0x45, 0x5b, 0x85, 0xe9, 0xa1, 0x45, 0x89, 0xce, 0x86,
0xee, 0xa8, 0x52, 0x28, 0x97, 0x12, 0x65, 0xd7, 0xa7, 0x5f, 0x07, 0x24, 0xfe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