processing

package
v0.0.0-...-15ca06a Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *processingMongoAccessor

New creates a new instance of the processingMongoAccessor

Types

type Container

type Container struct {
	Image   string            `json:"image,omitempty" bson:"image,omitempty"`     // Image is the container image
	Command string            `json:"command,omitempty" bson:"command,omitempty"` // Command is the container command
	Args    string            `json:"args,omitempty" bson:"args,omitempty"`       // Args is the container arguments
	Env     map[string]string `json:"env,omitempty" bson:"env,omitempty"`         // Env is the container environment variables
	Volumes map[string]string `json:"volumes,omitempty" bson:"volumes,omitempty"` // Volumes is the container volumes
}

type Expose

type Expose struct {
	Port    int    `json:"port,omitempty" bson:"port,omitempty"`       // Port is the port
	Reverse string `json:"reverse,omitempty" bson:"reverse,omitempty"` // Reverse is the reverse
	PAT     int    `json:"pat,omitempty" bson:"pat,omitempty"`         // PAT is the PAT
}

type ProcessingResource

type ProcessingResource struct {
	resource_model.AbstractResource
	IsService    bool           `json:"is_service,omitempty" bson:"is_service,omitempty"`       // IsService is a flag that indicates if the processing is a service
	CPUs         []*compute.CPU `bson:"cpus,omitempty" json:"cp_us,omitempty"`                  // CPUs is the list of CPUs
	GPUs         []*compute.GPU `bson:"gpus,omitempty" json:"gp_us,omitempty"`                  // GPUs is the list of GPUs
	RAM          *compute.RAM   `bson:"ram,omitempty" json:"ram,omitempty"`                     // RAM is the RAM
	Storage      uint           `bson:"storage,omitempty" json:"storage,omitempty"`             // Storage is the storage
	Parallel     bool           `bson:"parallel,omitempty" json:"parallel,omitempty"`           // Parallel is a flag that indicates if the processing is parallel
	ScalingModel uint           `bson:"scaling_model,omitempty" json:"scaling_model,omitempty"` // ScalingModel is the scaling model
	DiskIO       string         `bson:"disk_io,omitempty" json:"disk_io,omitempty"`             // DiskIO is the disk IO
	Container    *Container     `bson:"container,omitempty" json:"container,omitempty"`         // Container is the container
	Expose       []Expose       `bson:"expose,omitempty" json:"expose,omitempty"`               // Expose is the execution
}

* ProcessingResource is a struct that represents a processing resource * it defines the resource processing

func (*ProcessingResource) Deserialize

func (dma *ProcessingResource) Deserialize(j map[string]interface{}) utils.DBObject

func (*ProcessingResource) GetAccessor

func (d *ProcessingResource) GetAccessor(caller *tools.HTTPCaller) utils.Accessor

func (*ProcessingResource) Serialize

func (dma *ProcessingResource) Serialize() map[string]interface{}

Jump to

Keyboard shortcuts

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