• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

grpc / grpc-java / #19677

05 Feb 2025 09:05AM CUT coverage: 88.604% (+0.03%) from 88.578%
#19677

Pull #11858

github

web-flow
Merge dad68ffd5 into ea3f644ee
Pull Request #11858: core: updates the backoff range as per the A6 redefinition

33773 of 38117 relevant lines covered (88.6%)

0.89 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.0
/../xds/src/main/java/io/grpc/xds/RouterFilter.java
1
/*
2
 * Copyright 2021 The gRPC Authors
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *     http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16

17
package io.grpc.xds;
18

19
import com.google.protobuf.Message;
20
import io.grpc.ClientInterceptor;
21
import io.grpc.ServerInterceptor;
22
import io.grpc.xds.Filter.ClientInterceptorBuilder;
23
import io.grpc.xds.Filter.ServerInterceptorBuilder;
24
import java.util.concurrent.ScheduledExecutorService;
25
import javax.annotation.Nullable;
26

27
/**
28
 * Router filter implementation. Currently this filter does not parse any field in the config.
29
 */
30
enum RouterFilter implements Filter, ClientInterceptorBuilder, ServerInterceptorBuilder {
1✔
31
  INSTANCE;
1✔
32

33
  static final String TYPE_URL =
34
      "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router";
35

36
  static final FilterConfig ROUTER_CONFIG = new FilterConfig() {
1✔
37
    @Override
38
    public String typeUrl() {
39
      return RouterFilter.TYPE_URL;
1✔
40
    }
41

42
    @Override
43
    public String toString() {
44
      return "ROUTER_CONFIG";
1✔
45
    }
46
  };
47

48
  @Override
49
  public String[] typeUrls() {
50
    return new String[] { TYPE_URL };
1✔
51
  }
52

53
  @Override
54
  public ConfigOrError<? extends FilterConfig> parseFilterConfig(Message rawProtoMessage) {
55
    return ConfigOrError.fromConfig(ROUTER_CONFIG);
1✔
56
  }
57

58
  @Override
59
  public ConfigOrError<? extends FilterConfig> parseFilterConfigOverride(Message rawProtoMessage) {
60
    return ConfigOrError.fromError("Router Filter should not have override config");
×
61
  }
62

63
  @Nullable
64
  @Override
65
  public ClientInterceptor buildClientInterceptor(
66
      FilterConfig config, @Nullable FilterConfig overrideConfig,
67
      ScheduledExecutorService scheduler) {
68
    return null;
1✔
69
  }
70

71
  @Nullable
72
  @Override
73
  public ServerInterceptor buildServerInterceptor(
74
      FilterConfig config, @Nullable Filter.FilterConfig overrideConfig) {
75
    return null;
1✔
76
  }
77
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc