-
Notifications
You must be signed in to change notification settings - Fork 98
/
shared_types.go
27 lines (24 loc) · 1006 Bytes
/
shared_types.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
package v1alpha1
// Duration is a string value representing a duration in time.
// Duration can be specified in milliseconds (ms) or seconds (s) A value without a suffix is seconds.
// Examples: 120s, 50ms.
//
// +kubebuilder:validation:Pattern=`^\d{1,4}(ms|s)?$`
type Duration string
// SpanAttribute is a key value pair to be added to a tracing span.
type SpanAttribute struct {
// Key is the key for a span attribute.
// Format: must have all '"' escaped and must not contain any '$' or end with an unescaped '\'
//
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=255
// +kubebuilder:validation:Pattern=`^([^"$\\]|\\[^$])*$`
Key string `json:"key"`
// Value is the value for a span attribute.
// Format: must have all '"' escaped and must not contain any '$' or end with an unescaped '\'
//
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=255
// +kubebuilder:validation:Pattern=`^([^"$\\]|\\[^$])*$`
Value string `json:"value"`
}