Documentation ¶
Index ¶
- type NodeMapper
- func (m *NodeMapper) MapNodeToWorkloads(_ context.Context, _ controller.Runtime, res *pbresource.Resource) ([]controller.Request, error)
- func (m *NodeMapper) NodeIDFromWorkload(workload *pbresource.Resource, workloadData *pbcatalog.Workload) *pbresource.ID
- func (m *NodeMapper) TrackWorkload(workloadID *pbresource.ID, nodeID *pbresource.ID)
- func (m *NodeMapper) UntrackWorkload(workloadID *pbresource.ID)
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.
Click to show internal directories.
Click to hide internal directories.