driver

package
v0.0.0-...-5362612 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateReponse

type CreateReponse struct {
	ID string
}

type CreateRequest

type CreateRequest struct {
	Name   string
	CPU    int64
	Memory int64
}

type DockerDriver

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

func NewDockerDriver

func NewDockerDriver() (*DockerDriver, error)

func (*DockerDriver) CreateServer

func (d *DockerDriver) CreateServer(req *CreateRequest) (*CreateReponse, error)

func (*DockerDriver) DeleteServer

func (d *DockerDriver) DeleteServer(name string) error

func (*DockerDriver) GetServerStatus

func (d *DockerDriver) GetServerStatus(name string) (*GetStatusReponse, error)

func (*DockerDriver) IsServerExist

func (d *DockerDriver) IsServerExist(name string) (bool, error)

type GetStatusReponse

type GetStatusReponse struct {
	State            string
	CPUPercentage    float64
	MemoryPercentage float64
}

type Interface

type Interface interface {
	CreateServer(*CreateRequest) (*CreateReponse, error)
	DeleteServer(name string) error
	IsServerExist(name string) (bool, error)
	GetServerStatus(name string) (*GetStatusReponse, error)
}

Jump to

Keyboard shortcuts

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