Documentation
¶
Overview ¶
Package ruleserver implements a gRPC streaming server that distributes generation and verification rules from the kontxt controller to ext-auth adapter instances. It replaces the ConfigMap-based distribution mechanism.
Index ¶
- type RuleServer
- func (s *RuleServer) RemoveGenerationRule(namespace, name string)
- func (s *RuleServer) RemoveVerificationRule(namespace, name string)
- func (s *RuleServer) StreamGenerationRules(stream rulesv1.RuleDiscoveryService_StreamGenerationRulesServer) error
- func (s *RuleServer) StreamVerificationRules(stream rulesv1.RuleDiscoveryService_StreamVerificationRulesServer) error
- func (s *RuleServer) UpdateGenerationRules(rules []controller.GenerationRule)
- func (s *RuleServer) UpdateVerificationRules(rules []controller.VerificationRule)
- func (s *RuleServer) UpsertGenerationRule(rule controller.GenerationRule)
- func (s *RuleServer) UpsertVerificationRule(rule controller.VerificationRule)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RuleServer ¶
type RuleServer struct {
rulesv1.UnimplementedRuleDiscoveryServiceServer
// contains filtered or unexported fields
}
RuleServer implements the RuleDiscoveryService gRPC service. It holds the current rule state and broadcasts updates to all connected ext-auth clients via per-client channels.
func (*RuleServer) RemoveGenerationRule ¶
func (s *RuleServer) RemoveGenerationRule(namespace, name string)
RemoveGenerationRule removes a generation rule by namespace/name and broadcasts a delta to all connected clients.
func (*RuleServer) RemoveVerificationRule ¶
func (s *RuleServer) RemoveVerificationRule(namespace, name string)
RemoveVerificationRule removes a verification rule by namespace/name.
func (*RuleServer) StreamGenerationRules ¶
func (s *RuleServer) StreamGenerationRules(stream rulesv1.RuleDiscoveryService_StreamGenerationRulesServer) error
StreamGenerationRules implements the bidirectional streaming RPC. On first request it sends a full snapshot; subsequent updates are pushed as they occur.
func (*RuleServer) StreamVerificationRules ¶
func (s *RuleServer) StreamVerificationRules(stream rulesv1.RuleDiscoveryService_StreamVerificationRulesServer) error
StreamVerificationRules implements the bidirectional streaming RPC for verification rules.
func (*RuleServer) UpdateGenerationRules ¶
func (s *RuleServer) UpdateGenerationRules(rules []controller.GenerationRule)
UpdateGenerationRules replaces all generation rules and broadcasts a full snapshot to all connected clients.
func (*RuleServer) UpdateVerificationRules ¶
func (s *RuleServer) UpdateVerificationRules(rules []controller.VerificationRule)
UpdateVerificationRules replaces all verification rules and broadcasts a full snapshot.
func (*RuleServer) UpsertGenerationRule ¶
func (s *RuleServer) UpsertGenerationRule(rule controller.GenerationRule)
UpsertGenerationRule adds or updates a single generation rule and broadcasts a delta to all connected clients.
func (*RuleServer) UpsertVerificationRule ¶
func (s *RuleServer) UpsertVerificationRule(rule controller.VerificationRule)
UpsertVerificationRule adds or updates a single verification rule.