[SECVULN-1533] chore: Clarify iptables Provider interface docs (#19704)

chore: Clarify iptables Provider interface docs

Add docs clarifying constraints on use and return values.
This commit is contained in:
Michael Zalimeni 2023-11-21 09:01:48 -05:00 committed by GitHub
parent a28f4b7f37
commit 8a89465e96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -78,8 +78,11 @@ type Provider interface {
// ApplyRules executes rules that have been added via AddRule.
// This operation is currently not atomic, and if there's an error applying rules,
// you may be left in a state where partial rules were applied.
// ApplyRules should not be called twice on the same instance in order to avoid
// duplicate rule application.
ApplyRules() error
// Rules returns the list of rules that have been added but not applied yet.
// Rules returns the list of rules that have been added (including those not yet
// applied).
Rules() []string
}