Skip to content

Commit

Permalink
Refactor various components (#366)
Browse files Browse the repository at this point in the history
  • Loading branch information
harjotgill authored Sep 8, 2022
1 parent 752155d commit dc22124
Show file tree
Hide file tree
Showing 59 changed files with 1,292 additions and 1,211 deletions.
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

0 comments on commit dc22124

Please sign in to comment.