services

package
v0.0.0-...-0be4235 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AddContainerType = "add-container"
	ContainerType    = "container"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddContainerJob

type AddContainerJob struct {
	Name       string `json:"name"`
	OSTemplate string `json:"ostemplate"`
}

type ContainerAPIService

type ContainerAPIService struct {
	DB        DBConnection
	Commander *openvzcmd.POCCommanderStub
}

func (*ContainerAPIService) Create

func (*ContainerAPIService) Delete

func (srv *ContainerAPIService) Delete(id string) (*api.ApiResponse, error)

func (*ContainerAPIService) GetById

func (*ContainerAPIService) List

func (*ContainerAPIService) Update

type DBConnection

type DBConnection = *sqlx.DB

type JobAPIService

type JobAPIService struct {
	DB        DBConnection
	Commander *openvzcmd.POCCommanderStub
}

func (*JobAPIService) GetById

func (srv *JobAPIService) GetById(id string) (*api.GetJobByIdResponse, error)

type JobService

type JobService struct {
	DB        DBConnection
	Commander *openvzcmd.POCCommanderStub
}

func NewJobService

func NewJobService(db DBConnection, cmd *openvzcmd.POCCommanderStub) *JobService

func (*JobService) ConsumeJobs

func (j *JobService) ConsumeJobs(jobInterval time.Duration)

Jump to

Keyboard shortcuts

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