policy

package
v0.0.0-...-8365721 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultPolicy

func GetDefaultPolicy(policy string) (map[string]string, error)

GetDefaultPolicy return a map of the default policy of the host

func GetPolicy

func GetPolicy(cpu, policy string) (map[string]string, error)

GetPolicy return a map of the policy of the host

Types

type Attr

type Attr map[string]string

Attr is Policy attribute

type CATConfig

type CATConfig struct {
	Catpolicy map[string][]Policy `yaml:"catpolicy"`
}

CATConfig represents for all policy config

func LoadPolicy

func LoadPolicy() (*CATConfig, error)

LoadPolicy loads pre-defined polies from configure file

type Policy

type Policy map[string][]Attr

Policy is the pre-defiend policies

func GetDefaultPlatformPolicy

func GetDefaultPlatformPolicy() ([]Policy, error)

GetDefaultPlatformPolicy is wrapper for GetPlatformPolicy

func GetPlatformPolicy

func GetPlatformPolicy(cpu string) ([]Policy, error)

GetPlatformPolicy returns specified platform policies

Jump to

Keyboard shortcuts

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