kubernetes/plugin/pkg/auth/authorizer/node/graph.go

type namedVertex

func newNamedVertex(vertexType vertexType, namespace, name string, id int) *namedVertex {}

func (n *namedVertex) ID() int {}

func (n *namedVertex) String() string {}

type destinationEdge

func newDestinationEdge(from, to, destination graph.Node) graph.Edge {}

func (e *destinationEdge) From() graph.Node   {}

func (e *destinationEdge) To() graph.Node     {}

func (e *destinationEdge) Weight() float64    {}

func (e *destinationEdge) DestinationID() int {}

type Graph

type namespaceVertexMapping

type nameVertexMapping

func NewGraph() *Graph {}

type vertexType

const configMapVertexType

const sliceVertexType

const nodeVertexType

const podVertexType

const pvcVertexType

const pvVertexType

const resourceClaimVertexType

const secretVertexType

const vaVertexType

const serviceAccountVertexType

var vertexTypes

var vertexTypeWithAuthoritativeIndex

// must be called under a write lock
func (g *Graph) getOrCreateVertexLocked(vertexType vertexType, namespace, name string) *namedVertex {}

// must be called under a read lock
func (g *Graph) getVertexRLocked(vertexType vertexType, namespace, name string) (*namedVertex, bool) {}

// must be called under a write lock
func (g *Graph) createVertexLocked(vertexType vertexType, namespace, name string) *namedVertex {}

// must be called under write lock
func (g *Graph) deleteVertexLocked(vertexType vertexType, namespace, name string) {}

// must be called under write lock
// deletes edges from a given vertex type to a specific vertex
// will delete each orphaned "from" vertex, but will never delete the "to" vertex
func (g *Graph) deleteEdgesLocked(fromType, toType vertexType, toNamespace, toName string) {}

// A fastpath for recomputeDestinationIndexLocked for "removing edge" case.
func (g *Graph) removeEdgeFromDestinationIndexLocked(e graph.Edge) {}

// A fastpath for recomputeDestinationIndexLocked for "adding edge case".
func (g *Graph) addEdgeToDestinationIndexLocked(e graph.Edge) {}

// must be called under write lock
// removeVertexLocked removes the specified vertex from the graph and from the maintained indices.
// It does nothing to indexes of neighbor vertices.
func (g *Graph) removeVertexLocked(v *namedVertex) {}

// must be called under write lock
// recomputeDestinationIndexLocked recomputes the index of destination ids for the specified vertex
func (g *Graph) recomputeDestinationIndexLocked(n graph.Node) {}

// AddPod should only be called once spec.NodeName is populated.
// It sets up edges for the following relationships (which are immutable for a pod once bound to a node):
//
//	pod       -> node
//	secret    -> pod
//	configmap -> pod
//	pvc       -> pod
//	svcacct   -> pod
func (g *Graph) AddPod(pod *corev1.Pod) {}

// Must be called under a write lock.
// All edge adds must be handled by that method rather than by calling
// g.graph.SetEdge directly.
// Note: if "from" belongs to vertexTypeWithAuthoritativeIndex, then
// "destination" must be non-nil.
func (g *Graph) addEdgeLocked(from, to, destination *namedVertex) {}

func (g *Graph) DeletePod(name, namespace string) {}

// AddPV sets up edges for the following relationships:
//
//	secret -> pv
//
//	pv -> pvc
func (g *Graph) AddPV(pv *corev1.PersistentVolume) {}

func (g *Graph) DeletePV(name string) {}

// AddVolumeAttachment sets up edges for the following relationships:
//
//	volume attachment -> node
func (g *Graph) AddVolumeAttachment(attachmentName, nodeName string) {}

func (g *Graph) DeleteVolumeAttachment(name string) {}

// AddResourceSlice sets up edges for the following relationships:
//
//	node resource slice -> node
func (g *Graph) AddResourceSlice(sliceName, nodeName string) {}

func (g *Graph) DeleteResourceSlice(sliceName string) {}