ruleserver

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

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

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 NewRuleServer

func NewRuleServer() *RuleServer

NewRuleServer creates a new RuleServer.

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

StreamGenerationRules implements the bidirectional streaming RPC. On first request it sends a full snapshot; subsequent updates are pushed as they occur.

func (*RuleServer) StreamVerificationRules

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL