MCPcopy Index your code
hub / github.com/envoyproxy/java-control-plane

github.com/envoyproxy/java-control-plane @v1.0.54

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.54 ↗ · + Follow
527 symbols 1,800 edges 74 files 164 documented · 31%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

java-control-plane

OpenSSF Scorecard CircleCI codecov Maven Central

This repository contains a Java-based implementation of an API server that implements the discovery service APIs defined in data-plane-api. It started life as a port of go-control-plane, but building an idiomatic Java implementation is prioritized over exact interface parity with the Go implementation.

Only v3 resources as well as transport versions are now supported. Migrating to v3 is necessary as Envoy dropped v2 support at EOY 2020 (see API_VERSIONING.md)

See the v2-to-v3 migration guide for an explanation of migration paths.

Requirements

  1. Java 8+
  2. Maven

Build & Test

mvn clean package

More thorough usage examples are still TODO, but there is a basic test implementation in TestMain.

Envoy API

There is automation built into this repo to keep the Envoy API (i.e. protobuf files) up to date with the latest available Envoy release.

This automation uses Github Workflows and works as follows: a scheduled workflow runs with weekly cadence, and calls a reusable workflow that fetches the latest available Envoy release and compares it with the version currently used in the repo.

If the latest available Envoy release doesn't match the version currently used, another reusable workflow is called which creates a PR that upgrades the Envoy API to the latest available release.

Releasing a new version

To release and publish a new version, do the following: 1. create a personal API token in CircleCI by following the instructions listed here 2. from terminal, curl the CircleCI API as follows

 curl -X POST \
    -H "Content-Type: application/json" \
    -d '{ "build_parameters": { "RELEASE": "<e.g. 0.1.29>", "NEXT": "<e.g. 0.1.30-SNAPSHOT>" } }' \
    "https://circleci.com/api/v1.1/project/github/envoyproxy/java-control-plane/tree/main?circle-token=<API token>"

Extension points exported contracts — how you extend this code

ResourceVersionResolver (Interface)
ResourceVersionResolver calculates a version for resources in SnapshotCache. It can be used to take adva [8 implementers]
cache/src/main/java/io/envoyproxy/controlplane/cache/ResourceVersionResolver.java
DiscoveryServerCallbacks (Interface)
DiscoveryServerCallbacks defines the callbacks that are exposed by the DiscoveryServer. The callbacks gi [4 implementers]
server/src/main/java/io/envoyproxy/controlplane/server/DiscoveryServerCallbacks.java
ConfigWatcher (Interface)
ConfigWatcher requests watches for configuration resources by type, node, last applied version identifier, and r [3 implementers]
cache/src/main/java/io/envoyproxy/controlplane/cache/ConfigWatcher.java
ProtoResourcesSerializer (Interface)
Serializer of the proto buffers resource messages. [3 implementers]
server/src/main/java/io/envoyproxy/controlplane/server/serializer/ProtoResourcesSerializer.java
StatusInfo (Interface)
StatusInfo tracks the state for remote envoy nodes. [2 implementers]
cache/src/main/java/io/envoyproxy/controlplane/cache/StatusInfo.java
ExecutorGroup (Interface)
The ExecutorGroup is responsible for providing the Executor's to use via its #next() method. [2 implementers]
server/src/main/java/io/envoyproxy/controlplane/server/ExecutorGroup.java
Cache (Interface)
Cache is a generic config cache with support for watchers. [1 implementers]
cache/src/main/java/io/envoyproxy/controlplane/cache/Cache.java
StartupConfigs (Interface)
(no doc) [4 implementers]
server/src/main/java/io/envoyproxy/controlplane/server/StartupConfigs.java

Core symbols most depended-on inside this repo

version
called by 49
cache/src/main/java/io/envoyproxy/controlplane/cache/ResourceVersionResolver.java
resources
called by 42
cache/src/main/java/io/envoyproxy/controlplane/cache/Snapshot.java
put
called by 42
cache/src/main/java/io/envoyproxy/controlplane/cache/ResourceMapBuilder.java
getTypeUrl
called by 41
cache/src/main/java/io/envoyproxy/controlplane/cache/XdsRequest.java
request
called by 36
cache/src/main/java/io/envoyproxy/controlplane/cache/Response.java
create
called by 27
cache/src/main/java/io/envoyproxy/controlplane/cache/XdsRequest.java
create
called by 23
cache/src/main/java/io/envoyproxy/controlplane/cache/v3/Snapshot.java
setSnapshot
called by 21
cache/src/main/java/io/envoyproxy/controlplane/cache/SimpleCache.java

Shape

Method 440
Class 74
Interface 10
Enum 3

Languages

Java100%

Modules by API surface

server/src/test/java/io/envoyproxy/controlplane/server/V3DiscoveryServerTest.java41 symbols
server/src/main/java/io/envoyproxy/controlplane/server/V3DiscoveryServer.java32 symbols
cache/src/test/java/io/envoyproxy/controlplane/cache/v3/SimpleCacheTest.java27 symbols
server/src/main/java/io/envoyproxy/controlplane/server/DeltaDiscoveryRequestStreamObserver.java21 symbols
cache/src/main/java/io/envoyproxy/controlplane/cache/SimpleCache.java19 symbols
server/src/main/java/io/envoyproxy/controlplane/server/AdsDeltaDiscoveryRequestStreamObserver.java16 symbols
server/src/main/java/io/envoyproxy/controlplane/server/XdsDeltaDiscoveryRequestStreamObserver.java15 symbols
server/src/main/java/io/envoyproxy/controlplane/server/DiscoveryRequestStreamObserver.java15 symbols
server/src/main/java/io/envoyproxy/controlplane/server/DiscoveryServer.java14 symbols
cache/src/main/java/io/envoyproxy/controlplane/cache/v3/Snapshot.java13 symbols
server/src/main/java/io/envoyproxy/controlplane/server/callback/SnapshotCollectingCallback.java10 symbols
server/src/main/java/io/envoyproxy/controlplane/server/AdsDiscoveryRequestStreamObserver.java10 symbols

For agents

$ claude mcp add java-control-plane \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact