instance

package
v0.1.0-alpha2 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCreateInstanceWait = time.Minute * 2
	DefaultRetryCount         = 3

	ClusterNamePrefix = "K8S-APP"
)

Variables

This section is empty.

Functions

func GeneateName

func GeneateName(clusterName string, role byte) string

Types

type CreateInstancesOption

type CreateInstancesOption struct {
	Name          string
	VxNet         string
	SSHKeyID      string
	Count         int
	Role          byte
	InstanceClass int
	api.ImagesPreset
}

type Instance

type Instance struct {
	ID string
	IP string
}

type Interface

type Interface interface {
	CreateInstances(*CreateInstancesOption) ([]*Instance, error)
	DeleteInstances(instanceID []string) error
	GetInstance(string) (*Instance, error)
	StopInstances(...string) error
}

func NewQingCloudInstanceService

func NewQingCloudInstanceService(instance *service.InstanceService, job *service.JobService) Interface

Jump to

Keyboard shortcuts

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