apis

package
v0.2.24 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0, BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package apis is the main package for provider specific APIs

Package apis is the main package for provider specific APIs

Package apis is the main package for provider specific APIs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClientForToken

func GetClientForToken(token string) *hcloud.Client

GetClientForToken returns an underlying HCloud client for the given token.

PARAMETERS token string Token to look up client instance for

func GetRegionFromZone added in v0.2.0

func GetRegionFromZone(zone string) string

GetRegionFromZone returns the region for a given zone string

PARAMETERS zone string Datacenter zone

func SetClientForToken

func SetClientForToken(token string, client *hcloud.Client)

SetClientForToken sets a preconfigured HCloud client for the given token.

PARAMETERS token string Token to look up client instance for client *hcloud.Client Preconfigured HCloud client

func WaitForActionsAndGetFloatingIP added in v0.2.3

func WaitForActionsAndGetFloatingIP(ctx context.Context, client *hcloud.Client, ip *hcloud.FloatingIP) (*hcloud.FloatingIP, error)

WaitForActionsAndGetFloatingIP waits for all actions to complete for the floating IP given and returns it afterwards.

PARAMETERS ctx context.Context Execution context client *hcloud.Client HCloud client ip *hcloud.FloatingIP HCloud floating IP struct

func WaitForActionsAndGetServer added in v0.2.3

func WaitForActionsAndGetServer(ctx context.Context, client *hcloud.Client, server *hcloud.Server) (*hcloud.Server, error)

WaitForActionsAndGetServer waits for all actions to complete for the server given and returns it afterwards.

PARAMETERS ctx context.Context Execution context client *hcloud.Client HCloud client ip *hcloud.Server HCloud server struct

Types

type ProviderSpec

type ProviderSpec struct {
	Cluster        string `json:"cluster"`
	Zone           string `json:"zone"`
	ServerType     string `json:"serverType"`
	ImageName      string `json:"imageName"`
	SSHFingerprint string `json:"sshFingerprint"`

	PlacementGroupID string `json:"placementGroupID,omitempty"`
	FloatingPoolName string `json:"floatingPoolName,omitempty"`
	NetworkName      string `json:"networkName,omitempty"`
}

ProviderSpec is the spec to be used while parsing the calls.

Directories

Path Synopsis
Package mock provides all methods required to simulate a driver
Package mock provides all methods required to simulate a driver
Package transcoder is used for API related object transformations
Package transcoder is used for API related object transformations
Package validation - validation is used to validate cloud specific ProviderSpec
Package validation - validation is used to validate cloud specific ProviderSpec

Jump to

Keyboard shortcuts

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