hyperstack

package
v0.0.0-...-fc8d636 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CloudProviderID = "hyperstack"
	DefaultAPIURL   = "https://infrahub-api.nexgencloud.com/v1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HyperstackClient

type HyperstackClient struct {
	v1.NotImplCloudClient
	// contains filtered or unexported fields
}

func NewHyperstackClient

func NewHyperstackClient(credential HyperstackCredential, location string, opts ...HyperstackClientOption) (*HyperstackClient, error)

func (*HyperstackClient) CreateInstance

func (c *HyperstackClient) CreateInstance(ctx context.Context, attrs v1.CreateInstanceAttrs) (*v1.Instance, error)

func (*HyperstackClient) GetAPIType

func (c *HyperstackClient) GetAPIType() v1.APIType

func (*HyperstackClient) GetCapabilities

func (c *HyperstackClient) GetCapabilities(_ context.Context) (v1.Capabilities, error)

func (*HyperstackClient) GetCloudProviderID

func (c *HyperstackClient) GetCloudProviderID() v1.CloudProviderID

func (*HyperstackClient) GetInstance

func (c *HyperstackClient) GetInstance(ctx context.Context, instanceID v1.CloudProviderInstanceID) (*v1.Instance, error)

func (*HyperstackClient) GetInstancePollTime

func (c *HyperstackClient) GetInstancePollTime() time.Duration

func (*HyperstackClient) GetInstanceTypePollTime

func (c *HyperstackClient) GetInstanceTypePollTime() time.Duration

func (*HyperstackClient) GetInstanceTypes

func (c *HyperstackClient) GetInstanceTypes(ctx context.Context, args v1.GetInstanceTypeArgs) ([]v1.InstanceType, error)

func (*HyperstackClient) GetLocations

func (c *HyperstackClient) GetLocations(ctx context.Context, args v1.GetLocationsArgs) ([]v1.Location, error)

func (*HyperstackClient) GetReferenceID

func (c *HyperstackClient) GetReferenceID() string

func (*HyperstackClient) GetTenantID

func (c *HyperstackClient) GetTenantID() (string, error)

func (*HyperstackClient) ListInstances

func (c *HyperstackClient) ListInstances(ctx context.Context, args v1.ListInstancesArgs) ([]v1.Instance, error)

func (*HyperstackClient) MakeClient

func (c *HyperstackClient) MakeClient(_ context.Context, location string) (v1.CloudClient, error)

func (*HyperstackClient) StartInstance

func (c *HyperstackClient) StartInstance(ctx context.Context, instanceID v1.CloudProviderInstanceID) error

func (*HyperstackClient) StopInstance

func (c *HyperstackClient) StopInstance(ctx context.Context, instanceID v1.CloudProviderInstanceID) error

func (*HyperstackClient) TerminateInstance

func (c *HyperstackClient) TerminateInstance(ctx context.Context, instanceID v1.CloudProviderInstanceID) error

type HyperstackClientOption

type HyperstackClientOption func(*HyperstackClient)

func WithHTTPClient

func WithHTTPClient(httpClient *http.Client) HyperstackClientOption

func WithLogger

func WithLogger(logger v1.Logger) HyperstackClientOption

type HyperstackCredential

type HyperstackCredential struct {
	RefID  string
	APIKey string `json:"api_key"`
	APIURL string `json:"api_url"`
}

func NewHyperstackCredential

func NewHyperstackCredential(refID, apiKey string) *HyperstackCredential

func (*HyperstackCredential) GetAPIType

func (c *HyperstackCredential) GetAPIType() v1.APIType

func (*HyperstackCredential) GetCapabilities

func (c *HyperstackCredential) GetCapabilities(_ context.Context) (v1.Capabilities, error)

func (*HyperstackCredential) GetCloudProviderID

func (c *HyperstackCredential) GetCloudProviderID() v1.CloudProviderID

func (*HyperstackCredential) GetReferenceID

func (c *HyperstackCredential) GetReferenceID() string

func (*HyperstackCredential) GetTenantID

func (c *HyperstackCredential) GetTenantID() (string, error)

func (*HyperstackCredential) MakeClient

func (c *HyperstackCredential) MakeClient(ctx context.Context, location string) (v1.CloudClient, error)

func (*HyperstackCredential) MakeClientWithOptions

func (c *HyperstackCredential) MakeClientWithOptions(_ context.Context, location string, opts ...HyperstackClientOption) (v1.CloudClient, error)

func (*HyperstackCredential) SetDefaults

func (c *HyperstackCredential) SetDefaults()

func (*HyperstackCredential) Validate

func (c *HyperstackCredential) Validate() error

Jump to

Keyboard shortcuts

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