use istio client-go library instead of knative (#1661)
use istio client-go library instead of knative bump kubernetes dependency version change code coverage to codecov
This commit is contained in:
1930
vendor/istio.io/api/mixer/v1/config/client/api_spec.pb.go
generated
vendored
Normal file
1930
vendor/istio.io/api/mixer/v1/config/client/api_spec.pb.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
256
vendor/istio.io/api/mixer/v1/config/client/api_spec.proto
generated
vendored
Normal file
256
vendor/istio.io/api/mixer/v1/config/client/api_spec.proto
generated
vendored
Normal file
@@ -0,0 +1,256 @@
|
||||
// Copyright 2017 Istio Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package istio.mixer.v1.config.client;
|
||||
|
||||
option go_package="istio.io/api/mixer/v1/config/client";
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/api/field_behavior.proto";
|
||||
|
||||
import "mixer/v1/attributes.proto";
|
||||
import "mixer/v1/config/client/service.proto";
|
||||
|
||||
option (gogoproto.goproto_getters_all) = false;
|
||||
option (gogoproto.equal_all) = false;
|
||||
option (gogoproto.gostring_all) = false;
|
||||
option (gogoproto.stable_marshaler_all) = true;
|
||||
|
||||
// HTTPAPISpec defines the canonical configuration for generating
|
||||
// API-related attributes from HTTP requests based on the method and
|
||||
// uri templated path matches. It is sufficient for defining the API
|
||||
// surface of a service for the purposes of API attribute
|
||||
// generation. It is not intended to represent auth, quota,
|
||||
// documentation, or other information commonly found in other API
|
||||
// specifications, e.g. OpenAPI.
|
||||
//
|
||||
// Existing standards that define operations (or methods) in terms of
|
||||
// HTTP methods and paths can be normalized to this format for use in
|
||||
// Istio. For example, a simple petstore API described by OpenAPIv2
|
||||
// [here](https://github.com/googleapis/gnostic/blob/master/examples/v2.0/yaml/petstore-simple.yaml)
|
||||
// can be represented with the following HTTPAPISpec.
|
||||
//
|
||||
// ```yaml
|
||||
// apiVersion: config.istio.io/v1alpha2
|
||||
// kind: HTTPAPISpec
|
||||
// metadata:
|
||||
// name: petstore
|
||||
// namespace: default
|
||||
// spec:
|
||||
// attributes:
|
||||
// attributes:
|
||||
// api.service:
|
||||
// stringValue: petstore.swagger.io
|
||||
// api.version:
|
||||
// stringValue: 1.0.0
|
||||
// patterns:
|
||||
// - attributes:
|
||||
// attributes:
|
||||
// api.operation:
|
||||
// stringValue: findPets
|
||||
// httpMethod: GET
|
||||
// uriTemplate: /api/pets
|
||||
// - attributes:
|
||||
// attributes:
|
||||
// api.operation:
|
||||
// stringValue: addPet
|
||||
// httpMethod: POST
|
||||
// uriTemplate: /api/pets
|
||||
// - attributes:
|
||||
// attributes:
|
||||
// api.operation:
|
||||
// stringValue: findPetById
|
||||
// httpMethod: GET
|
||||
// uriTemplate: /api/pets/{id}
|
||||
// - attributes:
|
||||
// attributes:
|
||||
// api.operation:
|
||||
// stringValue: deletePet
|
||||
// httpMethod: DELETE
|
||||
// uriTemplate: /api/pets/{id}
|
||||
// apiKeys:
|
||||
// - query: api-key
|
||||
// ```
|
||||
//
|
||||
// <!-- go code generation tags
|
||||
// +kubetype-gen
|
||||
// +kubetype-gen:groupVersion=config.istio.io/v1alpha2
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen=true
|
||||
// -->
|
||||
message HTTPAPISpec {
|
||||
// List of attributes that are generated when *any* of the HTTP
|
||||
// patterns match. This list typically includes the "api.service"
|
||||
// and "api.version" attributes.
|
||||
Attributes attributes = 1;
|
||||
|
||||
// List of HTTP patterns to match.
|
||||
repeated HTTPAPISpecPattern patterns = 2;
|
||||
|
||||
// List of APIKey that describes how to extract an API-KEY from an
|
||||
// HTTP request. The first API-Key match found in the list is used,
|
||||
// i.e. 'OR' semantics.
|
||||
//
|
||||
// The following default policies are used to generate the
|
||||
// `request.api_key` attribute if no explicit APIKey is defined.
|
||||
//
|
||||
// `query: key, `query: api_key`, and then `header: x-api-key`
|
||||
//
|
||||
repeated APIKey api_keys = 3;
|
||||
}
|
||||
|
||||
// HTTPAPISpecPattern defines a single pattern to match against
|
||||
// incoming HTTP requests. The per-pattern list of attributes is
|
||||
// generated if both the http_method and uri_template match. In
|
||||
// addition, the top-level list of attributes in the HTTPAPISpec is also
|
||||
// generated.
|
||||
//
|
||||
// ```yaml
|
||||
// pattern:
|
||||
// - attributes
|
||||
// api.operation: doFooBar
|
||||
// httpMethod: GET
|
||||
// uriTemplate: /foo/bar
|
||||
// ```
|
||||
message HTTPAPISpecPattern {
|
||||
// List of attributes that are generated if the HTTP request matches
|
||||
// the specified http_method and uri_template. This typically
|
||||
// includes the "api.operation" attribute.
|
||||
Attributes attributes = 1;
|
||||
|
||||
// HTTP request method to match against as defined by
|
||||
// [rfc7231](https://tools.ietf.org/html/rfc7231#page-21). For
|
||||
// example: GET, HEAD, POST, PUT, DELETE.
|
||||
string http_method = 2;
|
||||
|
||||
oneof pattern {
|
||||
// URI template to match against as defined by
|
||||
// [rfc6570](https://tools.ietf.org/html/rfc6570). For example, the
|
||||
// following are valid URI templates:
|
||||
//
|
||||
// /pets
|
||||
// /pets/{id}
|
||||
// /dictionary/{term:1}/{term}
|
||||
// /search{?q*,lang}
|
||||
//
|
||||
string uri_template = 3;
|
||||
|
||||
// EXPERIMENTAL:
|
||||
//
|
||||
// ecmascript style regex-based match as defined by
|
||||
// [EDCA-262](http://en.cppreference.com/w/cpp/regex/ecmascript). For
|
||||
// example,
|
||||
//
|
||||
// "^/pets/(.*?)?"
|
||||
//
|
||||
string regex = 4;
|
||||
}
|
||||
}
|
||||
|
||||
// APIKey defines the explicit configuration for generating the
|
||||
// `request.api_key` attribute from HTTP requests.
|
||||
//
|
||||
// See [API Keys](https://swagger.io/docs/specification/authentication/api-keys)
|
||||
// for a general overview of API keys as defined by OpenAPI.
|
||||
message APIKey {
|
||||
oneof key {
|
||||
// API Key is sent as a query parameter. `query` represents the
|
||||
// query string parameter name.
|
||||
//
|
||||
// For example, `query=api_key` should be used with the
|
||||
// following request:
|
||||
//
|
||||
// GET /something?api_key=abcdef12345
|
||||
//
|
||||
string query = 1;
|
||||
|
||||
// API key is sent in a request header. `header` represents the
|
||||
// header name.
|
||||
//
|
||||
// For example, `header=X-API-KEY` should be used with the
|
||||
// following request:
|
||||
//
|
||||
// GET /something HTTP/1.1
|
||||
// X-API-Key: abcdef12345
|
||||
//
|
||||
string header = 2;
|
||||
|
||||
// API key is sent in a
|
||||
// [cookie](https://swagger.io/docs/specification/authentication/cookie-authentication),
|
||||
//
|
||||
// For example, `cookie=X-API-KEY` should be used for the
|
||||
// following request:
|
||||
//
|
||||
// GET /something HTTP/1.1
|
||||
// Cookie: X-API-KEY=abcdef12345
|
||||
//
|
||||
string cookie = 3;
|
||||
}
|
||||
}
|
||||
|
||||
// HTTPAPISpecReference defines a reference to an HTTPAPISpec. This is
|
||||
// typically used for establishing bindings between an HTTPAPISpec and an
|
||||
// IstioService. For example, the following defines an
|
||||
// HTTPAPISpecReference for service `foo` in namespace `bar`.
|
||||
//
|
||||
// ```yaml
|
||||
// - name: foo
|
||||
// namespace: bar
|
||||
// ```
|
||||
message HTTPAPISpecReference {
|
||||
// The short name of the HTTPAPISpec. This is the resource
|
||||
// name defined by the metadata name field.
|
||||
string name = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// Optional namespace of the HTTPAPISpec. Defaults to the encompassing
|
||||
// HTTPAPISpecBinding's metadata namespace field.
|
||||
string namespace = 2;
|
||||
}
|
||||
|
||||
// HTTPAPISpecBinding defines the binding between HTTPAPISpecs and one or more
|
||||
// IstioService. For example, the following establishes a binding
|
||||
// between the HTTPAPISpec `petstore` and service `foo` in namespace `bar`.
|
||||
//
|
||||
// ```yaml
|
||||
// apiVersion: config.istio.io/v1alpha2
|
||||
// kind: HTTPAPISpecBinding
|
||||
// metadata:
|
||||
// name: my-binding
|
||||
// namespace: default
|
||||
// spec:
|
||||
// services:
|
||||
// - name: foo
|
||||
// namespace: bar
|
||||
// apiSpecs:
|
||||
// - name: petstore
|
||||
// namespace: default
|
||||
// ```
|
||||
//
|
||||
// <!-- go code generation tags
|
||||
// +kubetype-gen
|
||||
// +kubetype-gen:groupVersion=config.istio.io/v1alpha2
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen=true
|
||||
// -->
|
||||
message HTTPAPISpecBinding {
|
||||
// One or more services to map the listed HTTPAPISpec onto.
|
||||
repeated IstioService services = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// One or more HTTPAPISpec references that should be mapped to
|
||||
// the specified service(s). The aggregate collection of match
|
||||
// conditions defined in the HTTPAPISpecs should not overlap.
|
||||
repeated HTTPAPISpecReference api_specs = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
}
|
||||
30
vendor/istio.io/api/mixer/v1/config/client/api_spec_deepcopy.gen.go
generated
vendored
Normal file
30
vendor/istio.io/api/mixer/v1/config/client/api_spec_deepcopy.gen.go
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: mixer/v1/config/client/api_spec.proto
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "istio.io/api/mixer/v1"
|
||||
_ "istio.io/gogo-genproto/googleapis/google/api"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// DeepCopyInto supports using HTTPAPISpec within kubernetes types, where deepcopy-gen is used.
|
||||
func (in *HTTPAPISpec) DeepCopyInto(out *HTTPAPISpec) {
|
||||
p := proto.Clone(in).(*HTTPAPISpec)
|
||||
*out = *p
|
||||
}
|
||||
|
||||
// DeepCopyInto supports using HTTPAPISpecBinding within kubernetes types, where deepcopy-gen is used.
|
||||
func (in *HTTPAPISpecBinding) DeepCopyInto(out *HTTPAPISpecBinding) {
|
||||
p := proto.Clone(in).(*HTTPAPISpecBinding)
|
||||
*out = *p
|
||||
}
|
||||
80
vendor/istio.io/api/mixer/v1/config/client/api_spec_json.gen.go
generated
vendored
Normal file
80
vendor/istio.io/api/mixer/v1/config/client/api_spec_json.gen.go
generated
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: mixer/v1/config/client/api_spec.proto
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
bytes "bytes"
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "istio.io/api/mixer/v1"
|
||||
_ "istio.io/gogo-genproto/googleapis/google/api"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// MarshalJSON is a custom marshaler for HTTPAPISpec
|
||||
func (this *HTTPAPISpec) MarshalJSON() ([]byte, error) {
|
||||
str, err := ApiSpecMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for HTTPAPISpec
|
||||
func (this *HTTPAPISpec) UnmarshalJSON(b []byte) error {
|
||||
return ApiSpecUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for HTTPAPISpecPattern
|
||||
func (this *HTTPAPISpecPattern) MarshalJSON() ([]byte, error) {
|
||||
str, err := ApiSpecMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for HTTPAPISpecPattern
|
||||
func (this *HTTPAPISpecPattern) UnmarshalJSON(b []byte) error {
|
||||
return ApiSpecUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for APIKey
|
||||
func (this *APIKey) MarshalJSON() ([]byte, error) {
|
||||
str, err := ApiSpecMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for APIKey
|
||||
func (this *APIKey) UnmarshalJSON(b []byte) error {
|
||||
return ApiSpecUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for HTTPAPISpecReference
|
||||
func (this *HTTPAPISpecReference) MarshalJSON() ([]byte, error) {
|
||||
str, err := ApiSpecMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for HTTPAPISpecReference
|
||||
func (this *HTTPAPISpecReference) UnmarshalJSON(b []byte) error {
|
||||
return ApiSpecUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for HTTPAPISpecBinding
|
||||
func (this *HTTPAPISpecBinding) MarshalJSON() ([]byte, error) {
|
||||
str, err := ApiSpecMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for HTTPAPISpecBinding
|
||||
func (this *HTTPAPISpecBinding) UnmarshalJSON(b []byte) error {
|
||||
return ApiSpecUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
var (
|
||||
ApiSpecMarshaler = &github_com_gogo_protobuf_jsonpb.Marshaler{}
|
||||
ApiSpecUnmarshaler = &github_com_gogo_protobuf_jsonpb.Unmarshaler{}
|
||||
)
|
||||
2677
vendor/istio.io/api/mixer/v1/config/client/client_config.pb.go
generated
vendored
Normal file
2677
vendor/istio.io/api/mixer/v1/config/client/client_config.pb.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
219
vendor/istio.io/api/mixer/v1/config/client/client_config.proto
generated
vendored
Normal file
219
vendor/istio.io/api/mixer/v1/config/client/client_config.proto
generated
vendored
Normal file
@@ -0,0 +1,219 @@
|
||||
// Copyright 2017 Istio Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/protobuf/duration.proto";
|
||||
|
||||
import "mixer/v1/attributes.proto";
|
||||
import "mixer/v1/config/client/api_spec.proto";
|
||||
import "mixer/v1/config/client/quota.proto";
|
||||
|
||||
// $title: Mixer Client
|
||||
// $description: Configuration state for the Mixer client library.
|
||||
// $location: https://istio.io/docs/reference/config/policy-and-telemetry/istio.mixer.v1.config.client
|
||||
|
||||
// Describes the configuration state for the Mixer client library that's built into Envoy.
|
||||
package istio.mixer.v1.config.client;
|
||||
|
||||
option go_package = "istio.io/api/mixer/v1/config/client";
|
||||
|
||||
option (gogoproto.goproto_getters_all) = false;
|
||||
option (gogoproto.equal_all) = false;
|
||||
option (gogoproto.gostring_all) = false;
|
||||
option (gogoproto.stable_marshaler_all) = true;
|
||||
|
||||
// Specifies the behavior when the client is unable to connect to Mixer.
|
||||
message NetworkFailPolicy {
|
||||
// Describes the policy.
|
||||
enum FailPolicy {
|
||||
// If network connection fails, request is allowed and delivered to the
|
||||
// service.
|
||||
FAIL_OPEN = 0;
|
||||
|
||||
// If network connection fails, request is rejected.
|
||||
FAIL_CLOSE = 1;
|
||||
}
|
||||
|
||||
// Specifies the behavior when the client is unable to connect to Mixer.
|
||||
FailPolicy policy = 1;
|
||||
|
||||
// Max retries on transport error.
|
||||
uint32 max_retry = 2;
|
||||
|
||||
// Base time to wait between retries. Will be adjusted by exponential
|
||||
// backoff and jitter.
|
||||
google.protobuf.Duration base_retry_wait = 3;
|
||||
|
||||
// Max time to wait between retries.
|
||||
google.protobuf.Duration max_retry_wait = 4;
|
||||
}
|
||||
|
||||
// Defines the per-service client configuration.
|
||||
message ServiceConfig {
|
||||
// If true, do not call Mixer Check.
|
||||
bool disable_check_calls = 1;
|
||||
|
||||
// If true, do not call Mixer Report.
|
||||
bool disable_report_calls = 2;
|
||||
|
||||
// Send these attributes to Mixer in both Check and Report. This
|
||||
// typically includes the "destination.service" attribute.
|
||||
// In case of a per-route override, per-route attributes take precedence
|
||||
// over the attributes supplied in the client configuration.
|
||||
Attributes mixer_attributes = 3;
|
||||
|
||||
// HTTP API specifications to generate API attributes.
|
||||
repeated HTTPAPISpec http_api_spec = 4;
|
||||
|
||||
// Quota specifications to generate quota requirements.
|
||||
repeated QuotaSpec quota_spec = 5;
|
||||
|
||||
// Specifies the behavior when the client is unable to connect to Mixer.
|
||||
// This is the service-level policy. It overrides
|
||||
// [mesh-level
|
||||
// policy][istio.mixer.v1.config.client.TransportConfig.network_fail_policy].
|
||||
NetworkFailPolicy network_fail_policy = 7;
|
||||
|
||||
// Default attributes to forward to upstream. This typically
|
||||
// includes the "source.ip" and "source.uid" attributes.
|
||||
// In case of a per-route override, per-route attributes take precedence
|
||||
// over the attributes supplied in the client configuration.
|
||||
//
|
||||
// Forwarded attributes take precedence over the static Mixer attributes,
|
||||
// except in cases where there is clear configuration to ignore forwarded
|
||||
// attributes. Gateways, for instance, should never use forwarded attributes.
|
||||
//
|
||||
// The full order of application is as follows:
|
||||
// 1. static Mixer attributes from the filter config;
|
||||
// 2. static Mixer attributes from the route config;
|
||||
// 3. forwarded attributes from the source filter config (if any and not ignored);
|
||||
// 4. forwarded attributes from the source route config (if any and not ignored);
|
||||
// 5. derived attributes from the request metadata.
|
||||
Attributes forward_attributes = 8;
|
||||
}
|
||||
|
||||
// Defines the transport config on how to call Mixer.
|
||||
message TransportConfig {
|
||||
// The flag to disable check cache.
|
||||
bool disable_check_cache = 1;
|
||||
|
||||
// The flag to disable quota cache.
|
||||
bool disable_quota_cache = 2;
|
||||
|
||||
// The flag to disable report batch.
|
||||
bool disable_report_batch = 3;
|
||||
|
||||
// Specifies the behavior when the client is unable to connect to Mixer.
|
||||
// This is the mesh level policy. The default value for policy is FAIL_OPEN.
|
||||
NetworkFailPolicy network_fail_policy = 4;
|
||||
|
||||
// Specify refresh interval to write Mixer client statistics to Envoy share
|
||||
// memory. If not specified, the interval is 10 seconds.
|
||||
google.protobuf.Duration stats_update_interval = 5;
|
||||
|
||||
// Name of the cluster that will forward check calls to a pool of mixer
|
||||
// servers. Defaults to "mixer_server". By using different names for
|
||||
// checkCluster and reportCluster, it is possible to have one set of
|
||||
// Mixer servers handle check calls, while another set of Mixer servers
|
||||
// handle report calls.
|
||||
//
|
||||
// NOTE: Any value other than the default "mixer_server" will require the
|
||||
// Istio Grafana dashboards to be reconfigured to use the new name.
|
||||
string check_cluster = 6;
|
||||
|
||||
// Name of the cluster that will forward report calls to a pool of mixer
|
||||
// servers. Defaults to "mixer_server". By using different names for
|
||||
// checkCluster and reportCluster, it is possible to have one set of
|
||||
// Mixer servers handle check calls, while another set of Mixer servers
|
||||
// handle report calls.
|
||||
//
|
||||
// NOTE: Any value other than the default "mixer_server" will require the
|
||||
// Istio Grafana dashboards to be reconfigured to use the new name.
|
||||
string report_cluster = 7;
|
||||
|
||||
// Default attributes to forward to Mixer upstream. This typically
|
||||
// includes the "source.ip" and "source.uid" attributes. These
|
||||
// attributes are consumed by the proxy in front of mixer.
|
||||
Attributes attributes_for_mixer_proxy = 8;
|
||||
|
||||
// When disable_report_batch is false, this value specifies the maximum number
|
||||
// of requests that are batched in report. If left unspecified, the default value
|
||||
// of report_batch_max_entries == 0 will use the hardcoded defaults of
|
||||
// istio::mixerclient::ReportOptions.
|
||||
uint32 report_batch_max_entries = 9;
|
||||
|
||||
// When disable_report_batch is false, this value specifies the maximum elapsed
|
||||
// time a batched report will be sent after a user request is processed. If left
|
||||
// unspecified, the default report_batch_max_time == 0 will use the hardcoded
|
||||
// defaults of istio::mixerclient::ReportOptions.
|
||||
google.protobuf.Duration report_batch_max_time = 10;
|
||||
}
|
||||
|
||||
// Defines the client config for HTTP.
|
||||
message HttpClientConfig {
|
||||
// The transport config.
|
||||
TransportConfig transport = 1;
|
||||
|
||||
// Map of control configuration indexed by destination.service. This
|
||||
// is used to support per-service configuration for cases where a
|
||||
// mixerclient serves multiple services.
|
||||
map<string, ServiceConfig> service_configs = 2;
|
||||
|
||||
// Default destination service name if none was specified in the
|
||||
// client request.
|
||||
string default_destination_service = 3;
|
||||
|
||||
// Default attributes to send to Mixer in both Check and
|
||||
// Report. This typically includes "destination.ip" and
|
||||
// "destination.uid" attributes.
|
||||
Attributes mixer_attributes = 4;
|
||||
|
||||
// Default attributes to forward to upstream. This typically
|
||||
// includes the "source.ip" and "source.uid" attributes.
|
||||
Attributes forward_attributes = 5;
|
||||
|
||||
// Whether or not to use attributes forwarded in the request headers to
|
||||
// create the attribute bag to send to mixer. For intra-mesh traffic,
|
||||
// this should be set to "false". For ingress/egress gateways, this
|
||||
// should be set to "true".
|
||||
bool ignore_forwarded_attributes = 6;
|
||||
}
|
||||
|
||||
// Defines the client config for TCP.
|
||||
message TcpClientConfig {
|
||||
// The transport config.
|
||||
TransportConfig transport = 1;
|
||||
|
||||
// Default attributes to send to Mixer in both Check and
|
||||
// Report. This typically includes "destination.ip" and
|
||||
// "destination.uid" attributes.
|
||||
Attributes mixer_attributes = 2;
|
||||
|
||||
// If set to true, disables Mixer check calls.
|
||||
bool disable_check_calls = 3;
|
||||
|
||||
// If set to true, disables Mixer check calls.
|
||||
bool disable_report_calls = 4;
|
||||
|
||||
// Quota specifications to generate quota requirements.
|
||||
// It applies on the new TCP connections.
|
||||
QuotaSpec connection_quota_spec = 5;
|
||||
|
||||
// Specify report interval to send periodical reports for long TCP
|
||||
// connections. If not specified, the interval is 10 seconds. This interval
|
||||
// should not be less than 1 second, otherwise it will be reset to 1 second.
|
||||
google.protobuf.Duration report_interval = 6;
|
||||
}
|
||||
82
vendor/istio.io/api/mixer/v1/config/client/client_config_json.gen.go
generated
vendored
Normal file
82
vendor/istio.io/api/mixer/v1/config/client/client_config_json.gen.go
generated
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: mixer/v1/config/client/client_config.proto
|
||||
|
||||
// Describes the configuration state for the Mixer client library that's built into Envoy.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
bytes "bytes"
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/gogo/protobuf/types"
|
||||
_ "istio.io/api/mixer/v1"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// MarshalJSON is a custom marshaler for NetworkFailPolicy
|
||||
func (this *NetworkFailPolicy) MarshalJSON() ([]byte, error) {
|
||||
str, err := ClientConfigMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for NetworkFailPolicy
|
||||
func (this *NetworkFailPolicy) UnmarshalJSON(b []byte) error {
|
||||
return ClientConfigUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for ServiceConfig
|
||||
func (this *ServiceConfig) MarshalJSON() ([]byte, error) {
|
||||
str, err := ClientConfigMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for ServiceConfig
|
||||
func (this *ServiceConfig) UnmarshalJSON(b []byte) error {
|
||||
return ClientConfigUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for TransportConfig
|
||||
func (this *TransportConfig) MarshalJSON() ([]byte, error) {
|
||||
str, err := ClientConfigMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for TransportConfig
|
||||
func (this *TransportConfig) UnmarshalJSON(b []byte) error {
|
||||
return ClientConfigUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for HttpClientConfig
|
||||
func (this *HttpClientConfig) MarshalJSON() ([]byte, error) {
|
||||
str, err := ClientConfigMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for HttpClientConfig
|
||||
func (this *HttpClientConfig) UnmarshalJSON(b []byte) error {
|
||||
return ClientConfigUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for TcpClientConfig
|
||||
func (this *TcpClientConfig) MarshalJSON() ([]byte, error) {
|
||||
str, err := ClientConfigMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for TcpClientConfig
|
||||
func (this *TcpClientConfig) UnmarshalJSON(b []byte) error {
|
||||
return ClientConfigUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
var (
|
||||
ClientConfigMarshaler = &github_com_gogo_protobuf_jsonpb.Marshaler{}
|
||||
ClientConfigUnmarshaler = &github_com_gogo_protobuf_jsonpb.Unmarshaler{}
|
||||
)
|
||||
626
vendor/istio.io/api/mixer/v1/config/client/istio.mixer.v1.config.client.json
generated
vendored
Normal file
626
vendor/istio.io/api/mixer/v1/config/client/istio.mixer.v1.config.client.json
generated
vendored
Normal file
@@ -0,0 +1,626 @@
|
||||
{
|
||||
"openapi": "3.0.0",
|
||||
"info": {
|
||||
"title": "Configuration state for the Mixer client library.",
|
||||
"version": "client"
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"istio.mixer.v1.config.client.HTTPAPISpec": {
|
||||
"description": "HTTPAPISpec defines the canonical configuration for generating API-related attributes from HTTP requests based on the method and uri templated path matches. It is sufficient for defining the API surface of a service for the purposes of API attribute generation. It is not intended to represent auth, quota, documentation, or other information commonly found in other API specifications, e.g. OpenAPI.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"attributes": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.Attributes"
|
||||
},
|
||||
"patterns": {
|
||||
"description": "List of HTTP patterns to match.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.config.client.HTTPAPISpecPattern"
|
||||
}
|
||||
},
|
||||
"apiKeys": {
|
||||
"description": "List of APIKey that describes how to extract an API-KEY from an HTTP request. The first API-Key match found in the list is used, i.e. 'OR' semantics.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.config.client.APIKey"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.mixer.v1.config.client.HTTPAPISpecPattern": {
|
||||
"description": "HTTPAPISpecPattern defines a single pattern to match against incoming HTTP requests. The per-pattern list of attributes is generated if both the http_method and uri_template match. In addition, the top-level list of attributes in the HTTPAPISpec is also generated.",
|
||||
"type": "object",
|
||||
"oneOf": [
|
||||
{
|
||||
"required": [
|
||||
"uriTemplate"
|
||||
],
|
||||
"properties": {
|
||||
"attributes": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.Attributes"
|
||||
},
|
||||
"httpMethod": {
|
||||
"description": "HTTP request method to match against as defined by [rfc7231](https://tools.ietf.org/html/rfc7231#page-21). For example: GET, HEAD, POST, PUT, DELETE.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"uriTemplate": {
|
||||
"description": "URI template to match against as defined by [rfc6570](https://tools.ietf.org/html/rfc6570). For example, the following are valid URI templates: /pets /pets/{id} /dictionary/{term:1}/{term} /search{?q*,lang}",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"regex"
|
||||
],
|
||||
"properties": {
|
||||
"attributes": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.Attributes"
|
||||
},
|
||||
"regex": {
|
||||
"description": "EXPERIMENTAL: ecmascript style regex-based match as defined by [EDCA-262](http://en.cppreference.com/w/cpp/regex/ecmascript). For example,",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"httpMethod": {
|
||||
"description": "HTTP request method to match against as defined by [rfc7231](https://tools.ietf.org/html/rfc7231#page-21). For example: GET, HEAD, POST, PUT, DELETE.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"istio.mixer.v1.config.client.APIKey": {
|
||||
"description": "APIKey defines the explicit configuration for generating the `request.api_key` attribute from HTTP requests.",
|
||||
"type": "object",
|
||||
"oneOf": [
|
||||
{
|
||||
"required": [
|
||||
"query"
|
||||
],
|
||||
"properties": {
|
||||
"query": {
|
||||
"description": "API Key is sent as a query parameter. `query` represents the query string parameter name.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"header"
|
||||
],
|
||||
"properties": {
|
||||
"header": {
|
||||
"description": "API key is sent in a request header. `header` represents the header name.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"cookie"
|
||||
],
|
||||
"properties": {
|
||||
"cookie": {
|
||||
"description": "API key is sent in a [cookie](https://swagger.io/docs/specification/authentication/cookie-authentication),",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"istio.mixer.v1.config.client.HTTPAPISpecReference": {
|
||||
"description": "HTTPAPISpecReference defines a reference to an HTTPAPISpec. This is typically used for establishing bindings between an HTTPAPISpec and an IstioService. For example, the following defines an HTTPAPISpecReference for service `foo` in namespace `bar`.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "The short name of the HTTPAPISpec. This is the resource name defined by the metadata name field.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"namespace": {
|
||||
"description": "Optional namespace of the HTTPAPISpec. Defaults to the encompassing HTTPAPISpecBinding's metadata namespace field.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.mixer.v1.config.client.HTTPAPISpecBinding": {
|
||||
"description": "HTTPAPISpecBinding defines the binding between HTTPAPISpecs and one or more IstioService. For example, the following establishes a binding between the HTTPAPISpec `petstore` and service `foo` in namespace `bar`.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"services": {
|
||||
"description": "One or more services to map the listed HTTPAPISpec onto.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.config.client.IstioService"
|
||||
}
|
||||
},
|
||||
"apiSpecs": {
|
||||
"description": "One or more HTTPAPISpec references that should be mapped to the specified service(s). The aggregate collection of match conditions defined in the HTTPAPISpecs should not overlap.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.config.client.HTTPAPISpecReference"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.mixer.v1.config.client.IstioService": {
|
||||
"description": "IstioService identifies a service and optionally service version. The FQDN of the service is composed from the name, namespace, and implementation-specific domain suffix (e.g. on Kubernetes, \"reviews\" + \"default\" + \"svc.cluster.local\" -\u003e \"reviews.default.svc.cluster.local\").",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "The short name of the service such as \"foo\".",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"namespace": {
|
||||
"description": "Optional namespace of the service. Defaults to value of metadata namespace field.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"domain": {
|
||||
"description": "Domain suffix used to construct the service FQDN in implementations that support such specification.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"service": {
|
||||
"description": "The service FQDN.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"labels": {
|
||||
"description": "Optional one or more labels that uniquely identify the service version.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.mixer.v1.config.client.NetworkFailPolicy": {
|
||||
"description": "Specifies the behavior when the client is unable to connect to Mixer.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"policy": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.config.client.NetworkFailPolicy.FailPolicy"
|
||||
},
|
||||
"maxRetry": {
|
||||
"description": "Max retries on transport error.",
|
||||
"type": "integer"
|
||||
},
|
||||
"baseRetryWait": {
|
||||
"description": "Base time to wait between retries. Will be adjusted by exponential backoff and jitter.",
|
||||
"type": "string"
|
||||
},
|
||||
"maxRetryWait": {
|
||||
"description": "Max time to wait between retries.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.mixer.v1.config.client.NetworkFailPolicy.FailPolicy": {
|
||||
"description": "Describes the policy.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"FAIL_OPEN",
|
||||
"FAIL_CLOSE"
|
||||
]
|
||||
},
|
||||
"istio.mixer.v1.config.client.ServiceConfig": {
|
||||
"description": "Defines the per-service client configuration.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"disableCheckCalls": {
|
||||
"description": "If true, do not call Mixer Check.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"disableReportCalls": {
|
||||
"description": "If true, do not call Mixer Report.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"mixerAttributes": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.Attributes"
|
||||
},
|
||||
"httpApiSpec": {
|
||||
"description": "HTTP API specifications to generate API attributes.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.config.client.HTTPAPISpec"
|
||||
}
|
||||
},
|
||||
"quotaSpec": {
|
||||
"description": "Quota specifications to generate quota requirements.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.config.client.QuotaSpec"
|
||||
}
|
||||
},
|
||||
"networkFailPolicy": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.config.client.NetworkFailPolicy"
|
||||
},
|
||||
"forwardAttributes": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.Attributes"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.mixer.v1.config.client.QuotaSpec": {
|
||||
"description": "Determines the quotas used for individual requests.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"rules": {
|
||||
"description": "A list of Quota rules.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.config.client.QuotaRule"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.mixer.v1.config.client.TransportConfig": {
|
||||
"description": "Defines the transport config on how to call Mixer.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"networkFailPolicy": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.config.client.NetworkFailPolicy"
|
||||
},
|
||||
"disableCheckCache": {
|
||||
"description": "The flag to disable check cache.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"disableQuotaCache": {
|
||||
"description": "The flag to disable quota cache.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"disableReportBatch": {
|
||||
"description": "The flag to disable report batch.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"statsUpdateInterval": {
|
||||
"description": "Specify refresh interval to write Mixer client statistics to Envoy share memory. If not specified, the interval is 10 seconds.",
|
||||
"type": "string"
|
||||
},
|
||||
"checkCluster": {
|
||||
"description": "Name of the cluster that will forward check calls to a pool of mixer servers. Defaults to \"mixer_server\". By using different names for checkCluster and reportCluster, it is possible to have one set of Mixer servers handle check calls, while another set of Mixer servers handle report calls.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"reportCluster": {
|
||||
"description": "Name of the cluster that will forward report calls to a pool of mixer servers. Defaults to \"mixer_server\". By using different names for checkCluster and reportCluster, it is possible to have one set of Mixer servers handle check calls, while another set of Mixer servers handle report calls.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"attributesForMixerProxy": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.Attributes"
|
||||
},
|
||||
"reportBatchMaxEntries": {
|
||||
"description": "When disable_report_batch is false, this value specifies the maximum number of requests that are batched in report. If left unspecified, the default value of report_batch_max_entries == 0 will use the hardcoded defaults of istio::mixerclient::ReportOptions.",
|
||||
"type": "integer"
|
||||
},
|
||||
"reportBatchMaxTime": {
|
||||
"description": "When disable_report_batch is false, this value specifies the maximum elapsed time a batched report will be sent after a user request is processed. If left unspecified, the default report_batch_max_time == 0 will use the hardcoded defaults of istio::mixerclient::ReportOptions.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.mixer.v1.config.client.HttpClientConfig": {
|
||||
"description": "Defines the client config for HTTP.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"mixerAttributes": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.Attributes"
|
||||
},
|
||||
"forwardAttributes": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.Attributes"
|
||||
},
|
||||
"transport": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.config.client.TransportConfig"
|
||||
},
|
||||
"serviceConfigs": {
|
||||
"description": "Map of control configuration indexed by destination.service. This is used to support per-service configuration for cases where a mixerclient serves multiple services.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.config.client.ServiceConfig"
|
||||
}
|
||||
},
|
||||
"defaultDestinationService": {
|
||||
"description": "Default destination service name if none was specified in the client request.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"ignoreForwardedAttributes": {
|
||||
"description": "Whether or not to use attributes forwarded in the request headers to create the attribute bag to send to mixer. For intra-mesh traffic, this should be set to \"false\". For ingress/egress gateways, this should be set to \"true\".",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.mixer.v1.config.client.TcpClientConfig": {
|
||||
"description": "Defines the client config for TCP.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"disableCheckCalls": {
|
||||
"description": "If set to true, disables Mixer check calls.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"disableReportCalls": {
|
||||
"description": "If set to true, disables Mixer check calls.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"mixerAttributes": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.Attributes"
|
||||
},
|
||||
"transport": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.config.client.TransportConfig"
|
||||
},
|
||||
"connectionQuotaSpec": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.config.client.QuotaSpec"
|
||||
},
|
||||
"reportInterval": {
|
||||
"description": "Specify report interval to send periodical reports for long TCP connections. If not specified, the interval is 10 seconds. This interval should not be less than 1 second, otherwise it will be reset to 1 second.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.mixer.v1.config.client.QuotaRule": {
|
||||
"description": "Specifies a rule with list of matches and list of quotas. If any clause matched, the list of quotas will be used.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"quotas": {
|
||||
"description": "The list of quotas to charge.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.config.client.Quota"
|
||||
}
|
||||
},
|
||||
"match": {
|
||||
"description": "If empty, match all request. If any of match is true, it is matched.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.config.client.AttributeMatch"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.mixer.v1.config.client.AttributeMatch": {
|
||||
"description": "Specifies a match clause to match Istio attributes",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"clause": {
|
||||
"description": "Map of attribute names to StringMatch type. Each map element specifies one condition to match.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.config.client.StringMatch"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.mixer.v1.config.client.Quota": {
|
||||
"description": "Specifies a quota to use with quota name and amount.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"quota": {
|
||||
"description": "The quota name to charge",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"charge": {
|
||||
"description": "The quota amount to charge",
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.mixer.v1.config.client.StringMatch": {
|
||||
"description": "Describes how to match a given string in HTTP headers. Match is case-sensitive.",
|
||||
"type": "object",
|
||||
"oneOf": [
|
||||
{
|
||||
"required": [
|
||||
"exact"
|
||||
],
|
||||
"properties": {
|
||||
"exact": {
|
||||
"description": "exact string match",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"prefix"
|
||||
],
|
||||
"properties": {
|
||||
"prefix": {
|
||||
"description": "prefix-based match",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"regex"
|
||||
],
|
||||
"properties": {
|
||||
"regex": {
|
||||
"description": "ECMAscript style regex-based match",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"istio.mixer.v1.config.client.QuotaSpecBinding": {
|
||||
"description": "QuotaSpecBinding defines the binding between QuotaSpecs and one or more IstioService.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"services": {
|
||||
"description": "One or more services to map the listed QuotaSpec onto.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.config.client.IstioService"
|
||||
}
|
||||
},
|
||||
"quotaSpecs": {
|
||||
"description": "One or more QuotaSpec references that should be mapped to the specified service(s). The aggregate collection of match conditions defined in the QuotaSpecs should not overlap.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.config.client.QuotaSpecBinding.QuotaSpecReference"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.mixer.v1.config.client.QuotaSpecBinding.QuotaSpecReference": {
|
||||
"description": "QuotaSpecReference uniquely identifies the QuotaSpec used in the Binding.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "The short name of the QuotaSpec. This is the resource name defined by the metadata name field.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"namespace": {
|
||||
"description": "Optional namespace of the QuotaSpec. Defaults to the value of the metadata namespace field.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.mixer.v1.Attributes": {
|
||||
"description": "Default attributes to send to Mixer in both Check and Report. This typically includes \"destination.ip\" and \"destination.uid\" attributes.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"attributes": {
|
||||
"description": "A map of attribute name to its value.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.Attributes.AttributeValue"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.mixer.v1.Attributes.AttributeValue": {
|
||||
"type": "object",
|
||||
"oneOf": [
|
||||
{
|
||||
"required": [
|
||||
"stringValue"
|
||||
],
|
||||
"properties": {
|
||||
"stringValue": {
|
||||
"description": "Used for values of type STRING, DNS_NAME, EMAIL_ADDRESS, and URI",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"int64Value"
|
||||
],
|
||||
"properties": {
|
||||
"int64Value": {
|
||||
"description": "Used for values of type INT64",
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"doubleValue"
|
||||
],
|
||||
"properties": {
|
||||
"doubleValue": {
|
||||
"description": "Used for values of type DOUBLE",
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"boolValue"
|
||||
],
|
||||
"properties": {
|
||||
"boolValue": {
|
||||
"description": "Used for values of type BOOL",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"bytesValue"
|
||||
],
|
||||
"properties": {
|
||||
"bytesValue": {
|
||||
"description": "Used for values of type BYTES",
|
||||
"type": "string",
|
||||
"format": "binary"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"timestampValue"
|
||||
],
|
||||
"properties": {
|
||||
"timestampValue": {
|
||||
"description": "Used for values of type TIMESTAMP",
|
||||
"type": "string",
|
||||
"format": "dateTime"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"durationValue"
|
||||
],
|
||||
"properties": {
|
||||
"durationValue": {
|
||||
"description": "Used for values of type DURATION",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"stringMapValue"
|
||||
],
|
||||
"properties": {
|
||||
"stringMapValue": {
|
||||
"$ref": "#/components/schemas/istio.mixer.v1.Attributes.StringMap"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"istio.mixer.v1.Attributes.StringMap": {
|
||||
"description": "Used for values of type STRING_MAP",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"entries": {
|
||||
"description": "Holds a set of name/value pairs.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
1350
vendor/istio.io/api/mixer/v1/config/client/istio.mixer.v1.config.client.pb.html
generated
vendored
Normal file
1350
vendor/istio.io/api/mixer/v1/config/client/istio.mixer.v1.config.client.pb.html
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2065
vendor/istio.io/api/mixer/v1/config/client/quota.pb.go
generated
vendored
Normal file
2065
vendor/istio.io/api/mixer/v1/config/client/quota.pb.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
160
vendor/istio.io/api/mixer/v1/config/client/quota.proto
generated
vendored
Normal file
160
vendor/istio.io/api/mixer/v1/config/client/quota.proto
generated
vendored
Normal file
@@ -0,0 +1,160 @@
|
||||
// Copyright 2017 Istio Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package istio.mixer.v1.config.client;
|
||||
|
||||
option go_package="istio.io/api/mixer/v1/config/client";
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/api/field_behavior.proto";
|
||||
import "mixer/v1/config/client/service.proto";
|
||||
|
||||
option (gogoproto.goproto_getters_all) = false;
|
||||
option (gogoproto.equal_all) = false;
|
||||
option (gogoproto.gostring_all) = false;
|
||||
option (gogoproto.stable_marshaler_all) = true;
|
||||
|
||||
// Specifies runtime quota rules.
|
||||
// * Uses Istio attributes to match individual requests
|
||||
// * Specifies list of quotas to use for matched requests.
|
||||
//
|
||||
// Example1:
|
||||
// Charge "request_count" quota with 1 amount for all requests.
|
||||
//
|
||||
// QuotaSpec:
|
||||
// - rules
|
||||
// - quotas:
|
||||
// quota: request_count
|
||||
// charge: 1
|
||||
//
|
||||
// Example2:
|
||||
// For HTTP POST requests with path are prefixed with /books or
|
||||
// api.operation is create_books, charge two quotas:
|
||||
// * write_count of 1 amount
|
||||
// * request_count of 5 amount.
|
||||
//
|
||||
// ```yaml
|
||||
// QuotaSpec:
|
||||
// - rules:
|
||||
// - match:
|
||||
// clause:
|
||||
// request.path:
|
||||
// string_prefix: /books
|
||||
// request.http_method:
|
||||
// string_exact: POST
|
||||
// - match:
|
||||
// clause:
|
||||
// api.operation:
|
||||
// string_exact: create_books
|
||||
// - quotas:
|
||||
// quota: write_count
|
||||
// charge: 1
|
||||
// - quotas:
|
||||
// quota: request_count
|
||||
// charge: 5
|
||||
// ```
|
||||
|
||||
// Determines the quotas used for individual requests.
|
||||
//
|
||||
// <!-- go code generation tags
|
||||
// +kubetype-gen
|
||||
// +kubetype-gen:groupVersion=config.istio.io/v1alpha2
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen=true
|
||||
// -->
|
||||
message QuotaSpec {
|
||||
// A list of Quota rules.
|
||||
repeated QuotaRule rules = 1;
|
||||
}
|
||||
|
||||
// Specifies a rule with list of matches and list of quotas.
|
||||
// If any clause matched, the list of quotas will be used.
|
||||
message QuotaRule {
|
||||
// If empty, match all request.
|
||||
// If any of match is true, it is matched.
|
||||
repeated AttributeMatch match = 1;
|
||||
|
||||
// The list of quotas to charge.
|
||||
repeated Quota quotas = 2;
|
||||
}
|
||||
|
||||
// Describes how to match a given string in HTTP headers. Match is
|
||||
// case-sensitive.
|
||||
message StringMatch {
|
||||
oneof match_type {
|
||||
// exact string match
|
||||
string exact = 1;
|
||||
// prefix-based match
|
||||
string prefix = 2;
|
||||
// ECMAscript style regex-based match
|
||||
string regex = 3;
|
||||
}
|
||||
}
|
||||
|
||||
// Specifies a match clause to match Istio attributes
|
||||
message AttributeMatch {
|
||||
// Map of attribute names to StringMatch type.
|
||||
// Each map element specifies one condition to match.
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// clause:
|
||||
// source.uid:
|
||||
// exact: SOURCE_UID
|
||||
// request.http_method:
|
||||
// exact: POST
|
||||
map<string, StringMatch> clause = 1;
|
||||
}
|
||||
|
||||
// Specifies a quota to use with quota name and amount.
|
||||
message Quota {
|
||||
// The quota name to charge
|
||||
string quota = 1;
|
||||
|
||||
// The quota amount to charge
|
||||
int32 charge = 2;
|
||||
}
|
||||
|
||||
// QuotaSpecBinding defines the binding between QuotaSpecs and one or more
|
||||
// IstioService.
|
||||
//
|
||||
// <!-- go code generation tags
|
||||
// +kubetype-gen
|
||||
// +kubetype-gen:groupVersion=config.istio.io/v1alpha2
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen=true
|
||||
// -->
|
||||
message QuotaSpecBinding {
|
||||
// One or more services to map the listed QuotaSpec onto.
|
||||
repeated IstioService services = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// QuotaSpecReference uniquely identifies the QuotaSpec used in the
|
||||
// Binding.
|
||||
message QuotaSpecReference {
|
||||
// The short name of the QuotaSpec. This is the resource
|
||||
// name defined by the metadata name field.
|
||||
string name = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// Optional namespace of the QuotaSpec. Defaults to the value of the
|
||||
// metadata namespace field.
|
||||
string namespace = 2;
|
||||
}
|
||||
|
||||
// One or more QuotaSpec references that should be mapped to
|
||||
// the specified service(s). The aggregate collection of match
|
||||
// conditions defined in the QuotaSpecs should not overlap.
|
||||
repeated QuotaSpecReference quota_specs = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
}
|
||||
29
vendor/istio.io/api/mixer/v1/config/client/quota_deepcopy.gen.go
generated
vendored
Normal file
29
vendor/istio.io/api/mixer/v1/config/client/quota_deepcopy.gen.go
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: mixer/v1/config/client/quota.proto
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "istio.io/gogo-genproto/googleapis/google/api"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// DeepCopyInto supports using QuotaSpec within kubernetes types, where deepcopy-gen is used.
|
||||
func (in *QuotaSpec) DeepCopyInto(out *QuotaSpec) {
|
||||
p := proto.Clone(in).(*QuotaSpec)
|
||||
*out = *p
|
||||
}
|
||||
|
||||
// DeepCopyInto supports using QuotaSpecBinding within kubernetes types, where deepcopy-gen is used.
|
||||
func (in *QuotaSpecBinding) DeepCopyInto(out *QuotaSpecBinding) {
|
||||
p := proto.Clone(in).(*QuotaSpecBinding)
|
||||
*out = *p
|
||||
}
|
||||
101
vendor/istio.io/api/mixer/v1/config/client/quota_json.gen.go
generated
vendored
Normal file
101
vendor/istio.io/api/mixer/v1/config/client/quota_json.gen.go
generated
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: mixer/v1/config/client/quota.proto
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
bytes "bytes"
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "istio.io/gogo-genproto/googleapis/google/api"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// MarshalJSON is a custom marshaler for QuotaSpec
|
||||
func (this *QuotaSpec) MarshalJSON() ([]byte, error) {
|
||||
str, err := QuotaMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for QuotaSpec
|
||||
func (this *QuotaSpec) UnmarshalJSON(b []byte) error {
|
||||
return QuotaUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for QuotaRule
|
||||
func (this *QuotaRule) MarshalJSON() ([]byte, error) {
|
||||
str, err := QuotaMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for QuotaRule
|
||||
func (this *QuotaRule) UnmarshalJSON(b []byte) error {
|
||||
return QuotaUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for StringMatch
|
||||
func (this *StringMatch) MarshalJSON() ([]byte, error) {
|
||||
str, err := QuotaMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for StringMatch
|
||||
func (this *StringMatch) UnmarshalJSON(b []byte) error {
|
||||
return QuotaUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for AttributeMatch
|
||||
func (this *AttributeMatch) MarshalJSON() ([]byte, error) {
|
||||
str, err := QuotaMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for AttributeMatch
|
||||
func (this *AttributeMatch) UnmarshalJSON(b []byte) error {
|
||||
return QuotaUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for Quota
|
||||
func (this *Quota) MarshalJSON() ([]byte, error) {
|
||||
str, err := QuotaMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Quota
|
||||
func (this *Quota) UnmarshalJSON(b []byte) error {
|
||||
return QuotaUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for QuotaSpecBinding
|
||||
func (this *QuotaSpecBinding) MarshalJSON() ([]byte, error) {
|
||||
str, err := QuotaMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for QuotaSpecBinding
|
||||
func (this *QuotaSpecBinding) UnmarshalJSON(b []byte) error {
|
||||
return QuotaUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for QuotaSpecBinding_QuotaSpecReference
|
||||
func (this *QuotaSpecBinding_QuotaSpecReference) MarshalJSON() ([]byte, error) {
|
||||
str, err := QuotaMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for QuotaSpecBinding_QuotaSpecReference
|
||||
func (this *QuotaSpecBinding_QuotaSpecReference) UnmarshalJSON(b []byte) error {
|
||||
return QuotaUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
var (
|
||||
QuotaMarshaler = &github_com_gogo_protobuf_jsonpb.Marshaler{}
|
||||
QuotaUnmarshaler = &github_com_gogo_protobuf_jsonpb.Unmarshaler{}
|
||||
)
|
||||
683
vendor/istio.io/api/mixer/v1/config/client/service.pb.go
generated
vendored
Normal file
683
vendor/istio.io/api/mixer/v1/config/client/service.pb.go
generated
vendored
Normal file
@@ -0,0 +1,683 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: mixer/v1/config/client/service.proto
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
io "io"
|
||||
math "math"
|
||||
math_bits "math/bits"
|
||||
reflect "reflect"
|
||||
strings "strings"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// IstioService identifies a service and optionally service version.
|
||||
// The FQDN of the service is composed from the name, namespace, and implementation-specific domain suffix
|
||||
// (e.g. on Kubernetes, "reviews" + "default" + "svc.cluster.local" -> "reviews.default.svc.cluster.local").
|
||||
type IstioService struct {
|
||||
// The short name of the service such as "foo".
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
// Optional namespace of the service. Defaults to value of metadata namespace field.
|
||||
Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
// Domain suffix used to construct the service FQDN in implementations that support such specification.
|
||||
Domain string `protobuf:"bytes,3,opt,name=domain,proto3" json:"domain,omitempty"`
|
||||
// The service FQDN.
|
||||
Service string `protobuf:"bytes,4,opt,name=service,proto3" json:"service,omitempty"`
|
||||
// Optional one or more labels that uniquely identify the service version.
|
||||
//
|
||||
// *Note:* When used for a VirtualService destination, labels MUST be empty.
|
||||
//
|
||||
Labels map[string]string `protobuf:"bytes,5,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
}
|
||||
|
||||
func (m *IstioService) Reset() { *m = IstioService{} }
|
||||
func (*IstioService) ProtoMessage() {}
|
||||
func (*IstioService) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_3358a28a51c817d5, []int{0}
|
||||
}
|
||||
func (m *IstioService) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *IstioService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
func (m *IstioService) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_IstioService.Merge(m, src)
|
||||
}
|
||||
func (m *IstioService) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *IstioService) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_IstioService.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_IstioService proto.InternalMessageInfo
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*IstioService)(nil), "istio.mixer.v1.config.client.IstioService")
|
||||
proto.RegisterMapType((map[string]string)(nil), "istio.mixer.v1.config.client.IstioService.LabelsEntry")
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterFile("mixer/v1/config/client/service.proto", fileDescriptor_3358a28a51c817d5)
|
||||
}
|
||||
|
||||
var fileDescriptor_3358a28a51c817d5 = []byte{
|
||||
// 318 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x51, 0x3f, 0x4b, 0x3b, 0x31,
|
||||
0x18, 0x4e, 0xfa, 0xef, 0x47, 0xd3, 0xdf, 0x20, 0xa1, 0x48, 0x28, 0xe5, 0xa5, 0xa8, 0x43, 0xa7,
|
||||
0x84, 0x2a, 0x88, 0x3a, 0x0a, 0x0e, 0x82, 0x38, 0xd4, 0xcd, 0x2d, 0x3d, 0x63, 0x09, 0x5e, 0x2f,
|
||||
0xe5, 0xee, 0x3c, 0xec, 0xe6, 0x47, 0xf0, 0x63, 0xf8, 0x51, 0x3a, 0x76, 0xec, 0xe8, 0xe5, 0x16,
|
||||
0xc7, 0x7e, 0x01, 0x41, 0x2e, 0xb9, 0x62, 0x07, 0x71, 0xca, 0xf3, 0xbc, 0xcf, 0xf3, 0xbc, 0x3c,
|
||||
0x49, 0xc8, 0xd1, 0x4c, 0xbf, 0xa8, 0x58, 0x64, 0x23, 0x11, 0x98, 0xe8, 0x51, 0x4f, 0x45, 0x10,
|
||||
0x6a, 0x15, 0xa5, 0x22, 0x51, 0x71, 0xa6, 0x03, 0xc5, 0xe7, 0xb1, 0x49, 0x0d, 0xed, 0xeb, 0x24,
|
||||
0xd5, 0x86, 0x3b, 0x2f, 0xcf, 0x46, 0xdc, 0x7b, 0xb9, 0xf7, 0xf6, 0xba, 0x53, 0x33, 0x35, 0xce,
|
||||
0x28, 0x4a, 0xe4, 0x33, 0x07, 0x5f, 0x98, 0xfc, 0xbf, 0x2e, 0x63, 0x77, 0x7e, 0x15, 0xa5, 0xa4,
|
||||
0x11, 0xc9, 0x99, 0x62, 0x78, 0x80, 0x87, 0xed, 0xb1, 0xc3, 0xb4, 0x4f, 0xda, 0xe5, 0x99, 0xcc,
|
||||
0x65, 0xa0, 0x58, 0xcd, 0x09, 0x3f, 0x03, 0xba, 0x4f, 0x5a, 0x0f, 0x66, 0x26, 0x75, 0xc4, 0xea,
|
||||
0x4e, 0xaa, 0x18, 0x65, 0xe4, 0x5f, 0xd5, 0x8f, 0x35, 0x9c, 0xb0, 0xa5, 0xf4, 0x96, 0xb4, 0x42,
|
||||
0x39, 0x51, 0x61, 0xc2, 0x9a, 0x83, 0xfa, 0xb0, 0x73, 0x7c, 0xca, 0xff, 0x6a, 0xce, 0x77, 0xfb,
|
||||
0xf1, 0x1b, 0x17, 0xbc, 0x8a, 0xd2, 0x78, 0x31, 0xae, 0xb6, 0xf4, 0xce, 0x49, 0x67, 0x67, 0x4c,
|
||||
0xf7, 0x48, 0xfd, 0x49, 0x2d, 0xaa, 0x1b, 0x94, 0x90, 0x76, 0x49, 0x33, 0x93, 0xe1, 0xf3, 0xb6,
|
||||
0xbc, 0x27, 0x17, 0xb5, 0x33, 0x7c, 0x29, 0x97, 0x39, 0xa0, 0x55, 0x0e, 0x68, 0x9d, 0x03, 0xda,
|
||||
0xe4, 0x80, 0x5e, 0x2d, 0xe0, 0x77, 0x0b, 0x68, 0x69, 0x01, 0xaf, 0x2c, 0xe0, 0xb5, 0x05, 0xfc,
|
||||
0x61, 0x01, 0x7f, 0x5a, 0x40, 0x1b, 0x0b, 0xf8, 0xad, 0x00, 0xb4, 0x2a, 0x00, 0xad, 0x0b, 0x40,
|
||||
0xf7, 0x87, 0xbe, 0xb7, 0x36, 0x42, 0xce, 0xb5, 0xf8, 0xfd, 0x93, 0x26, 0x2d, 0xf7, 0xd2, 0x27,
|
||||
0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xab, 0x14, 0xde, 0x44, 0xc5, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *IstioService) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *IstioService) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *IstioService) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Labels) > 0 {
|
||||
keysForLabels := make([]string, 0, len(m.Labels))
|
||||
for k := range m.Labels {
|
||||
keysForLabels = append(keysForLabels, string(k))
|
||||
}
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
|
||||
for iNdEx := len(keysForLabels) - 1; iNdEx >= 0; iNdEx-- {
|
||||
v := m.Labels[string(keysForLabels[iNdEx])]
|
||||
baseI := i
|
||||
i -= len(v)
|
||||
copy(dAtA[i:], v)
|
||||
i = encodeVarintService(dAtA, i, uint64(len(v)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
i -= len(keysForLabels[iNdEx])
|
||||
copy(dAtA[i:], keysForLabels[iNdEx])
|
||||
i = encodeVarintService(dAtA, i, uint64(len(keysForLabels[iNdEx])))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
i = encodeVarintService(dAtA, i, uint64(baseI-i))
|
||||
i--
|
||||
dAtA[i] = 0x2a
|
||||
}
|
||||
}
|
||||
if len(m.Service) > 0 {
|
||||
i -= len(m.Service)
|
||||
copy(dAtA[i:], m.Service)
|
||||
i = encodeVarintService(dAtA, i, uint64(len(m.Service)))
|
||||
i--
|
||||
dAtA[i] = 0x22
|
||||
}
|
||||
if len(m.Domain) > 0 {
|
||||
i -= len(m.Domain)
|
||||
copy(dAtA[i:], m.Domain)
|
||||
i = encodeVarintService(dAtA, i, uint64(len(m.Domain)))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
if len(m.Namespace) > 0 {
|
||||
i -= len(m.Namespace)
|
||||
copy(dAtA[i:], m.Namespace)
|
||||
i = encodeVarintService(dAtA, i, uint64(len(m.Namespace)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if len(m.Name) > 0 {
|
||||
i -= len(m.Name)
|
||||
copy(dAtA[i:], m.Name)
|
||||
i = encodeVarintService(dAtA, i, uint64(len(m.Name)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintService(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovService(v)
|
||||
base := offset
|
||||
for v >= 1<<7 {
|
||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||
v >>= 7
|
||||
offset++
|
||||
}
|
||||
dAtA[offset] = uint8(v)
|
||||
return base
|
||||
}
|
||||
func (m *IstioService) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Name)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovService(uint64(l))
|
||||
}
|
||||
l = len(m.Namespace)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovService(uint64(l))
|
||||
}
|
||||
l = len(m.Domain)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovService(uint64(l))
|
||||
}
|
||||
l = len(m.Service)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovService(uint64(l))
|
||||
}
|
||||
if len(m.Labels) > 0 {
|
||||
for k, v := range m.Labels {
|
||||
_ = k
|
||||
_ = v
|
||||
mapEntrySize := 1 + len(k) + sovService(uint64(len(k))) + 1 + len(v) + sovService(uint64(len(v)))
|
||||
n += mapEntrySize + 1 + sovService(uint64(mapEntrySize))
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func sovService(x uint64) (n int) {
|
||||
return (math_bits.Len64(x|1) + 6) / 7
|
||||
}
|
||||
func sozService(x uint64) (n int) {
|
||||
return sovService(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (this *IstioService) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
keysForLabels := make([]string, 0, len(this.Labels))
|
||||
for k, _ := range this.Labels {
|
||||
keysForLabels = append(keysForLabels, k)
|
||||
}
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
|
||||
mapStringForLabels := "map[string]string{"
|
||||
for _, k := range keysForLabels {
|
||||
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
|
||||
}
|
||||
mapStringForLabels += "}"
|
||||
s := strings.Join([]string{`&IstioService{`,
|
||||
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
|
||||
`Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
|
||||
`Domain:` + fmt.Sprintf("%v", this.Domain) + `,`,
|
||||
`Service:` + fmt.Sprintf("%v", this.Service) + `,`,
|
||||
`Labels:` + mapStringForLabels + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func valueToStringService(v interface{}) string {
|
||||
rv := reflect.ValueOf(v)
|
||||
if rv.IsNil() {
|
||||
return "nil"
|
||||
}
|
||||
pv := reflect.Indirect(rv).Interface()
|
||||
return fmt.Sprintf("*%v", pv)
|
||||
}
|
||||
func (m *IstioService) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowService
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: IstioService: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: IstioService: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowService
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthService
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthService
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Name = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowService
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthService
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthService
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Namespace = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Domain", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowService
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthService
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthService
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Domain = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowService
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthService
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthService
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Service = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 5:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowService
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthService
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthService
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Labels == nil {
|
||||
m.Labels = make(map[string]string)
|
||||
}
|
||||
var mapkey string
|
||||
var mapvalue string
|
||||
for iNdEx < postIndex {
|
||||
entryPreIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowService
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
if fieldNum == 1 {
|
||||
var stringLenmapkey uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowService
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLenmapkey |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLenmapkey := int(stringLenmapkey)
|
||||
if intStringLenmapkey < 0 {
|
||||
return ErrInvalidLengthService
|
||||
}
|
||||
postStringIndexmapkey := iNdEx + intStringLenmapkey
|
||||
if postStringIndexmapkey < 0 {
|
||||
return ErrInvalidLengthService
|
||||
}
|
||||
if postStringIndexmapkey > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
|
||||
iNdEx = postStringIndexmapkey
|
||||
} else if fieldNum == 2 {
|
||||
var stringLenmapvalue uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowService
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLenmapvalue |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLenmapvalue := int(stringLenmapvalue)
|
||||
if intStringLenmapvalue < 0 {
|
||||
return ErrInvalidLengthService
|
||||
}
|
||||
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
|
||||
if postStringIndexmapvalue < 0 {
|
||||
return ErrInvalidLengthService
|
||||
}
|
||||
if postStringIndexmapvalue > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
|
||||
iNdEx = postStringIndexmapvalue
|
||||
} else {
|
||||
iNdEx = entryPreIndex
|
||||
skippy, err := skipService(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthService
|
||||
}
|
||||
if (iNdEx + skippy) > postIndex {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
m.Labels[mapkey] = mapvalue
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipService(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthService
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthService
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func skipService(dAtA []byte) (n int, err error) {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowService
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
wireType := int(wire & 0x7)
|
||||
switch wireType {
|
||||
case 0:
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowService
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx++
|
||||
if dAtA[iNdEx-1] < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
return iNdEx, nil
|
||||
case 1:
|
||||
iNdEx += 8
|
||||
return iNdEx, nil
|
||||
case 2:
|
||||
var length int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowService
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
length |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if length < 0 {
|
||||
return 0, ErrInvalidLengthService
|
||||
}
|
||||
iNdEx += length
|
||||
if iNdEx < 0 {
|
||||
return 0, ErrInvalidLengthService
|
||||
}
|
||||
return iNdEx, nil
|
||||
case 3:
|
||||
for {
|
||||
var innerWire uint64
|
||||
var start int = iNdEx
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowService
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
innerWire |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
innerWireType := int(innerWire & 0x7)
|
||||
if innerWireType == 4 {
|
||||
break
|
||||
}
|
||||
next, err := skipService(dAtA[start:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
iNdEx = start + next
|
||||
if iNdEx < 0 {
|
||||
return 0, ErrInvalidLengthService
|
||||
}
|
||||
}
|
||||
return iNdEx, nil
|
||||
case 4:
|
||||
return iNdEx, nil
|
||||
case 5:
|
||||
iNdEx += 4
|
||||
return iNdEx, nil
|
||||
default:
|
||||
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||
}
|
||||
}
|
||||
panic("unreachable")
|
||||
}
|
||||
|
||||
var (
|
||||
ErrInvalidLengthService = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||
ErrIntOverflowService = fmt.Errorf("proto: integer overflow")
|
||||
)
|
||||
58
vendor/istio.io/api/mixer/v1/config/client/service.proto
generated
vendored
Normal file
58
vendor/istio.io/api/mixer/v1/config/client/service.proto
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
// Copyright 2017 Istio Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package istio.mixer.v1.config.client;
|
||||
|
||||
option go_package="istio.io/api/mixer/v1/config/client";
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
|
||||
option (gogoproto.goproto_getters_all) = false;
|
||||
option (gogoproto.equal_all) = false;
|
||||
option (gogoproto.gostring_all) = false;
|
||||
option (gogoproto.stable_marshaler_all) = true;
|
||||
|
||||
// NOTE: this is a duplicate of proxy.v1.config.IstioService from
|
||||
// proxy/v1alpha1/config/route_rules.proto.
|
||||
//
|
||||
// Mixer protobufs have gogoproto specific options which are not
|
||||
// compatiable with the proxy's vanilla protobufs. Ideally, these
|
||||
// protobuf options be reconciled so fundamental Istio concepts and
|
||||
// types can be shared by components. Until then, make a copy of
|
||||
// IstioService for mixerclient to use.
|
||||
|
||||
// IstioService identifies a service and optionally service version.
|
||||
// The FQDN of the service is composed from the name, namespace, and implementation-specific domain suffix
|
||||
// (e.g. on Kubernetes, "reviews" + "default" + "svc.cluster.local" -> "reviews.default.svc.cluster.local").
|
||||
message IstioService {
|
||||
// The short name of the service such as "foo".
|
||||
string name = 1;
|
||||
|
||||
// Optional namespace of the service. Defaults to value of metadata namespace field.
|
||||
string namespace = 2;
|
||||
|
||||
// Domain suffix used to construct the service FQDN in implementations that support such specification.
|
||||
string domain = 3;
|
||||
|
||||
// The service FQDN.
|
||||
string service = 4;
|
||||
|
||||
// Optional one or more labels that uniquely identify the service version.
|
||||
//
|
||||
// *Note:* When used for a VirtualService destination, labels MUST be empty.
|
||||
//
|
||||
map<string, string> labels = 5;
|
||||
}
|
||||
34
vendor/istio.io/api/mixer/v1/config/client/service_json.gen.go
generated
vendored
Normal file
34
vendor/istio.io/api/mixer/v1/config/client/service_json.gen.go
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: mixer/v1/config/client/service.proto
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
bytes "bytes"
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// MarshalJSON is a custom marshaler for IstioService
|
||||
func (this *IstioService) MarshalJSON() ([]byte, error) {
|
||||
str, err := ServiceMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for IstioService
|
||||
func (this *IstioService) UnmarshalJSON(b []byte) error {
|
||||
return ServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
var (
|
||||
ServiceMarshaler = &github_com_gogo_protobuf_jsonpb.Marshaler{}
|
||||
ServiceUnmarshaler = &github_com_gogo_protobuf_jsonpb.Unmarshaler{}
|
||||
)
|
||||
Reference in New Issue
Block a user