github.com/cilium/cilium@v1.16.2/pkg/endpoint/regeneration/owner.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright Authors of Cilium 3 4 package regeneration 5 6 import ( 7 "context" 8 9 datapath "github.com/cilium/cilium/pkg/datapath/types" 10 "github.com/cilium/cilium/pkg/fqdn/restore" 11 monitorAPI "github.com/cilium/cilium/pkg/monitor/api" 12 ) 13 14 // Owner is the interface defines the requirements for anybody owning policies. 15 type Owner interface { 16 // QueueEndpointBuild puts the given endpoint in the processing queue 17 QueueEndpointBuild(ctx context.Context, epID uint64) (func(), error) 18 19 // GetCompilationLock returns the mutex responsible for synchronizing compilation 20 // of BPF programs. 21 GetCompilationLock() datapath.CompilationLock 22 23 // SendNotification is called to emit an agent notification 24 SendNotification(msg monitorAPI.AgentNotifyMessage) error 25 26 // Datapath returns a reference to the datapath implementation. 27 Datapath() datapath.Datapath 28 29 // GetDNSRules creates a fresh copy of DNS rules that can be used when 30 // endpoint is restored on a restart. 31 // The endpoint lock must not be held while calling this function. 32 GetDNSRules(epID uint16) restore.DNSRules 33 34 // RemoveRestoredDNSRules removes any restored DNS rules for 35 // this endpoint from the DNS proxy. 36 RemoveRestoredDNSRules(epID uint16) 37 }