-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add classifiers to flowcontrolv1.CheckResponse
- Loading branch information
1 parent
0e19524
commit 062b630
Showing
15 changed files
with
679 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
378 changes: 236 additions & 142 deletions
378
api/gen/proto/go/aperture/common/config/v1/config_properties_wrapper.pb.go
Large diffs are not rendered by default.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
api/gen/proto/go/aperture/common/config/v1/config_properties_wrapper.pb.json.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
332 changes: 210 additions & 122 deletions
332
api/gen/proto/go/aperture/flowcontrol/v1/flowcontrol.pb.go
Large diffs are not rendered by default.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
api/gen/proto/go/aperture/flowcontrol/v1/flowcontrol.pb.json.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package iface | ||
|
||
import selectorv1 "github.com/fluxninja/aperture/api/gen/proto/go/aperture/common/selector/v1" | ||
|
||
// ClassifierID is the ID of the Classifier. | ||
type ClassifierID struct { | ||
PolicyName string | ||
PolicyHash string | ||
} | ||
|
||
// String function returns the ClassifierID as a string. | ||
func (cID ClassifierID) String() string { | ||
return "policy_name-" + cID.PolicyName + "-policy_hash-" + cID.PolicyHash | ||
} | ||
|
||
// Classifier interface. | ||
type Classifier interface { | ||
// GetSelector returns the selector. | ||
GetSelector() *selectorv1.Selector | ||
// GetClassifierID returns ClassifierID object that should uniquely identify classifier. | ||
GetClassifierID() ClassifierID | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.