• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2020 The gRPC Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// Local copy of Envoy xDS proto file, used for testing only.
16
17syntax = "proto3";
18
19package envoy.extensions.filters.common.fault.v3;
20
21import "src/proto/grpc/testing/xds/v3/percent.proto";
22
23import "google/protobuf/duration.proto";
24
25// Delay specification is used to inject latency into the
26// HTTP/gRPC/Mongo/Redis operation or delay proxying of TCP connections.
27message FaultDelay {
28  // Fault delays are controlled via an HTTP header (if applicable). See the
29  // :ref:`HTTP fault filter <config_http_filters_fault_injection_http_header>`
30  // documentation for more information.
31  message HeaderDelay {}
32
33  oneof fault_delay_secifier {
34    // Add a fixed delay before forwarding the operation upstream. See
35    // https://developers.google.com/protocol-buffers/docs/proto3#json for
36    // the JSON/YAML Duration mapping. For HTTP/Mongo/Redis, the specified
37    // delay will be injected before a new request/operation. For TCP
38    // connections, the proxying of the connection upstream will be delayed
39    // for the specified period. This is required if type is FIXED.
40    google.protobuf.Duration fixed_delay = 3;
41
42    // Fault delays are controlled via an HTTP header (if applicable).
43    HeaderDelay header_delay = 5;
44  }
45
46  // The percentage of operations/connections/requests on which the delay will
47  // be injected.
48  type.v3.FractionalPercent percentage = 4;
49}
50