{"modulePath":"github.com/dockerstack/kubernetes","version":"v0.20.1-0.20150627061651-1c0b765df6da","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package api\n\n## Variables\n\n```go\nvar Scheme = runtime.NewScheme()\n```\nScheme is the default instance of runtime.Scheme to which types in the Kubernetes API are already registered.\n\n## Types\n\n```go\ntype LabelPreference struct {\n\t// Used to identify minion \"groups\"\n\tLabel string `json:\"label\"`\n\t// This is a boolean flag\n\t// If true, higher priority is given to minions that have the label\n\t// If false, higher priority is given to minions that do not have the label\n\tPresence bool `json:\"presence\"`\n}\n```\nHolds the parameters that are used to configure the corresponding priority function\n\n```go\ntype LabelsPresence struct {\n\t// The list of labels that identify minion \"groups\"\n\t// All of the labels should be either present (or absent) for the minion to be considered a fit for hosting the pod\n\tLabels []string `json:\"labels\"`\n\t// The boolean flag that indicates whether the labels should be present or absent from the minion\n\tPresence bool `json:\"presence\"`\n}\n```\nHolds the parameters that are used to configure the corresponding predicate\n\n```go\ntype Policy struct {\n\tapi.TypeMeta `json:\",inline\"`\n\t// Holds the information to configure the fit predicate functions\n\tPredicates []PredicatePolicy `json:\"predicates\"`\n\t// Holds the information to configure the priority functions\n\tPriorities []PriorityPolicy `json:\"priorities\"`\n}\n```\n\n```go\nfunc (*Policy) IsAnAPIObject()\n```\n\n```go\ntype PredicateArgument struct {\n\t// The predicate that provides affinity for pods belonging to a service\n\t// It uses a label to identify minions that belong to the same \"group\"\n\tServiceAffinity *ServiceAffinity `json:\"serviceAffinity\"`\n\t// The predicate that checks whether a particular minion has a certain label\n\t// defined or not, regardless of value\n\tLabelsPresence *LabelsPresence `json:\"labelsPresence\"`\n}\n```\nRepresents the arguments that the different types of predicates take Only one of its members may be specified\n\n```go\ntype PredicatePolicy struct {\n\t// Identifier of the predicate policy\n\t// For a custom predicate, the name can be user-defined\n\t// For the Kubernetes provided predicates, the name is the identifier of the pre-defined predicate\n\tName string `json:\"name\"`\n\t// Holds the parameters to configure the given predicate\n\tArgument *PredicateArgument `json:\"argument\"`\n}\n```\n\n```go\ntype PriorityArgument struct {\n\t// The priority function that ensures a good spread (anti-affinity) for pods belonging to a service\n\t// It uses a label to identify minions that belong to the same \"group\"\n\tServiceAntiAffinity *ServiceAntiAffinity `json:\"serviceAntiAffinity\"`\n\t// The priority function that checks whether a particular minion has a certain label\n\t// defined or not, regardless of value\n\tLabelPreference *LabelPreference `json:\"labelPreference\"`\n}\n```\nRepresents the arguments that the different types of priorities take. Only one of its members may be specified\n\n```go\ntype PriorityPolicy struct {\n\t// Identifier of the priority policy\n\t// For a custom priority, the name can be user-defined\n\t// For the Kubernetes provided priority functions, the name is the identifier of the pre-defined priority function\n\tName string `json:\"name\"`\n\t// The numeric multiplier for the minion scores that the priority function generates\n\t// The weight should be non-zero and can be a positive or a negative integer\n\tWeight int `json:\"weight\"`\n\t// Holds the parameters to configure the given priority function\n\tArgument *PriorityArgument `json:\"argument\"`\n}\n```\n\n```go\ntype ServiceAffinity struct {\n\t// The list of labels that identify minion \"groups\"\n\t// All of the labels should match for the minion to be considered a fit for hosting the pod\n\tLabels []string `json:\"labels\"`\n}\n```\nHolds the parameters that are used to configure the corresponding predicate\n\n```go\ntype ServiceAntiAffinity struct {\n\t// Used to identify minion \"groups\"\n\tLabel string `json:\"label\"`\n}\n```\nHolds the parameters that are used to configure the corresponding priority function\n\n","path":"github.com/dockerstack/kubernetes/plugin/pkg/scheduler/api","name":"api","synopsis":"","isRedistributable":true}
