policy

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

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

Get is handler to for GET

func Register

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

Register handlers

Types

type CPUArchitecture

type CPUArchitecture map[string]Policy

CPUArchitecture represents cpu model example:

broadwell:
   gold:
       Cache:
            Min: 1
            Max: 1
       Pstate:
            Ratio: 0.1

type Module

type Module map[string]Param

Module represents attributes for single module example:

Cache:
     Min: 1
     Max: 1

func GetDefaultPolicy

func GetDefaultPolicy(policyName string) (Module, error)

GetDefaultPolicy returns default policy

type Param

type Param map[string]interface{}

Param represents single policy attribute example: "MaxCache: 4"

type Policy

type Policy map[string]Module

Policy represents policy type example:

gold:
    Cache:
         Min: 1
         Max: 1
    Pstate:
         Ratio: 0.1

func GetDefaultPlatformPolicy

func GetDefaultPlatformPolicy() (Policy, error)

GetDefaultPlatformPolicy gets policy for default platform

func LoadPolicyInfo

func LoadPolicyInfo() (Policy, error)

LoadPolicyInfo returns policy for cpu on current machine (example: broadwell)

Jump to

Keyboard shortcuts

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