Skip to content

Commit

Permalink
Remove extensions terminology
Browse files Browse the repository at this point in the history
  • Loading branch information
XAMPPRocky committed Feb 24, 2022
1 parent b5193ea commit 6b48cf1
Show file tree
Hide file tree
Showing 51 changed files with 116 additions and 116 deletions.
22 changes: 11 additions & 11 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
"proto/data-plane-api/envoy/service/discovery/v3/discovery.proto",
"proto/data-plane-api/envoy/type/metadata/v3/metadata.proto",
"proto/data-plane-api/envoy/type/tracing/v3/custom_tag.proto",
"proto/quilkin/extensions/filters/capture/v1alpha1/capture.proto",
"proto/quilkin/extensions/filters/compress/v1alpha1/compress.proto",
"proto/quilkin/extensions/filters/concatenate_bytes/v1alpha1/concatenate_bytes.proto",
"proto/quilkin/extensions/filters/debug/v1alpha1/debug.proto",
"proto/quilkin/extensions/filters/drop/v1alpha1/drop.proto",
"proto/quilkin/extensions/filters/firewall/v1alpha1/firewall.proto",
"proto/quilkin/extensions/filters/load_balancer/v1alpha1/load_balancer.proto",
"proto/quilkin/extensions/filters/local_rate_limit/v1alpha1/local_rate_limit.proto",
"proto/quilkin/extensions/filters/match/v1alpha1/match.proto",
"proto/quilkin/extensions/filters/pass/v1alpha1/pass.proto",
"proto/quilkin/extensions/filters/token_router/v1alpha1/token_router.proto",
"proto/quilkin/filters/capture/v1alpha1/capture.proto",
"proto/quilkin/filters/compress/v1alpha1/compress.proto",
"proto/quilkin/filters/concatenate_bytes/v1alpha1/concatenate_bytes.proto",
"proto/quilkin/filters/debug/v1alpha1/debug.proto",
"proto/quilkin/filters/drop/v1alpha1/drop.proto",
"proto/quilkin/filters/firewall/v1alpha1/firewall.proto",
"proto/quilkin/filters/load_balancer/v1alpha1/load_balancer.proto",
"proto/quilkin/filters/local_rate_limit/v1alpha1/local_rate_limit.proto",
"proto/quilkin/filters/match/v1alpha1/match.proto",
"proto/quilkin/filters/pass/v1alpha1/pass.proto",
"proto/quilkin/filters/token_router/v1alpha1/token_router.proto",
"proto/udpa/xds/core/v3/resource_name.proto",
]
.iter()
Expand Down
4 changes: 2 additions & 2 deletions docs/src/filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ There are a few things we note here:
version: v1alpha1
static:
filters:
- name: quilkin.extensions.filters.debug.v1alpha1.Debug
- name: quilkin.filters.debug.v1alpha1.Debug
config:
id: debug-1
- name: quilkin.extensions.filters.local_rate_limit.v1alpha1.LocalRateLimit
- name: quilkin.filters.local_rate_limit.v1alpha1.LocalRateLimit
config:
max_packets: 10
period: 1
Expand Down
6 changes: 3 additions & 3 deletions docs/src/filters/capture.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ multiple matches.

#### Filter name
```text
quilkin.extensions.filters.capture.v1alpha1.Capture
quilkin.filters.capture.v1alpha1.Capture
```

### Configuration Examples
Expand All @@ -35,7 +35,7 @@ quilkin.extensions.filters.capture.v1alpha1.Capture
version: v1alpha1
static:
filters:
- name: quilkin.extensions.filters.capture.v1alpha1.Capture
- name: quilkin.filters.capture.v1alpha1.Capture
config:
metadataKey: myapp.com/myownkey
prefix:
Expand All @@ -52,7 +52,7 @@ static:
### Configuration Options ([Rust Doc](../../api/quilkin/filters/capture/struct.Config.html))

```yaml
{{#include ../../../target/quilkin.extensions.filters.capture.v1alpha1.yaml}}
{{#include ../../../target/quilkin.filters.capture.v1alpha1.yaml}}
```

### Metrics
Expand Down
6 changes: 3 additions & 3 deletions docs/src/filters/compress.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ and subsequent decompression of UDP data when sent between systems, such as a ga

#### Filter name
```text
quilkin.extensions.filters.compress.v1alpha1.Compress
quilkin.filters.compress.v1alpha1.Compress
```

### Configuration Examples
Expand All @@ -14,7 +14,7 @@ quilkin.extensions.filters.compress.v1alpha1.Compress
version: v1alpha1
static:
filters:
- name: quilkin.extensions.filters.compress.v1alpha1.Compress
- name: quilkin.filters.compress.v1alpha1.Compress
config:
on_read: COMPRESS
on_write: DECOMPRESS
Expand All @@ -38,7 +38,7 @@ decompressed when traffic is returned from the dedicated game server before bein
### Configuration Options ([Rust Doc](../../api/quilkin/filters/compress/struct.Config.html))

```yaml
{{#include ../../../target/quilkin.extensions.filters.compress.v1alpha1.yaml}}
{{#include ../../../target/quilkin.filters.compress.v1alpha1.yaml}}
```

#### Compression Modes
Expand Down
6 changes: 3 additions & 3 deletions docs/src/filters/concatenate_bytes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ through. This is commonly used to provide an auth token to each packet, so they

#### Filter name
```text
quilkin.extensions.filters.concatenate_bytes.v1alpha1.ConcatenateBytes
quilkin.filters.concatenate_bytes.v1alpha1.ConcatenateBytes
```

### Configuration Examples
Expand All @@ -14,7 +14,7 @@ quilkin.extensions.filters.concatenate_bytes.v1alpha1.ConcatenateBytes
version: v1alpha1
static:
filters:
- name: quilkin.extensions.filters.concatenate_bytes.v1alpha1.ConcatenateBytes
- name: quilkin.filters.concatenate_bytes.v1alpha1.ConcatenateBytes
config:
on_read: APPEND
on_write: DO_NOTHING
Expand All @@ -30,7 +30,7 @@ static:
### Configuration Options ([Rust Doc](../../api/quilkin/filters/concatenate_bytes/struct.Config.html))

```yaml
{{#include ../../../target/quilkin.extensions.filters.concatenate_bytes.v1alpha1.yaml}}
{{#include ../../../target/quilkin.filters.concatenate_bytes.v1alpha1.yaml}}
```

### Metrics
Expand Down
6 changes: 3 additions & 3 deletions docs/src/filters/debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This filter is useful in debugging deployments where the packets strictly contai

#### Filter name
```text
quilkin.extensions.filters.debug_filter.v1alpha1.Debug
quilkin.filters.debug_filter.v1alpha1.Debug
```

### Configuration Examples
Expand All @@ -15,7 +15,7 @@ quilkin.extensions.filters.debug_filter.v1alpha1.Debug
version: v1alpha1
static:
filters:
- name: quilkin.extensions.filters.debug.v1alpha1.Debug
- name: quilkin.filters.debug.v1alpha1.Debug
config:
id: debug-1
endpoints:
Expand All @@ -29,7 +29,7 @@ static:
### Configuration Options ([Rust Doc](../../api/quilkin/filters/debug/struct.Config.html))

```yaml
{{#include ../../../target/quilkin.extensions.filters.debug.v1alpha1.yaml}}
{{#include ../../../target/quilkin.filters.debug.v1alpha1.yaml}}
```


Expand Down
2 changes: 1 addition & 1 deletion docs/src/filters/drop.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ combination with conditional flow filters like [`Matches`](./match.md)

#### Filter name
```text
quilkin.extensions.filters.drop.v1alpha1.Drop
quilkin.filters.drop.v1alpha1.Drop
```

### Configuration Examples
Expand Down
6 changes: 3 additions & 3 deletions docs/src/filters/firewall.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ the rules set on the Firewall filter.

#### Filter name
```text
quilkin.extensions.filters.firewall.v1alpha1.Firewall
quilkin.filters.firewall.v1alpha1.Firewall
```

### Configuration Examples
Expand All @@ -14,7 +14,7 @@ quilkin.extensions.filters.firewall.v1alpha1.Firewall
version: v1alpha1
static:
filters:
- name: quilkin.extensions.filters.firewall.v1alpha1.Firewall
- name: quilkin.filters.firewall.v1alpha1.Firewall
config:
on_read:
- action: ALLOW
Expand All @@ -38,7 +38,7 @@ static:
### Configuration Options ([Rust Doc](../../api/quilkin/filters/firewall/struct.Config.html))

```yaml
{{#include ../../../target/quilkin.extensions.filters.firewall.v1alpha1.yaml}}
{{#include ../../../target/quilkin.filters.firewall.v1alpha1.yaml}}
```

#### Rule Evaluation
Expand Down
6 changes: 3 additions & 3 deletions docs/src/filters/load_balancer.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The `LoadBalancer` filter distributes packets received downstream among all upst

#### Filter name
```text
quilkin.extensions.filters.load_balancer.v1alpha1.LoadBalancer
quilkin.filters.load_balancer.v1alpha1.LoadBalancer
```

### Configuration Examples
Expand All @@ -15,7 +15,7 @@ quilkin.extensions.filters.load_balancer.v1alpha1.LoadBalancer
version: v1alpha1
static:
filters:
- name: quilkin.extensions.filters.load_balancer.v1alpha1.LoadBalancer
- name: quilkin.filters.load_balancer.v1alpha1.LoadBalancer
config:
policy: ROUND_ROBIN
endpoints:
Expand All @@ -33,7 +33,7 @@ In the example above, packets will be distributed by selecting endpoints in turn
### Configuration Options ([Rust Doc](../../api/quilkin/filters/load_balancer/struct.Config.html))

```yaml
{{#include ../../../target/quilkin.extensions.filters.load_balancer.v1alpha1.yaml}}
{{#include ../../../target/quilkin.filters.load_balancer.v1alpha1.yaml}}
```

### Metrics
Expand Down
6 changes: 3 additions & 3 deletions docs/src/filters/local_rate_limit.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Rate limiting is done independently per source (IP, Port) combination.

#### Filter name
```text
quilkin.extensions.filters.local_rate_limit.v1alpha1.LocalRateLimit
quilkin.filters.local_rate_limit.v1alpha1.LocalRateLimit
```

### Configuration Examples
Expand All @@ -18,7 +18,7 @@ quilkin.extensions.filters.local_rate_limit.v1alpha1.LocalRateLimit
version: v1alpha1
static:
filters:
- name: quilkin.extensions.filters.local_rate_limit.v1alpha1.LocalRateLimit
- name: quilkin.filters.local_rate_limit.v1alpha1.LocalRateLimit
config:
max_packets: 1000
period: 1
Expand All @@ -42,7 +42,7 @@ To configure a rate limiter, we specify the maximum rate at which the proxy is a
### Configuration Options ([Rust Doc](../../api/quilkin/filters/local_rate_limit/struct.Config.html))

```yaml
{{#include ../../../target/quilkin.extensions.filters.local_rate_limit.v1alpha1.yaml}}
{{#include ../../../target/quilkin.filters.local_rate_limit.v1alpha1.yaml}}
```


Expand Down
12 changes: 6 additions & 6 deletions docs/src/filters/match.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ in Rust or `switch` statements in other languages.

#### Filter name
```text
quilkin.extensions.filters.match.v1alpha1.Match
quilkin.filters.match.v1alpha1.Match
```

### Configuration Examples
Expand All @@ -19,20 +19,20 @@ static:
- address: 127.0.0.1:26000
- address: 127.0.0.1:26001
filters:
- name: quilkin.extensions.filters.capture_bytes.v1alpha1.CaptureBytes
- name: quilkin.filters.capture_bytes.v1alpha1.CaptureBytes
config:
strategy: PREFIX
metadataKey: myapp.com/token
size: 3
remove: false
- name: quilkin.extensions.filters.match.v1alpha1.Match
- name: quilkin.filters.match.v1alpha1.Match
config:
on_read:
metadataKey: myapp.com/token
branches:
- value: abc
filter: quilkin.extensions.filters.pass.v1alpha1.Pass
fallthrough: quilkin.extensions.filters.drop.v1alpha1.Drop
filter: quilkin.filters.pass.v1alpha1.Pass
fallthrough: quilkin.filters.drop.v1alpha1.Drop
# ";
# let config = quilkin::config::Config::from_reader(yaml.as_bytes()).unwrap();
# assert_eq!(config.source.get_static_filters().unwrap().len(), 1);
Expand All @@ -43,7 +43,7 @@ static:
### Configuration Options ([Rust Doc](../../api/quilkin/filters/match/struct.Config.html))

```yaml
{{#include ../../../target/quilkin.extensions.filters.match.v1alpha1.yaml}}
{{#include ../../../target/quilkin.filters.match.v1alpha1.yaml}}
```

View the [Matches](../../api/quilkin/filters/match/struct.Config.html) filter documentation for more details.
2 changes: 1 addition & 1 deletion docs/src/filters/pass.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ combination with conditional flow filters like [`Matches`](./match.md)

#### Filter name
```text
quilkin.extensions.filters.pass.v1alpha1.Pass
quilkin.filters.pass.v1alpha1.Pass
```

### Configuration Examples
Expand Down
10 changes: 5 additions & 5 deletions docs/src/filters/token_router.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This Filter provides this functionality by comparing a byte array token found in

#### Filter name
```text
quilkin.extensions.filters.token_router.v1alpha1.TokenRouter
quilkin.filters.token_router.v1alpha1.TokenRouter
```

### Configuration Examples
Expand All @@ -17,7 +17,7 @@ quilkin.extensions.filters.token_router.v1alpha1.TokenRouter
version: v1alpha1
static:
filters:
- name: quilkin.extensions.filters.token_router.v1alpha1.TokenRouter
- name: quilkin.filters.token_router.v1alpha1.TokenRouter
config:
metadataKey: myapp.com/myownkey
endpoints:
Expand All @@ -43,7 +43,7 @@ View the [CaptureBytes](./capture.md) filter documentation for more details.
### Configuration Options ([Rust Doc](../../api/quilkin/filters/token_router/struct.Config.html))

```yaml
{{#include ../../../target/quilkin.extensions.filters.token_router.v1alpha1.yaml}}
{{#include ../../../target/quilkin.filters.token_router.v1alpha1.yaml}}
```

### Metrics
Expand Down Expand Up @@ -77,12 +77,12 @@ For example, a configuration would look like:
version: v1alpha1
static:
filters:
- name: quilkin.extensions.filters.capture.v1alpha1.Capture # Capture and remove the authentication token
- name: quilkin.filters.capture.v1alpha1.Capture # Capture and remove the authentication token
config:
suffix:
size: 3
remove: true
- name: quilkin.extensions.filters.token_router.v1alpha1.TokenRouter
- name: quilkin.filters.token_router.v1alpha1.TokenRouter
endpoints:
- address: 127.0.0.1:26000
metadata:
Expand Down
2 changes: 1 addition & 1 deletion docs/src/filters/writing_custom_filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ A [trait][FilterFactory] representing a type that knows how to create instances

- An implementation provides a `name` and `create_filter` method.
- `create_filter` takes in [configuration][filter configuration] for the filter to create and returns a [FilterInstance] type containing a new instance of its filter type.
`name` returns the Filter name - a unique identifier of filters of the created type (e.g quilkin.extensions.filters.debug.v1alpha1.Debug).
`name` returns the Filter name - a unique identifier of filters of the created type (e.g quilkin.filters.debug.v1alpha1.Debug).

### FilterRegistry

Expand Down
4 changes: 2 additions & 2 deletions macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use include::IncludeProto;
///
/// ### Input
/// ```
/// quilkin::include_proto!("quilkin.extensions.filters.debug.v1alpha1");
/// quilkin::include_proto!("quilkin.filters.debug.v1alpha1");
/// ```
///
/// ### Output
Expand All @@ -39,7 +39,7 @@ use include::IncludeProto;
/// pub(crate) mod debug {
/// pub(crate) mod v1alpha1 {
/// #![doc(hidden)]
/// tonic::include_proto!("quilkin.extensions.filters.debug.v1alpha1");
/// tonic::include_proto!("quilkin.filters.debug.v1alpha1");
/// }
/// }
/// }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

syntax = "proto3";

package quilkin.extensions.filters.capture.v1alpha1;
package quilkin.filters.capture.v1alpha1;

import "google/protobuf/wrappers.proto";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

syntax = "proto3";

package quilkin.extensions.filters.compress.v1alpha1;
package quilkin.filters.compress.v1alpha1;

message Compress {
enum Mode {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

syntax = "proto3";

package quilkin.extensions.filters.concatenate_bytes.v1alpha1;
package quilkin.filters.concatenate_bytes.v1alpha1;

message ConcatenateBytes {
enum Strategy {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

syntax = "proto3";

package quilkin.extensions.filters.debug.v1alpha1;
package quilkin.filters.debug.v1alpha1;

import "google/protobuf/wrappers.proto";

Expand Down
Loading

0 comments on commit 6b48cf1

Please sign in to comment.