relayered

package
v0.0.0-...-6054725 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ProviderName = "relayered"

ProviderName of the cloud platform provider

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	Status    string `json:"status"`
	CreatedAt string `json:"created_at"`
}

Image represents a given relayered image configuration.

type ImageListResponse

type ImageListResponse []Image

ImageListResponse is the set of instances available from relayered in an images list call.

type Instance

type Instance struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	Image     string `json:"image"`
	Created   string `json:"created"`
	Status    string `json:"status"`
	CreatedAt string `json:"created_at"`
}

Instance represents a virtual server instance.

type InstancesListResponse

type InstancesListResponse []Instance

InstancesListResponse is the set of instances available from relayered in an images list call.

type Objects

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

Objects represent storage specific information for cloud object storage.

func (*Objects) CopyToBucket

func (s *Objects) CopyToBucket(config *types.Config, archPath string) error

CopyToBucket copies archive to bucket

func (*Objects) DeleteFromBucket

func (s *Objects) DeleteFromBucket(config *types.Config, key string) error

DeleteFromBucket deletes key from config's bucket

type Relayered

type Relayered struct {
	Storage *Objects
	// contains filtered or unexported fields
}

Relayered Provider to interact with relayered infrastructure

func NewProvider

func NewProvider() *Relayered

NewProvider relayered

func (*Relayered) AttachVolume

func (v *Relayered) AttachVolume(ctx *lepton.Context, image, name string, attachID int) error

AttachVolume is a stub to satisfy VolumeService interface

func (*Relayered) BuildImage

func (v *Relayered) BuildImage(ctx *lepton.Context) (string, error)

BuildImage to be upload on relayered

func (*Relayered) BuildImageWithPackage

func (v *Relayered) BuildImageWithPackage(ctx *lepton.Context, pkgpath string) (string, error)

BuildImageWithPackage to upload on relayered.

func (*Relayered) CreateImage

func (v *Relayered) CreateImage(ctx *lepton.Context, imagePath string) error

CreateImage - Creates image on relayered using nanos images

func (*Relayered) CreateInstance

func (v *Relayered) CreateInstance(ctx *lepton.Context) error

CreateInstance - Creates instance on relayered Cloud Platform

func (*Relayered) CreateVolume

func (v *Relayered) CreateVolume(ctx *lepton.Context, name, data, provider string) (lepton.NanosVolume, error)

CreateVolume is a stub to satisfy VolumeService interface

func (*Relayered) CustomizeImage

func (v *Relayered) CustomizeImage(ctx *lepton.Context) (string, error)

CustomizeImage returns image path with adaptations needed by cloud provider

func (*Relayered) DeleteImage

func (v *Relayered) DeleteImage(ctx *lepton.Context, snapshotID string) error

DeleteImage deletes image from v

func (*Relayered) DeleteInstance

func (v *Relayered) DeleteInstance(ctx *lepton.Context, instanceID string) error

DeleteInstance deletes instance from relayered

func (*Relayered) DeleteVolume

func (v *Relayered) DeleteVolume(ctx *lepton.Context, name string) error

DeleteVolume is a stub to satisfy VolumeService interface

func (*Relayered) DetachVolume

func (v *Relayered) DetachVolume(ctx *lepton.Context, image, name string) error

DetachVolume is a stub to satisfy VolumeService interface

func (*Relayered) GetAllVolumes

func (v *Relayered) GetAllVolumes(ctx *lepton.Context) (*[]lepton.NanosVolume, error)

GetAllVolumes is a stub to satisfy VolumeService interface

func (*Relayered) GetImages

func (v *Relayered) GetImages(ctx *lepton.Context) ([]lepton.CloudImage, error)

GetImages return all images on relayered needs tags added

func (*Relayered) GetInstanceByName

func (v *Relayered) GetInstanceByName(ctx *lepton.Context, name string) (*lepton.CloudInstance, error)

GetInstanceByName returns instance with given name

func (*Relayered) GetInstanceLogs

func (v *Relayered) GetInstanceLogs(ctx *lepton.Context, instancename string) (string, error)

GetInstanceLogs gets instance related logs

func (*Relayered) GetInstances

func (v *Relayered) GetInstances(ctx *lepton.Context) ([]lepton.CloudInstance, error)

GetInstances return all instances on relayered

func (*Relayered) GetStorage

func (v *Relayered) GetStorage() lepton.Storage

GetStorage returns storage interface for cloud provider

func (*Relayered) Initialize

func (v *Relayered) Initialize(config *types.ProviderConfig) error

Initialize provider

func (*Relayered) ListImages

func (v *Relayered) ListImages(ctx *lepton.Context) error

ListImages lists images on relayered

func (*Relayered) ListInstances

func (v *Relayered) ListInstances(ctx *lepton.Context) error

ListInstances lists instances on v

func (*Relayered) PrintInstanceLogs

func (v *Relayered) PrintInstanceLogs(ctx *lepton.Context, instancename string, watch bool) error

PrintInstanceLogs writes instance logs to console

func (*Relayered) RebootInstance

func (v *Relayered) RebootInstance(ctx *lepton.Context, instanceName string) error

RebootInstance reboots the instance.

func (*Relayered) ResizeImage

func (v *Relayered) ResizeImage(ctx *lepton.Context, imagename string, hbytes string) error

ResizeImage is not supported on relayered.

func (*Relayered) StartInstance

func (v *Relayered) StartInstance(ctx *lepton.Context, instanceID string) error

StartInstance starts an instance in relayered

func (*Relayered) StopInstance

func (v *Relayered) StopInstance(ctx *lepton.Context, instanceID string) error

StopInstance halts instance from v

func (*Relayered) SyncImage

func (v *Relayered) SyncImage(config *types.Config, target lepton.Provider, image string) error

SyncImage syncs image from provider to another provider

type ResourceGroup

type ResourceGroup struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

ResourceGroup represents a single resource group.

type ResourceGroupResponse

type ResourceGroupResponse struct {
	ResourceGroups []ResourceGroup `json:"resources"`
}

ResourceGroupResponse is the response type for the resource group list endpoint.

type Subnet

type Subnet struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

Subnet represents a single subnet.

type SubnetListResponse

type SubnetListResponse struct {
	Subnets []Subnet `json:"subnets"`
}

SubnetListResponse is the response type for the subnet list endpoint.

type SubnetResponse

type SubnetResponse struct {
	Subnets []Subnet `json:"subnets"`
}

SubnetResponse is the response type for the subnet list endpoint.

type VPC

type VPC struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

VPC represents a single vpc.

type VPCListResponse

type VPCListResponse struct {
	VPCs []VPC `json:"vpcs"`
}

VPCListResponse is the response type for the vpc list endpoint.

Jump to

Keyboard shortcuts

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