envoyproxy / envoyproxy/envoy

Separate out Envoy platform API from extension API

Open
#5,126 4 comments 0 reactions 0 assignees View on GitHub
design proposal help wanted
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 20h
Merged PRs (30d)
437

Description

We currently have a bit of conflation in `api/` between those APIs that are provided a platform abstraction layer (mostly for the benefit of core Envoy, but also extensions) and the APIs that will one day act as a stable interface for extensions. For example:

https://github.com/envoyproxy/envoy/blob/2c0733ad3ffaf3e1630e3a77e822c5d76ad08f0b/include/envoy/api/api.h#L28

is clearly in the second category, and

https://github.com/envoyproxy/envoy/blob/2c0733ad3ffaf3e1630e3a77e822c5d76ad08f0b/include/envoy/api/api.h#L54

is in the first. This becomes even stranger when we have the `ApiImpl` require access to a stats object in

https://github.com/envoyproxy/envoy/blob/2c0733ad3ffaf3e1630e3a77e822c5d76ad08f0b/source/common/api/api_impl.h#L22

This is because the filesystem code is both a platform abstraction API and also providing higher level functionality like stats tracking.

Ideally, we split out the API into a `api/platform` and `api/export`, where we clearly delineate these two concerns. New platform ports of Envoy populate the interfaces in `api/platform`, extensions take dependencies on `api/export`.

CC @jmarantz @eziskind @mattklein123

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.