Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor various components #366

Merged
merged 12 commits into from
Sep 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ yq 4.27.2
helm 3.9.2
kubectl 1.24.3
kustomize 4.5.5
kind 0.14.0
kind 0.15.0
jb 0.5.1
tanka 0.22.1
tilt 0.30.7
38 changes: 38 additions & 0 deletions api/aperture/policy/wrappers/v1/decisions.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
syntax = "proto3";

package aperture.policy.wrappers.v1;

import "aperture/policy/decisions/v1/decisions.proto";

message LoadShedDecsisionWrapper {
// Load Shed Decision
policy.decisions.v1.LoadShedDecision load_shed_decision = 1;
// The index of Component in the Circuit.
int64 component_index = 2;
// Name of the Policy.
string policy_name = 3;
// Hash of the entire Policy spec.
string policy_hash = 4;
}

message TokensDecisionWrapper {
// Tokens Decision
policy.decisions.v1.TokensDecision tokens_decision = 1;
// The index of Component in the Circuit.
int64 component_index = 2;
// Name of the Policy.
string policy_name = 3;
// Hash of the entire Policy spec.
string policy_hash = 4;
}

message RateLimiterDecisionWrapper {
// Rate Limiter Decision
policy.decisions.v1.RateLimiterDecision rate_limiter_decision = 1;
// The index of Component in the Circuit.
int64 component_index = 2;
// Name of the Policy.
string policy_name = 3;
// Hash of the entire Policy spec.
string policy_hash = 4;
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
syntax = "proto3";

package aperture.common.config.v1;
package aperture.policy.wrappers.v1;

import "aperture/policy/decisions/v1/decisions.proto";
import "aperture/policy/language/v1/fluxmeter.proto";
import "aperture/policy/language/v1/policy.proto";

Expand Down Expand Up @@ -43,36 +42,3 @@ message RateLimiterWrapper {
// Hash of the entire Policy spec.
string policy_hash = 4;
}

message LoadShedDecsisionWrapper {
// Load Shed Decision
policy.decisions.v1.LoadShedDecision load_shed_decision = 1;
// The index of Component in the Circuit.
int64 component_index = 2;
// Name of the Policy.
string policy_name = 3;
// Hash of the entire Policy spec.
string policy_hash = 4;
}

message TokensDecisionWrapper {
// Tokens Decision
policy.decisions.v1.TokensDecision tokens_decision = 1;
// The index of Component in the Circuit.
int64 component_index = 2;
// Name of the Policy.
string policy_name = 3;
// Hash of the entire Policy spec.
string policy_hash = 4;
}

message RateLimiterDecisionWrapper {
// Rate Limiter Decision
policy.decisions.v1.RateLimiterDecision rate_limiter_decision = 1;
// The index of Component in the Circuit.
int64 component_index = 2;
// Name of the Policy.
string policy_name = 3;
// Hash of the entire Policy spec.
string policy_hash = 4;
}
2 changes: 1 addition & 1 deletion api/gen/openapiv2/aperture.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ info:
title: Aperture API
version: "1.0"
tags:
- name: PolicyService
- name: EntityCacheService
- name: InfoService
- name: StatusService
- name: FlowControlService
- name: FluxNinjaService
- name: PolicyService
consumes:
- application/json
produces:
Expand Down
Loading