github.com/cilium/cilium@v1.16.2/pkg/identity/identitymanager/observer.go (about)

     1  // SPDX-License-Identifier: Apache-2.0
     2  // Copyright Authors of Cilium
     3  
     4  package identitymanager
     5  
     6  import (
     7  	"github.com/cilium/cilium/pkg/identity"
     8  )
     9  
    10  // Observer can sign up to receive events whenever local identities are removed.
    11  type Observer interface {
    12  	// LocalEndpointIdentityAdded is called when an identity first becomes
    13  	// used on the node. Implementations must ensure that the callback
    14  	// returns within a reasonable period.
    15  	LocalEndpointIdentityAdded(*identity.Identity)
    16  
    17  	// LocalEndpointIdentityRemoved is called when an identity is no longer
    18  	// in use on the node. Implementations must ensure that the callback
    19  	// returns within a reasonable period.
    20  	LocalEndpointIdentityRemoved(*identity.Identity)
    21  }