Documentation ¶
Overview ¶
Package v1beta1 is a generated protocol buffer package.
It is generated from these files:
policy/v1beta1/cfg.proto
It has these top-level messages:
AttributeManifest Rule Action Instance Handler Connection
Index ¶
- Variables
- type Action
- type AttributeManifest
- func (*AttributeManifest) Descriptor() ([]byte, []int)
- func (m *AttributeManifest) GetAttributes() map[string]*AttributeManifest_AttributeInfo
- func (m *AttributeManifest) GetName() string
- func (m *AttributeManifest) GetRevision() string
- func (*AttributeManifest) ProtoMessage()
- func (m *AttributeManifest) Reset()
- func (m *AttributeManifest) String() string
- type AttributeManifest_AttributeInfo
- func (*AttributeManifest_AttributeInfo) Descriptor() ([]byte, []int)
- func (m *AttributeManifest_AttributeInfo) GetDescription() string
- func (m *AttributeManifest_AttributeInfo) GetValueType() ValueType
- func (*AttributeManifest_AttributeInfo) ProtoMessage()
- func (m *AttributeManifest_AttributeInfo) Reset()
- func (m *AttributeManifest_AttributeInfo) String() string
- type Connection
- type DNSName
- func (*DNSName) Descriptor() ([]byte, []int)
- func (this *DNSName) Equal(that interface{}) bool
- func (m *DNSName) GetValue() string
- func (this *DNSName) GoString() string
- func (m *DNSName) Marshal() (dAtA []byte, err error)
- func (m *DNSName) MarshalTo(dAtA []byte) (int, error)
- func (*DNSName) ProtoMessage()
- func (m *DNSName) Reset()
- func (m *DNSName) Size() (n int)
- func (this *DNSName) String() string
- func (m *DNSName) Unmarshal(dAtA []byte) error
- type Duration
- func (*Duration) Descriptor() ([]byte, []int)
- func (this *Duration) Equal(that interface{}) bool
- func (m *Duration) GetValue() *google_protobuf1.Duration
- func (this *Duration) GoString() string
- func (m *Duration) Marshal() (dAtA []byte, err error)
- func (m *Duration) MarshalTo(dAtA []byte) (int, error)
- func (*Duration) ProtoMessage()
- func (m *Duration) Reset()
- func (m *Duration) Size() (n int)
- func (this *Duration) String() string
- func (m *Duration) Unmarshal(dAtA []byte) error
- type EmailAddress
- func (*EmailAddress) Descriptor() ([]byte, []int)
- func (this *EmailAddress) Equal(that interface{}) bool
- func (m *EmailAddress) GetValue() string
- func (this *EmailAddress) GoString() string
- func (m *EmailAddress) Marshal() (dAtA []byte, err error)
- func (m *EmailAddress) MarshalTo(dAtA []byte) (int, error)
- func (*EmailAddress) ProtoMessage()
- func (m *EmailAddress) Reset()
- func (m *EmailAddress) Size() (n int)
- func (this *EmailAddress) String() string
- func (m *EmailAddress) Unmarshal(dAtA []byte) error
- type Handler
- func (*Handler) Descriptor() ([]byte, []int)
- func (m *Handler) GetAdapter() string
- func (m *Handler) GetCompiledAdapter() string
- func (m *Handler) GetConnection() *Connection
- func (m *Handler) GetName() string
- func (m *Handler) GetParams() interface{}
- func (*Handler) ProtoMessage()
- func (m *Handler) Reset()
- func (m *Handler) String() string
- type IPAddress
- func (*IPAddress) Descriptor() ([]byte, []int)
- func (this *IPAddress) Equal(that interface{}) bool
- func (m *IPAddress) GetValue() []byte
- func (this *IPAddress) GoString() string
- func (m *IPAddress) Marshal() (dAtA []byte, err error)
- func (m *IPAddress) MarshalTo(dAtA []byte) (int, error)
- func (*IPAddress) ProtoMessage()
- func (m *IPAddress) Reset()
- func (m *IPAddress) Size() (n int)
- func (this *IPAddress) String() string
- func (m *IPAddress) Unmarshal(dAtA []byte) error
- type Instance
- func (*Instance) Descriptor() ([]byte, []int)
- func (m *Instance) GetCompiledTemplate() string
- func (m *Instance) GetName() string
- func (m *Instance) GetParams() interface{}
- func (m *Instance) GetTemplate() string
- func (*Instance) ProtoMessage()
- func (m *Instance) Reset()
- func (m *Instance) String() string
- type Rule
- type TimeStamp
- func (*TimeStamp) Descriptor() ([]byte, []int)
- func (this *TimeStamp) Equal(that interface{}) bool
- func (m *TimeStamp) GetValue() *google_protobuf2.Timestamp
- func (this *TimeStamp) GoString() string
- func (m *TimeStamp) Marshal() (dAtA []byte, err error)
- func (m *TimeStamp) MarshalTo(dAtA []byte) (int, error)
- func (*TimeStamp) ProtoMessage()
- func (m *TimeStamp) Reset()
- func (m *TimeStamp) Size() (n int)
- func (this *TimeStamp) String() string
- func (m *TimeStamp) Unmarshal(dAtA []byte) error
- type Uri
- func (*Uri) Descriptor() ([]byte, []int)
- func (this *Uri) Equal(that interface{}) bool
- func (m *Uri) GetValue() string
- func (this *Uri) GoString() string
- func (m *Uri) Marshal() (dAtA []byte, err error)
- func (m *Uri) MarshalTo(dAtA []byte) (int, error)
- func (*Uri) ProtoMessage()
- func (m *Uri) Reset()
- func (m *Uri) Size() (n int)
- func (this *Uri) String() string
- func (m *Uri) Unmarshal(dAtA []byte) error
- type Value
- func (*Value) Descriptor() ([]byte, []int)
- func (this *Value) Equal(that interface{}) bool
- func (m *Value) GetBoolValue() bool
- func (m *Value) GetDnsNameValue() *DNSName
- func (m *Value) GetDoubleValue() float64
- func (m *Value) GetDurationValue() *Duration
- func (m *Value) GetEmailAddressValue() *EmailAddress
- func (m *Value) GetInt64Value() int64
- func (m *Value) GetIpAddressValue() *IPAddress
- func (m *Value) GetStringValue() string
- func (m *Value) GetTimestampValue() *TimeStamp
- func (m *Value) GetUriValue() *Uri
- func (m *Value) GetValue() isValue_Value
- func (this *Value) GoString() string
- func (m *Value) Marshal() (dAtA []byte, err error)
- func (m *Value) MarshalTo(dAtA []byte) (int, error)
- func (*Value) ProtoMessage()
- func (m *Value) Reset()
- func (m *Value) Size() (n int)
- func (this *Value) String() string
- func (m *Value) Unmarshal(dAtA []byte) error
- func (*Value) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type ValueType
- type Value_BoolValue
- type Value_DnsNameValue
- type Value_DoubleValue
- type Value_DurationValue
- type Value_EmailAddressValue
- type Value_Int64Value
- type Value_IpAddressValue
- type Value_StringValue
- type Value_TimestampValue
- type Value_UriValue
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthType = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowType = fmt.Errorf("proto: integer overflow") )
var ValueType_name = map[int32]string{
0: "VALUE_TYPE_UNSPECIFIED",
1: "STRING",
2: "INT64",
3: "DOUBLE",
4: "BOOL",
5: "TIMESTAMP",
6: "IP_ADDRESS",
7: "EMAIL_ADDRESS",
8: "URI",
9: "DNS_NAME",
10: "DURATION",
11: "STRING_MAP",
}
var ValueType_value = map[string]int32{
"VALUE_TYPE_UNSPECIFIED": 0,
"STRING": 1,
"INT64": 2,
"DOUBLE": 3,
"BOOL": 4,
"TIMESTAMP": 5,
"IP_ADDRESS": 6,
"EMAIL_ADDRESS": 7,
"URI": 8,
"DNS_NAME": 9,
"DURATION": 10,
"STRING_MAP": 11,
}
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { // Required. Fully qualified name of the handler to invoke. // Must match the `name` of a [Handler][istio.policy.v1beta1.Handler.name]. Handler string `protobuf:"bytes,2,opt,name=handler,proto3" json:"handler,omitempty"` // Required. Each value must match the fully qualified name of the // [Instance][istio.policy.v1beta1.Instance.name]s. // Referenced instances are evaluated by resolving the attributes/literals for all the fields. // The constructed objects are then passed to the `handler` referenced within this action. Instances []string `protobuf:"bytes,3,rep,name=instances" json:"instances,omitempty"` }
Action describes which Handler[istio.policy.v1beta1.Handler] to invoke and what data to pass to it for processing.
The following example instructs Mixer to invoke 'prometheus-handler' handler and pass it the object constructed using the instance 'RequestCountByService'.
```yaml
handler: prometheus-handler instances: - RequestCountByService
```
func (*Action) Descriptor ¶
func (*Action) GetHandler ¶
func (*Action) GetInstances ¶
func (*Action) ProtoMessage ¶
func (*Action) ProtoMessage()
type AttributeManifest ¶
type AttributeManifest struct { // Optional. The revision of this document. Assigned by server. Revision string `protobuf:"bytes,1,opt,name=revision,proto3" json:"revision,omitempty"` // Required. Name of the component producing these attributes. This can be // the proxy (with the canonical name "istio-proxy") or the name of an // `attributes` kind adapter in Mixer. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // The set of attributes this Istio component will be responsible for producing at runtime. // We map from attribute name to the attribute's specification. The name of an attribute, // which is how attributes are referred to in aspect configuration, must conform to: // // Name = IDENT { SEPARATOR IDENT }; // // Where `IDENT` must match the regular expression `[a-z][a-z0-9]+` and `SEPARATOR` must // match the regular expression `[\.-]`. // // Attribute names must be unique within a single Istio deployment. The set of canonical // attributes are described at https://istio.io/docs/reference/attribute-vocabulary.html. // Attributes not in that list should be named with a component-specific suffix such as // request.count-my.component. Attributes map[string]*AttributeManifest_AttributeInfo `` /* 147-byte string literal not displayed */ }
AttributeManifest describes a set of Attributes produced by some component of an Istio deployment.
func (*AttributeManifest) Descriptor ¶
func (*AttributeManifest) Descriptor() ([]byte, []int)
func (*AttributeManifest) GetAttributes ¶
func (m *AttributeManifest) GetAttributes() map[string]*AttributeManifest_AttributeInfo
func (*AttributeManifest) GetName ¶
func (m *AttributeManifest) GetName() string
func (*AttributeManifest) GetRevision ¶
func (m *AttributeManifest) GetRevision() string
func (*AttributeManifest) ProtoMessage ¶
func (*AttributeManifest) ProtoMessage()
func (*AttributeManifest) Reset ¶
func (m *AttributeManifest) Reset()
func (*AttributeManifest) String ¶
func (m *AttributeManifest) String() string
type AttributeManifest_AttributeInfo ¶
type AttributeManifest_AttributeInfo struct { // Optional. A human-readable description of the attribute's purpose. Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` // Required. The type of data carried by this attribute. ValueType ValueType `protobuf:"varint,2,opt,name=value_type,json=valueType,proto3,enum=istio.policy.v1beta1.ValueType" json:"value_type,omitempty"` }
AttributeInfo describes the schema of an Istio `Attribute`.
Istio Attributes ¶
Istio uses `attributes` to describe runtime activities of Istio services. An Istio attribute carries a specific piece of information about an activity, such as the error code of an API request, the latency of an API request, or the original IP address of a TCP connection. The attributes are often generated and consumed by different services. For example, a frontend service can generate an authenticated user attribute and pass it to a backend service for access control purpose.
To simplify the system and improve developer experience, Istio uses shared attribute definitions across all components. For example, the same authenticated user attribute will be used for logging, monitoring, analytics, billing, access control, auditing. Many Istio components provide their functionality by collecting, generating, and operating on attributes. For example, the proxy collects the error code attribute, and the logging stores it into a log.
Design ¶
Each Istio attribute must conform to an `AttributeInfo` in an `AttributeManifest` in the current Istio deployment at runtime. An [`AttributeInfo`][istio.policy.v1beta1] is used to define an attribute's metadata: the type of its value and a detailed description that explains the semantics of the attribute type. Each attribute's name is globally unique; in other words an attribute name can only appear once across all manifests.
The runtime presentation of an attribute is intentionally left out of this specification, because passing attribute using JSON, XML, or Protocol Buffers does not change the semantics of the attribute. Different implementations can choose different representations based on their needs.
HTTP Mapping ¶
Because many systems already have REST APIs, it makes sense to define a standard HTTP mapping for Istio attributes that are compatible with typical REST APIs. The design is to map one attribute to one HTTP header, the attribute name and value becomes the HTTP header name and value. The actual encoding scheme will be decided later.
func (*AttributeManifest_AttributeInfo) Descriptor ¶
func (*AttributeManifest_AttributeInfo) Descriptor() ([]byte, []int)
func (*AttributeManifest_AttributeInfo) GetDescription ¶
func (m *AttributeManifest_AttributeInfo) GetDescription() string
func (*AttributeManifest_AttributeInfo) GetValueType ¶
func (m *AttributeManifest_AttributeInfo) GetValueType() ValueType
func (*AttributeManifest_AttributeInfo) ProtoMessage ¶
func (*AttributeManifest_AttributeInfo) ProtoMessage()
func (*AttributeManifest_AttributeInfo) Reset ¶
func (m *AttributeManifest_AttributeInfo) Reset()
func (*AttributeManifest_AttributeInfo) String ¶
func (m *AttributeManifest_AttributeInfo) String() string
type Connection ¶
type Connection struct { // The address of the backend. Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` }
Connection allows the operator to specify the endpoint for out-of-process infrastructure backend. Connection is part of the handler custom resource and is specified alongside adapter specific configuration.
func (*Connection) Descriptor ¶
func (*Connection) Descriptor() ([]byte, []int)
func (*Connection) GetAddress ¶
func (m *Connection) GetAddress() string
func (*Connection) ProtoMessage ¶
func (*Connection) ProtoMessage()
func (*Connection) Reset ¶
func (m *Connection) Reset()
func (*Connection) String ¶
func (m *Connection) String() string
type DNSName ¶
type DNSName struct { // DNSName encoded as string. Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` }
An instance field of type DNSName denotes that the expression for the field must evalaute to [ValueType.DNS_NAME][istio.policy.v1beta1.ValueType.DNS_NAME]
Objects of type DNSName are also passed to the adapters during request-time for the instance fields of type DNSName
func (*DNSName) Descriptor ¶
func (*DNSName) ProtoMessage ¶
func (*DNSName) ProtoMessage()
type Duration ¶
type Duration struct { // Duration encoded as google.protobuf.Duration. Value *google_protobuf1.Duration `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` }
An instance field of type Duration denotes that the expression for the field must evalaute to [ValueType.DURATION][istio.policy.v1beta1.ValueType.DURATION]
Objects of type Duration are also passed to the adapters during request-time for the instance fields of type Duration
func (*Duration) Descriptor ¶
func (*Duration) GetValue ¶
func (m *Duration) GetValue() *google_protobuf1.Duration
func (*Duration) ProtoMessage ¶
func (*Duration) ProtoMessage()
type EmailAddress ¶
type EmailAddress struct { // EmailAddress encoded as string. Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` }
DO NOT USE !! Under Development An instance field of type EmailAddress denotes that the expression for the field must evalaute to [ValueType.EMAIL_ADDRESS][istio.policy.v1beta1.ValueType.EMAIL_ADDRESS]
Objects of type EmailAddress are also passed to the adapters during request-time for the instance fields of type EmailAddress
func (*EmailAddress) Descriptor ¶
func (*EmailAddress) Descriptor() ([]byte, []int)
func (*EmailAddress) Equal ¶
func (this *EmailAddress) Equal(that interface{}) bool
func (*EmailAddress) GetValue ¶
func (m *EmailAddress) GetValue() string
func (*EmailAddress) GoString ¶
func (this *EmailAddress) GoString() string
func (*EmailAddress) Marshal ¶
func (m *EmailAddress) Marshal() (dAtA []byte, err error)
func (*EmailAddress) ProtoMessage ¶
func (*EmailAddress) ProtoMessage()
func (*EmailAddress) Reset ¶
func (m *EmailAddress) Reset()
func (*EmailAddress) Size ¶
func (m *EmailAddress) Size() (n int)
func (*EmailAddress) String ¶
func (this *EmailAddress) String() string
func (*EmailAddress) Unmarshal ¶
func (m *EmailAddress) Unmarshal(dAtA []byte) error
type Handler ¶
type Handler struct { // Required. Must be unique in the entire mixer configuration. Used by [Actions][istio.policy.v1beta1.Action.handler] // to refer to this handler. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Required. The name of the compiled in adapter this handler instantiates. For referencing non compiled-in // adapters, use the `adapter` field instead. // // The value must match the name of the available adapter Mixer is built with. An adapter's name is typically a // constant in its code. CompiledAdapter string `protobuf:"bytes,67794676,opt,name=compiled_adapter,json=compiledAdapter,proto3" json:"compiled_adapter,omitempty"` // Required. The name of a specific adapter implementation. For referencing compiled-in // adapters, use the `compiled_adapter` field instead. // // An adapter's implementation name is typically a constant in its code. Adapter string `protobuf:"bytes,2,opt,name=adapter,proto3" json:"adapter,omitempty"` // Optional. Depends on adapter implementation. Struct representation of a // proto defined by the adapter implementation; this varies depending on the value of field `adapter`. Params interface{} `protobuf:"bytes,3,opt,name=params" json:"params,omitempty"` // Optional. Information on how to connect to the out-of-process adapter. // This is used if the adapter is not compiled into Mixer binary and is running as a separate process. Connection *Connection `protobuf:"bytes,4,opt,name=connection" json:"connection,omitempty"` }
Handler allows the operator to configure a specific adapter implementation. Each adapter implementation defines its own `params` proto.
In the following example we define a `metrics` handler for the `prometheus` adapter. The example is in the form of a kubernetes resource: * The `metadata.name` is the name of the handler * The `kind` refers to the adapter name * The `spec` block represents adapter-specific configuration as well as the connection information
```yaml # Sample-1: No connection specified (for compiled in adapters) # Note: if connection information is not specified, the adapter configuration is directly inside # `spec` block. This is going to be DEPRECATED in favor of Sample-2 apiVersion: "config.istio.io/v1alpha2" kind: prometheus metadata:
name: handler namespace: istio-system
spec:
metrics: - name: request_count instance_name: requestcount.metric.istio-system kind: COUNTER label_names: - source_service - source_version - destination_service - destination_version
--- # Sample-2: With connection information (for out-of-process adapters) # Note: Unlike sample-1, the adapter configuration is parallel to `connection` and is nested inside `param` block. apiVersion: "config.istio.io/v1alpha2" kind: prometheus metadata:
name: handler namespace: istio-system
spec:
param: metrics: - name: request_count instance_name: requestcount.metric.istio-system kind: COUNTER label_names: - source_service - source_version - destination_service - destination_version connection: address: localhost:8090
--- ```
func (*Handler) Descriptor ¶
func (*Handler) GetAdapter ¶
func (*Handler) GetCompiledAdapter ¶
func (*Handler) GetConnection ¶
func (m *Handler) GetConnection() *Connection
func (*Handler) ProtoMessage ¶
func (*Handler) ProtoMessage()
type IPAddress ¶
type IPAddress struct { // IPAddress encoded as bytes. Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` }
An instance field of type IPAddress denotes that the expression for the field must evalaute to [ValueType.IP_ADDRESS][istio.policy.v1beta1.ValueType.IP_ADDRESS]
Objects of type IPAddress are also passed to the adapters during request-time for the instance fields of type IPAddress
func (*IPAddress) Descriptor ¶
func (*IPAddress) ProtoMessage ¶
func (*IPAddress) ProtoMessage()
type Instance ¶
type Instance struct { // Required. The name of this instance // // Must be unique amongst other Instances in scope. Used by [Action][istio.policy.v1beta1.Action] to refer // to an instance produced by this instance. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Required. The name of the compiled in template this instance creates instances for. For referencing non compiled-in // templates, use the `template` field instead. // // The value must match the name of the available template Mixer is built with. CompiledTemplate string `protobuf:"bytes,67794676,opt,name=compiled_template,json=compiledTemplate,proto3" json:"compiled_template,omitempty"` // Required. The name of the template this instance creates instances for. For referencing compiled-in // templates, use the `compiled_template` field instead. // // The value must match the name of the available template in scope. Template string `protobuf:"bytes,2,opt,name=template,proto3" json:"template,omitempty"` // Required. Depends on referenced template. Struct representation of a // proto defined by the template; this varies depending on the value of field `template`. Params interface{} `protobuf:"bytes,3,opt,name=params" json:"params,omitempty"` }
An Instance tells Mixer how to create instances for particular template.
Instance is defined by the operator. Instance is defined relative to a known template. Their purpose is to tell Mixer how to use attributes or literals to produce instances of the specified template at runtime.
The following example instructs Mixer to construct an instance associated with template 'istio.mixer.adapter.metric.Metric'. It provides a mapping from the template's fields to expressions. Instances produced with this instance can be referenced by [Actions][istio.policy.v1beta1.Action] using name 'RequestCountByService'
```yaml
- name: RequestCountByService template: istio.mixer.adapter.metric.Metric params: value: 1 dimensions: source: source.service destination_ip: destination.ip
```
func (*Instance) Descriptor ¶
func (*Instance) GetCompiledTemplate ¶
func (*Instance) GetTemplate ¶
func (*Instance) ProtoMessage ¶
func (*Instance) ProtoMessage()
type Rule ¶
type Rule struct { // Required. Match is an attribute based predicate. When Mixer receives a // request it evaluates the match expression and executes all the associated `actions` // if the match evaluates to true. // // A few example match: // // * an empty match evaluates to `true` // * `true`, a boolean literal; a rule with this match will always be executed // * `destination.service == ratings*` selects any request targeting a service whose // name starts with "ratings" // * `attr1 == "20" && attr2 == "30"` logical AND, OR, and NOT are also available Match string `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"` // Optional. The actions that will be executed when match evaluates to `true`. Actions []*Action `protobuf:"bytes,2,rep,name=actions" json:"actions,omitempty"` }
A Rule is a selector and a set of intentions to be executed when the selector is `true`
The following example instructs Mixer to invoke 'prometheus-handler' handler for all services and pass it the instance constructed using the 'RequestCountByService' instance.
```yaml
- match: destination.service == "*" actions:
- handler: prometheus-handler instances:
- RequestCountByService
```
func (*Rule) Descriptor ¶
func (*Rule) GetActions ¶
func (*Rule) ProtoMessage ¶
func (*Rule) ProtoMessage()
type TimeStamp ¶
type TimeStamp struct { // TimeStamp encoded as google.protobuf.Timestamp. Value *google_protobuf2.Timestamp `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` }
An instance field of type TimeStamp denotes that the expression for the field must evalaute to [ValueType.TIMESTAMP][istio.policy.v1beta1.ValueType.TIMESTAMP]
Objects of type TimeStamp are also passed to the adapters during request-time for the instance fields of type TimeStamp
func (*TimeStamp) Descriptor ¶
func (*TimeStamp) GetValue ¶
func (m *TimeStamp) GetValue() *google_protobuf2.Timestamp
func (*TimeStamp) ProtoMessage ¶
func (*TimeStamp) ProtoMessage()
type Uri ¶
type Uri struct { // Uri encoded as string. Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` }
DO NOT USE !! Under Development An instance field of type Uri denotes that the expression for the field must evalaute to [ValueType.URI][istio.policy.v1beta1.ValueType.URI]
Objects of type Uri are also passed to the adapters during request-time for the instance fields of type Uri
func (*Uri) Descriptor ¶
func (*Uri) ProtoMessage ¶
func (*Uri) ProtoMessage()
type Value ¶
type Value struct { // Types that are valid to be assigned to Value: // *Value_StringValue // *Value_Int64Value // *Value_DoubleValue // *Value_BoolValue // *Value_IpAddressValue // *Value_TimestampValue // *Value_DurationValue // *Value_EmailAddressValue // *Value_DnsNameValue // *Value_UriValue Value isValue_Value `protobuf_oneof:"value"` }
An instance field of type Value denotes that the expression for the field is of dynamic type and can evalaute to any ValueType[istio.policy.v1beta1.ValueType] enum values. For example, when authoring an instance configuration for a template that has a field `data` of type `istio.policy.v1beta1.Value`, both of the following expressions are valid `data: source.ip | ip("0.0.0.0")`, `data: request.id | ""`; the resulting type is either ValueType.IP_ADDRESS or ValueType.STRING for the two cases respectively.
Objects of type Value are also passed to the adapters during request-time. There is a 1:1 mapping between oneof fields in `Value` and enum values inside `ValueType`. Depending on the expression's evaluated `ValueType`, the equivalent oneof field in `Value` is populated by Mixer and passed to the adapters.
func (*Value) Descriptor ¶
func (*Value) GetBoolValue ¶
func (*Value) GetDnsNameValue ¶
func (*Value) GetDoubleValue ¶
func (*Value) GetDurationValue ¶
func (*Value) GetEmailAddressValue ¶
func (m *Value) GetEmailAddressValue() *EmailAddress
func (*Value) GetInt64Value ¶
func (*Value) GetIpAddressValue ¶
func (*Value) GetStringValue ¶
func (*Value) GetTimestampValue ¶
func (*Value) GetUriValue ¶
func (*Value) ProtoMessage ¶
func (*Value) ProtoMessage()
type ValueType ¶
type ValueType int32
ValueType describes the types that values in the Istio system can take. These are used to describe the type of Attributes at run time, describe the type of the result of evaluating an expression, and to describe the runtime type of fields of other descriptors.
const ( // Invalid, default value. VALUE_TYPE_UNSPECIFIED ValueType = 0 // An undiscriminated variable-length string. STRING ValueType = 1 // An undiscriminated 64-bit signed integer. INT64 ValueType = 2 // An undiscriminated 64-bit floating-point value. DOUBLE ValueType = 3 // An undiscriminated boolean value. BOOL ValueType = 4 // A point in time. TIMESTAMP ValueType = 5 // An IP address. IP_ADDRESS ValueType = 6 // An email address. EMAIL_ADDRESS ValueType = 7 // A URI. URI ValueType = 8 // A DNS name. DNS_NAME ValueType = 9 // A span between two points in time. DURATION ValueType = 10 // A map string -> string, typically used by headers. STRING_MAP ValueType = 11 )
func (ValueType) EnumDescriptor ¶
type Value_BoolValue ¶
type Value_BoolValue struct {
BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof"`
}
func (*Value_BoolValue) Equal ¶
func (this *Value_BoolValue) Equal(that interface{}) bool
func (*Value_BoolValue) GoString ¶
func (this *Value_BoolValue) GoString() string
func (*Value_BoolValue) Size ¶
func (m *Value_BoolValue) Size() (n int)
func (*Value_BoolValue) String ¶
func (this *Value_BoolValue) String() string
type Value_DnsNameValue ¶
type Value_DnsNameValue struct {
DnsNameValue *DNSName `protobuf:"bytes,9,opt,name=dns_name_value,json=dnsNameValue,oneof"`
}
func (*Value_DnsNameValue) Equal ¶
func (this *Value_DnsNameValue) Equal(that interface{}) bool
func (*Value_DnsNameValue) GoString ¶
func (this *Value_DnsNameValue) GoString() string
func (*Value_DnsNameValue) MarshalTo ¶
func (m *Value_DnsNameValue) MarshalTo(dAtA []byte) (int, error)
func (*Value_DnsNameValue) Size ¶
func (m *Value_DnsNameValue) Size() (n int)
func (*Value_DnsNameValue) String ¶
func (this *Value_DnsNameValue) String() string
type Value_DoubleValue ¶
type Value_DoubleValue struct {
DoubleValue float64 `protobuf:"fixed64,3,opt,name=double_value,json=doubleValue,proto3,oneof"`
}
func (*Value_DoubleValue) Equal ¶
func (this *Value_DoubleValue) Equal(that interface{}) bool
func (*Value_DoubleValue) GoString ¶
func (this *Value_DoubleValue) GoString() string
func (*Value_DoubleValue) MarshalTo ¶
func (m *Value_DoubleValue) MarshalTo(dAtA []byte) (int, error)
func (*Value_DoubleValue) Size ¶
func (m *Value_DoubleValue) Size() (n int)
func (*Value_DoubleValue) String ¶
func (this *Value_DoubleValue) String() string
type Value_DurationValue ¶
type Value_DurationValue struct {
DurationValue *Duration `protobuf:"bytes,7,opt,name=duration_value,json=durationValue,oneof"`
}
func (*Value_DurationValue) Equal ¶
func (this *Value_DurationValue) Equal(that interface{}) bool
func (*Value_DurationValue) GoString ¶
func (this *Value_DurationValue) GoString() string
func (*Value_DurationValue) MarshalTo ¶
func (m *Value_DurationValue) MarshalTo(dAtA []byte) (int, error)
func (*Value_DurationValue) Size ¶
func (m *Value_DurationValue) Size() (n int)
func (*Value_DurationValue) String ¶
func (this *Value_DurationValue) String() string
type Value_EmailAddressValue ¶
type Value_EmailAddressValue struct {
EmailAddressValue *EmailAddress `protobuf:"bytes,8,opt,name=email_address_value,json=emailAddressValue,oneof"`
}
func (*Value_EmailAddressValue) Equal ¶
func (this *Value_EmailAddressValue) Equal(that interface{}) bool
func (*Value_EmailAddressValue) GoString ¶
func (this *Value_EmailAddressValue) GoString() string
func (*Value_EmailAddressValue) MarshalTo ¶
func (m *Value_EmailAddressValue) MarshalTo(dAtA []byte) (int, error)
func (*Value_EmailAddressValue) Size ¶
func (m *Value_EmailAddressValue) Size() (n int)
func (*Value_EmailAddressValue) String ¶
func (this *Value_EmailAddressValue) String() string
type Value_Int64Value ¶
type Value_Int64Value struct {
Int64Value int64 `protobuf:"varint,2,opt,name=int64_value,json=int64Value,proto3,oneof"`
}
func (*Value_Int64Value) Equal ¶
func (this *Value_Int64Value) Equal(that interface{}) bool
func (*Value_Int64Value) GoString ¶
func (this *Value_Int64Value) GoString() string
func (*Value_Int64Value) Size ¶
func (m *Value_Int64Value) Size() (n int)
func (*Value_Int64Value) String ¶
func (this *Value_Int64Value) String() string
type Value_IpAddressValue ¶
type Value_IpAddressValue struct {
IpAddressValue *IPAddress `protobuf:"bytes,5,opt,name=ip_address_value,json=ipAddressValue,oneof"`
}
func (*Value_IpAddressValue) Equal ¶
func (this *Value_IpAddressValue) Equal(that interface{}) bool
func (*Value_IpAddressValue) GoString ¶
func (this *Value_IpAddressValue) GoString() string
func (*Value_IpAddressValue) MarshalTo ¶
func (m *Value_IpAddressValue) MarshalTo(dAtA []byte) (int, error)
func (*Value_IpAddressValue) Size ¶
func (m *Value_IpAddressValue) Size() (n int)
func (*Value_IpAddressValue) String ¶
func (this *Value_IpAddressValue) String() string
type Value_StringValue ¶
type Value_StringValue struct {
StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"`
}
func (*Value_StringValue) Equal ¶
func (this *Value_StringValue) Equal(that interface{}) bool
func (*Value_StringValue) GoString ¶
func (this *Value_StringValue) GoString() string
func (*Value_StringValue) MarshalTo ¶
func (m *Value_StringValue) MarshalTo(dAtA []byte) (int, error)
func (*Value_StringValue) Size ¶
func (m *Value_StringValue) Size() (n int)
func (*Value_StringValue) String ¶
func (this *Value_StringValue) String() string
type Value_TimestampValue ¶
type Value_TimestampValue struct {
TimestampValue *TimeStamp `protobuf:"bytes,6,opt,name=timestamp_value,json=timestampValue,oneof"`
}
func (*Value_TimestampValue) Equal ¶
func (this *Value_TimestampValue) Equal(that interface{}) bool
func (*Value_TimestampValue) GoString ¶
func (this *Value_TimestampValue) GoString() string
func (*Value_TimestampValue) MarshalTo ¶
func (m *Value_TimestampValue) MarshalTo(dAtA []byte) (int, error)
func (*Value_TimestampValue) Size ¶
func (m *Value_TimestampValue) Size() (n int)
func (*Value_TimestampValue) String ¶
func (this *Value_TimestampValue) String() string
type Value_UriValue ¶
type Value_UriValue struct {
UriValue *Uri `protobuf:"bytes,10,opt,name=uri_value,json=uriValue,oneof"`
}
func (*Value_UriValue) Equal ¶
func (this *Value_UriValue) Equal(that interface{}) bool
func (*Value_UriValue) GoString ¶
func (this *Value_UriValue) GoString() string
func (*Value_UriValue) Size ¶
func (m *Value_UriValue) Size() (n int)
func (*Value_UriValue) String ¶
func (this *Value_UriValue) String() string