workload

package
v0.2.2-0...-aec2f31 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(wl *wltypes.RDTWorkLoad) error

Create function creates workload in data base

func Delete

func Delete(wl *wltypes.RDTWorkLoad) error

Delete function deletes workload from data base

func DeleteByID

func DeleteByID(request *restful.Request, response *restful.Response)

DeleteByID handles DELETE /v1/workloads/{id}

func Enforce

func Enforce(w *wltypes.RDTWorkLoad) error

Enforce a user request workload based on defined policy

func Get

func Get(request *restful.Request, response *restful.Response)

Get handles GET /v1/workloads

func GetAll

func GetAll() ([]wltypes.RDTWorkLoad, error)

GetAll gets list of workloads

func GetByID

func GetByID(request *restful.Request, response *restful.Response)

GetByID handle GET /v1/workloads/{id}

func GetByUUID

func GetByUUID(uuid string) (result wltypes.RDTWorkLoad, err error)

GetByUUID function gets workload from database by UUID (OpenStack instance identifier)

func GetWorkloadByID

func GetWorkloadByID(id string) (result wltypes.RDTWorkLoad, err error)

GetWorkloadByID function gets workload from data base by ID

func Init

func Init() error

Init responsible for database creation this function should be exported to give possibility to use DB for example by Openstack without need of registering workload module

func NewWorkload

func NewWorkload(request *restful.Request, response *restful.Response)

NewWorkload handle POST /v1/workloads sample POST request data body : '{ "core_ids" : ["1","2"], "policy": "gold" }' body : '{ "task_ids" : ["123"], "policy" : "silver" }' body : '{ "core_ids" : ["123"], "rdt" : { "cache" : { "max" : 4, "min": 2 } } }

func Patch

func Patch(request *restful.Request, response *restful.Response)

Patch handles PATCH /v1/workloads/{id}

func Register

func Register(prefix string, container *restful.Container)

Register add handlers for /v1/workloads endpoint

func Release

func Release(w *wltypes.RDTWorkLoad) error

Release Cos of the workload

func Update

func Update(w, patched *wltypes.RDTWorkLoad) error

Update a workload

func Validate

func Validate(w *wltypes.RDTWorkLoad) error

Validate the request workload object is validated.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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