-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbackoff.pb.ts
174 lines (162 loc) · 4.84 KB
/
backoff.pb.ts
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
// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false"
// @generated from file github.com/aperturerobotics/util/backoff/backoff.proto (package backoff, syntax proto3)
/* eslint-disable */
import type { MessageType, PartialFieldInfo } from '@aptre/protobuf-es-lite'
import {
createEnumType,
createMessageType,
ScalarType,
} from '@aptre/protobuf-es-lite'
export const protobufPackage = 'backoff'
/**
* BackoffKind is the kind of backoff.
*
* @generated from enum backoff.BackoffKind
*/
export enum BackoffKind {
/**
* BackoffKind_UNKNOWN defaults to BackoffKind_EXPONENTIAL
*
* @generated from enum value: BackoffKind_UNKNOWN = 0;
*/
BackoffKind_UNKNOWN = 0,
/**
* BackoffKind_EXPONENTIAL is an exponential backoff.
*
* @generated from enum value: BackoffKind_EXPONENTIAL = 1;
*/
BackoffKind_EXPONENTIAL = 1,
/**
* BackoffKind_CONSTANT is a constant backoff.
*
* @generated from enum value: BackoffKind_CONSTANT = 2;
*/
BackoffKind_CONSTANT = 2,
}
// BackoffKind_Enum is the enum type for BackoffKind.
export const BackoffKind_Enum = createEnumType('backoff.BackoffKind', [
{ no: 0, name: 'BackoffKind_UNKNOWN' },
{ no: 1, name: 'BackoffKind_EXPONENTIAL' },
{ no: 2, name: 'BackoffKind_CONSTANT' },
])
/**
* Exponential is the exponential arguments.
*
* @generated from message backoff.Exponential
*/
export interface Exponential {
/**
* InitialInterval is the initial interval in milliseconds.
* Default: 800ms.
*
* @generated from field: uint32 initial_interval = 1;
*/
initialInterval?: number
/**
* Multiplier is the timing multiplier.
* Default: 1.8
*
* @generated from field: float multiplier = 2;
*/
multiplier?: number
/**
* MaxInterval is the maximum timing interval in milliseconds.
* Default: 20 seconds
*
* @generated from field: uint32 max_interval = 3;
*/
maxInterval?: number
/**
* RandomizationFactor is the randomization factor.
* Should be from [0, 1] as a percentage of the retry interval.
*
* randomized interval = RetryInterval * (random value in range [1 - RandomizationFactor, 1 + RandomizationFactor])
*
* Default: 0 (disabled)
*
* @generated from field: float randomization_factor = 4;
*/
randomizationFactor?: number
/**
* MaxElapsedTime if set specifies a maximum time for the backoff, in milliseconds.
* After this time the backoff and attached process terminates.
* May be empty, might be ignored.
*
* @generated from field: uint32 max_elapsed_time = 5;
*/
maxElapsedTime?: number
}
// Exponential contains the message type declaration for Exponential.
export const Exponential: MessageType<Exponential> = createMessageType({
typeName: 'backoff.Exponential',
fields: [
{ no: 1, name: 'initial_interval', kind: 'scalar', T: ScalarType.UINT32 },
{ no: 2, name: 'multiplier', kind: 'scalar', T: ScalarType.FLOAT },
{ no: 3, name: 'max_interval', kind: 'scalar', T: ScalarType.UINT32 },
{
no: 4,
name: 'randomization_factor',
kind: 'scalar',
T: ScalarType.FLOAT,
},
{ no: 5, name: 'max_elapsed_time', kind: 'scalar', T: ScalarType.UINT32 },
] as readonly PartialFieldInfo[],
packedByDefault: true,
})
/**
* Constant contains constant backoff options.
*
* @generated from message backoff.Constant
*/
export interface Constant {
/**
* Interval is the timing to back off, in milliseconds.
* Defaults to 5 seconds.
*
* @generated from field: uint32 interval = 1;
*/
interval?: number
}
// Constant contains the message type declaration for Constant.
export const Constant: MessageType<Constant> = createMessageType({
typeName: 'backoff.Constant',
fields: [
{ no: 1, name: 'interval', kind: 'scalar', T: ScalarType.UINT32 },
] as readonly PartialFieldInfo[],
packedByDefault: true,
})
/**
* Backoff configures a backoff.
*
* @generated from message backoff.Backoff
*/
export interface Backoff {
/**
* BackoffKind is the kind of backoff.
*
* @generated from field: backoff.BackoffKind backoff_kind = 1;
*/
backoffKind?: BackoffKind
/**
* Exponential is the arguments for an exponential backoff.
*
* @generated from field: backoff.Exponential exponential = 2;
*/
exponential?: Exponential
/**
* Constant is the arugment for a constant backoff.
*
* @generated from field: backoff.Constant constant = 3;
*/
constant?: Constant
}
// Backoff contains the message type declaration for Backoff.
export const Backoff: MessageType<Backoff> = createMessageType({
typeName: 'backoff.Backoff',
fields: [
{ no: 1, name: 'backoff_kind', kind: 'enum', T: BackoffKind_Enum },
{ no: 2, name: 'exponential', kind: 'message', T: () => Exponential },
{ no: 3, name: 'constant', kind: 'message', T: () => Constant },
] as readonly PartialFieldInfo[],
packedByDefault: true,
})