istio_mixer_v1_config

package
v0.0.0-...-75ecdd0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package istio_mixer_v1_config is a generated protocol buffer package.

It is generated from these files:

mixer/v1/config/cfg.proto

It has these top-level messages:

ServiceConfig
AspectRule
Aspect
Adapter
GlobalConfig
AttributeManifest
Uri
IpAddress
DnsName
EmailAddress

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	// Required, must be unique per `kind`. Used by [Aspect][istio.mixer.v1.config.Aspect]
	// to refer to this adapter. The name "default" is special: when an Aspect does not
	// specify a name, the Adapter named "default" of the same `kind` is used to execute
	// the intention described by the [AspectRule][istio.mixer.v1.config.AspectRule]s.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// Required. The aspect this implementation with these params will implement;
	// a single adapter implementation may implement many aspects, but an `Adapter`
	// entry is required per kind.
	Kind string `protobuf:"bytes,2,opt,name=kind" json:"kind,omitempty"`
	// Required. The name of a specific adapter implementation. An adapter's
	// implementation name is typically a constant in its code.
	Impl string `protobuf:"bytes,3,opt,name=impl" json:"impl,omitempty"`
	// Optional, depends on adapter implementation. Struct representation of a
	// proto defined by the implementation; this varies depending on `impl`.
	Params interface{} `protobuf:"bytes,4,opt,name=params" json:"params,omitempty"`
}

Adapter allows the operator to configure a specific adapter implementation. Each adapter implementation defines its own `params` proto. Note that unlike Aspect[istio.mixer.v1.config.Aspect], the type of `params` varies with `impl` and not with `kind`.

In the following example we define a `metrics` adapter using the Mixer's prepackaged prometheus adapter. This adapter doesn't require any parameters.

```yaml kind: metrics name: prometheus-adapter impl: prometheus params: ```

func (*Adapter) Descriptor

func (*Adapter) Descriptor() ([]byte, []int)

func (*Adapter) GetImpl

func (m *Adapter) GetImpl() string

func (*Adapter) GetKind

func (m *Adapter) GetKind() string

func (*Adapter) GetName

func (m *Adapter) GetName() string

func (*Adapter) GetParams

func (m *Adapter) GetParams() interface{}

func (*Adapter) ProtoMessage

func (*Adapter) ProtoMessage()

func (*Adapter) Reset

func (m *Adapter) Reset()

func (*Adapter) String

func (m *Adapter) String() string

type Aspect

type Aspect struct {
	// Required. The kind of aspect this intent is targeting.
	Kind string `protobuf:"bytes,1,opt,name=kind" json:"kind,omitempty"`
	// Optional. The name of the adapter this Aspect targets. If no name is provided,
	// Mixer will use the adapter of the target kind named "default".
	Adapter string `protobuf:"bytes,2,opt,name=adapter" json:"adapter,omitempty"`
	// Required. Struct representation of a proto defined by each aspect kind.
	Params interface{} `protobuf:"bytes,4,opt,name=params" json:"params,omitempty"`
}

Aspect describes how an adapter is intended to operate in the context of the rule it's embedded in. The value for `params` depends on the `kind` of this aspect: each kind of aspect defines its own `params` proto.

The following example instructs Mixer to populate a metric named "response_time" that was declared to have three labels: src_consumer_id, target_response_status_code, and target_service_name. For each label and the metric's `value` we provide an expression over Istio's attributes. Mixer evaluates these expressions for each request.

```yaml kind: metrics params:

metrics:
- descriptorName: response_time # tie this metric to a descriptor of the same name
  value: response.time  # from the set of canonical attributes
  labels:
    src_consumer_id: source.user | source.uid
    target_response_status_code: response.code
    target_service_name: target.service

```

func (*Aspect) Descriptor

func (*Aspect) Descriptor() ([]byte, []int)

func (*Aspect) GetAdapter

func (m *Aspect) GetAdapter() string

func (*Aspect) GetKind

func (m *Aspect) GetKind() string

func (*Aspect) GetParams

func (m *Aspect) GetParams() interface{}

func (*Aspect) ProtoMessage

func (*Aspect) ProtoMessage()

func (*Aspect) Reset

func (m *Aspect) Reset()

func (*Aspect) String

func (m *Aspect) String() string

type AspectRule

type AspectRule struct {
	// Required. Selector is an attribute based predicate. When Mixer receives a
	// request it evaluates all selectors in scope and executes the rules for all
	// selectors that evaluated to true.
	//
	// A few example selectors:
	//
	// * an empty selector evaluates to `true`
	// * `true`, a boolean literal; a rule with this selector will always be executed
	// * `target.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
	Selector string `protobuf:"bytes,1,opt,name=selector" json:"selector,omitempty"`
	// The aspects that apply when selector evaluates to `true`.
	Aspects []*Aspect `protobuf:"bytes,2,rep,name=aspects" json:"aspects,omitempty"`
	// Nested aspect rules; their selectors are evaluated if this selector
	// predicate evaluates to `true`.
	Rules []*AspectRule `protobuf:"bytes,3,rep,name=rules" json:"rules,omitempty"`
}

An AspectRule is a selector and a set of intentions to be executed when the selector is `true`. The selectors of the this rule's child AspectRules are only evaluated if this rule's selector is true.

func (*AspectRule) Descriptor

func (*AspectRule) Descriptor() ([]byte, []int)

func (*AspectRule) GetAspects

func (m *AspectRule) GetAspects() []*Aspect

func (*AspectRule) GetRules

func (m *AspectRule) GetRules() []*AspectRule

func (*AspectRule) GetSelector

func (m *AspectRule) GetSelector() string

func (*AspectRule) ProtoMessage

func (*AspectRule) ProtoMessage()

func (*AspectRule) Reset

func (m *AspectRule) Reset()

func (*AspectRule) String

func (m *AspectRule) String() string

type AttributeManifest

type AttributeManifest struct {
	// Optional. The revision of this document. Assigned by server.
	Revision string `protobuf:"bytes,1,opt,name=revision" 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" 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 `` /* 140-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 (*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" json:"description,omitempty"`
	// Required. The type of data carried by this attribute.
	ValueType istio_mixer_v1_config_descriptor.ValueType `` /* 130-byte string literal not displayed */
}

AttributeInfo describes the type of an attribute named in this configuration.

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 (*AttributeManifest_AttributeInfo) ProtoMessage

func (*AttributeManifest_AttributeInfo) ProtoMessage()

func (*AttributeManifest_AttributeInfo) Reset

func (*AttributeManifest_AttributeInfo) String

type Combined

type Combined struct {
	Builder *Adapter
	Aspect  *Aspect
}

Combined config is given to aspect managers.

func (*Combined) String

func (c *Combined) String() (ret string)

type DnsName

type DnsName struct {
	Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"`
}

DnsName holds a valid domain name.

func (*DnsName) Descriptor

func (*DnsName) Descriptor() ([]byte, []int)

func (*DnsName) GetValue

func (m *DnsName) GetValue() string

func (*DnsName) ProtoMessage

func (*DnsName) ProtoMessage()

func (*DnsName) Reset

func (m *DnsName) Reset()

func (*DnsName) String

func (m *DnsName) String() string

type EmailAddress

type EmailAddress struct {
	Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"`
}

EmailAddress holds a properly formatted email address.

func (*EmailAddress) Descriptor

func (*EmailAddress) Descriptor() ([]byte, []int)

func (*EmailAddress) GetValue

func (m *EmailAddress) GetValue() string

func (*EmailAddress) ProtoMessage

func (*EmailAddress) ProtoMessage()

func (*EmailAddress) Reset

func (m *EmailAddress) Reset()

func (*EmailAddress) String

func (m *EmailAddress) String() string

type GlobalConfig

type GlobalConfig struct {
	// Optional.
	Revision  string               `protobuf:"bytes,1,opt,name=revision" json:"revision,omitempty"`
	Adapters  []*Adapter           `protobuf:"bytes,2,rep,name=adapters" json:"adapters,omitempty"`
	Manifests []*AttributeManifest `protobuf:"bytes,3,rep,name=manifests" json:"manifests,omitempty"`
	// TODO: remove these in https://github.com/istio/api/pull/45
	Logs               []*istio_mixer_v1_config_descriptor1.LogEntryDescriptor          `protobuf:"bytes,4,rep,name=logs" json:"logs,omitempty"`
	Metrics            []*istio_mixer_v1_config_descriptor2.MetricDescriptor            `protobuf:"bytes,5,rep,name=metrics" json:"metrics,omitempty"`
	MonitoredResources []*istio_mixer_v1_config_descriptor3.MonitoredResourceDescriptor `protobuf:"bytes,6,rep,name=monitored_resources,json=monitoredResources" json:"monitored_resources,omitempty"`
	Principals         []*istio_mixer_v1_config_descriptor4.PrincipalDescriptor         `protobuf:"bytes,7,rep,name=principals" json:"principals,omitempty"`
	Quotas             []*istio_mixer_v1_config_descriptor5.QuotaDescriptor             `protobuf:"bytes,8,rep,name=quotas" json:"quotas,omitempty"`
}

GlobalConfig defines configuration elements that are available for the rest of the config. It is used to configure adapters and make them available in AspectRules.

(== deprecation_description GlobalConfig is deprecated, see the Config API's swagger spec. ==)

func (*GlobalConfig) Descriptor

func (*GlobalConfig) Descriptor() ([]byte, []int)

func (*GlobalConfig) GetAdapters

func (m *GlobalConfig) GetAdapters() []*Adapter

func (*GlobalConfig) GetLogs

func (*GlobalConfig) GetManifests

func (m *GlobalConfig) GetManifests() []*AttributeManifest

func (*GlobalConfig) GetMetrics

func (*GlobalConfig) GetMonitoredResources

func (*GlobalConfig) GetPrincipals

func (*GlobalConfig) GetQuotas

func (*GlobalConfig) GetRevision

func (m *GlobalConfig) GetRevision() string

func (*GlobalConfig) ProtoMessage

func (*GlobalConfig) ProtoMessage()

func (*GlobalConfig) Reset

func (m *GlobalConfig) Reset()

func (*GlobalConfig) String

func (m *GlobalConfig) String() string

type IpAddress

type IpAddress struct {
	Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
}

IpAddress holds an IPv4 or IPv6 address.

func (*IpAddress) Descriptor

func (*IpAddress) Descriptor() ([]byte, []int)

func (*IpAddress) GetValue

func (m *IpAddress) GetValue() []byte

func (*IpAddress) ProtoMessage

func (*IpAddress) ProtoMessage()

func (*IpAddress) Reset

func (m *IpAddress) Reset()

func (*IpAddress) String

func (m *IpAddress) String() string

type ServiceConfig

type ServiceConfig struct {
	// Optional. Subject is unique for a config type.
	// 2 config with the same subject will overwrite each other
	Subject string `protobuf:"bytes,1,opt,name=subject" json:"subject,omitempty"`
	// Optional. revision of this config. This is assigned by the server
	Revision string        `protobuf:"bytes,2,opt,name=revision" json:"revision,omitempty"`
	Rules    []*AspectRule `protobuf:"bytes,3,rep,name=rules" json:"rules,omitempty"`
}

Configures a set of services.

The following example configures a metric that will be recorded for all services:

```yaml subject: "namespace:ns1" revision: "1011" rules:

  • selector: target.service == "*" aspects:
  • kind: metrics params: metrics: # defines metric collection across the board.
  • descriptorName: response_time_by_status_code value: response.time labels: statusCode: response.code

```

(== deprecation_description ServiceConfig is deprecated, see the Config API's swagger spec. ==)

func (*ServiceConfig) Descriptor

func (*ServiceConfig) Descriptor() ([]byte, []int)

func (*ServiceConfig) GetRevision

func (m *ServiceConfig) GetRevision() string

func (*ServiceConfig) GetRules

func (m *ServiceConfig) GetRules() []*AspectRule

func (*ServiceConfig) GetSubject

func (m *ServiceConfig) GetSubject() string

func (*ServiceConfig) ProtoMessage

func (*ServiceConfig) ProtoMessage()

func (*ServiceConfig) Reset

func (m *ServiceConfig) Reset()

func (*ServiceConfig) String

func (m *ServiceConfig) String() string

type Uri

type Uri struct {
	Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"`
}

Uri represents a properly formed URI.

func (*Uri) Descriptor

func (*Uri) Descriptor() ([]byte, []int)

func (*Uri) GetValue

func (m *Uri) GetValue() string

func (*Uri) ProtoMessage

func (*Uri) ProtoMessage()

func (*Uri) Reset

func (m *Uri) Reset()

func (*Uri) String

func (m *Uri) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL