envoyproxy / envoyproxy/envoy-mobile
Cronvoy: Support Request Priority
- Dominant language
- Java
- Stars
- 566
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
Cronet requests can have [different priorities](https://source.chromium.org/chromium/chromium/src/+/main:components/cronet/android/api/src/org/chromium/net/UrlRequest.java;l=73). Here is the API:
```
// Lowest stream priority. Passed to {@link #setPriority}.
public static final int STREAM_PRIORITY_IDLE = 0;
// Very low stream priority. Passed to {@link #setPriority}.
public static final int STREAM_PRIORITY_LOWEST = 1;
// Low stream priority. Passed to {@link #setPriority}.
public static final int STREAM_PRIORITY_LOW = 2;
// Medium stream priority. Passed to {@link #setPriority}. This is the
// default priority given to the stream.
public static final int STREAM_PRIORITY_MEDIUM = 3;
// Highest stream priority. Passed to {@link #setPriority}.
public static final int STREAM_PRIORITY_HIGHEST = 4;
// Sets priority of the stream which should be one of the
// {@link #STREAM_PRIORITY_IDLE STREAM_PRIORITY_*} values.
/ The stream is given {@link #STREAM_PRIORITY_MEDIUM} priority if
// this method is not called.
public abstract Builder setPriority(int priority);
```
Inside Google, there are only two usages of this feature.
Still, this is expected to be implemented with Envoy Mobile, but this is unlikely to be part of the first production release of Cronvoy.
Contributor guide
Assessment
This issue has not been assessed yet.