nodemapper

package
v1.16.109 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeMapper

type NodeMapper struct {
	// contains filtered or unexported fields
}

func New

func New() *NodeMapper

func (*NodeMapper) MapNodeToWorkloads

func (m *NodeMapper) MapNodeToWorkloads(_ context.Context, _ controller.Runtime, res *pbresource.Resource) ([]controller.Request, error)

MapNodeToWorkloads will take a Node resource and return controller requests for all Workloads associated with the Node.

func (*NodeMapper) NodeIDFromWorkload

func (m *NodeMapper) NodeIDFromWorkload(workload *pbresource.Resource, workloadData *pbcatalog.Workload) *pbresource.ID

NodeIDFromWorkload will create a resource ID referencing the Node type with the same tenancy as the workload and with the name populated from the workloads NodeName field.

func (*NodeMapper) TrackWorkload

func (m *NodeMapper) TrackWorkload(workloadID *pbresource.ID, nodeID *pbresource.ID)

TrackWorkload instructs the NodeMapper to associate the given workload ID with the given node ID.

func (*NodeMapper) UntrackWorkload

func (m *NodeMapper) UntrackWorkload(workloadID *pbresource.ID)

UntrackWorkload will cause the node mapper to forget about the specified workload if it is currently tracking it.

Jump to

Keyboard shortcuts

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