Documentation ¶
Index ¶
- type MetalService
- func (ms *MetalService) AllocateIP(ctx context.Context, svc v1.Service, ...) (*models.V1IPResponse, error)
- func (ms *MetalService) FindClusterIPs(ctx context.Context, projectID, clusterID string) ([]*models.V1IPResponse, error)
- func (ms *MetalService) FindProjectIP(ctx context.Context, projectID, ip string) (*models.V1IPResponse, error)
- func (ms *MetalService) FindProjectIPsWithTag(ctx context.Context, projectID, tag string) ([]*models.V1IPResponse, error)
- func (ms *MetalService) FreeIP(ctx context.Context, ip string) error
- func (ms *MetalService) GetMachineFromNode(ctx context.Context, node *v1.Node) (*models.V1MachineResponse, error)
- func (ms *MetalService) GetMachineFromNodeName(ctx context.Context, nodeName types.NodeName) (*models.V1MachineResponse, error)
- func (ms *MetalService) GetMachineFromProviderID(ctx context.Context, providerID string) (*models.V1MachineResponse, error)
- func (ms *MetalService) GetMachinesFromNodes(ctx context.Context, nodes []v1.Node) ([]*models.V1MachineResponse, error)
- func (ms *MetalService) UpdateIP(ctx context.Context, body *models.V1IPUpdateRequest) (*models.V1IPResponse, error)
- func (ms *MetalService) UpdateMachineTags(m *string, tags []string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetalService ¶ added in v0.7.8
type MetalService struct {
// contains filtered or unexported fields
}
func (*MetalService) AllocateIP ¶ added in v0.7.12
func (ms *MetalService) AllocateIP(ctx context.Context, svc v1.Service, namePrefix, project, network, clusterID string) (*models.V1IPResponse, error)
AllocateIP acquires an IP within the given network for a given project.
func (*MetalService) FindClusterIPs ¶ added in v0.7.12
func (ms *MetalService) FindClusterIPs(ctx context.Context, projectID, clusterID string) ([]*models.V1IPResponse, error)
FindClusterIPs returns the allowed IPs of the given cluster.
func (*MetalService) FindProjectIP ¶ added in v0.7.12
func (ms *MetalService) FindProjectIP(ctx context.Context, projectID, ip string) (*models.V1IPResponse, error)
FindProjectIP returns the IP
func (*MetalService) FindProjectIPsWithTag ¶ added in v0.7.12
func (ms *MetalService) FindProjectIPsWithTag(ctx context.Context, projectID, tag string) ([]*models.V1IPResponse, error)
FindProjectIPsWithTag returns the IPs of the given project that also have the given tag.
func (*MetalService) FreeIP ¶ added in v0.7.12
func (ms *MetalService) FreeIP(ctx context.Context, ip string) error
FreeIP frees the given IP address.
func (*MetalService) GetMachineFromNode ¶ added in v0.7.9
func (ms *MetalService) GetMachineFromNode(ctx context.Context, node *v1.Node) (*models.V1MachineResponse, error)
GetMachineFromNode try providerID first, otherwise node.Name to fetch the machine.
func (*MetalService) GetMachineFromNodeName ¶ added in v0.7.8
func (ms *MetalService) GetMachineFromNodeName(ctx context.Context, nodeName types.NodeName) (*models.V1MachineResponse, error)
GetMachineFromNodeName returns a machine where hostname matches the kubernetes node.Name.
func (*MetalService) GetMachineFromProviderID ¶ added in v0.7.8
func (ms *MetalService) GetMachineFromProviderID(ctx context.Context, providerID string) (*models.V1MachineResponse, error)
GetMachineFromProviderID uses providerID to get the machine id and returns the machine.
func (*MetalService) GetMachinesFromNodes ¶ added in v0.7.8
func (ms *MetalService) GetMachinesFromNodes(ctx context.Context, nodes []v1.Node) ([]*models.V1MachineResponse, error)
GetMachinesFromNodes gets metal machines from K8s nodes.
func (*MetalService) UpdateIP ¶ added in v0.7.12
func (ms *MetalService) UpdateIP(ctx context.Context, body *models.V1IPUpdateRequest) (*models.V1IPResponse, error)
UpdateIP updates the given IP address.
func (*MetalService) UpdateMachineTags ¶ added in v0.7.12
func (ms *MetalService) UpdateMachineTags(m *string, tags []string) error
UpdateMachineTags sets the machine tags.