{"modulePath":"github.com/hyperhq/hypernetes","version":"v1.3.2","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```go\nvar SchemeGroupVersion = unversioned.GroupVersion{Group: \"\", Version: runtime.APIVersionInternal}\n```\nSchemeGroupVersion is group version used to register these objects TODO this should be in the \"scheduler\" group\n\n## Types\n\n```go\ntype ExtenderArgs struct {\n\t// Pod being scheduled\n\tPod api.Pod `json:\"pod\"`\n\t// List of candidate nodes where the pod can be scheduled\n\tNodes api.NodeList `json:\"nodes\"`\n}\n```\nExtenderArgs represents the arguments needed by the extender to filter/prioritize nodes for a pod.\n\n```go\ntype ExtenderConfig struct {\n\t// URLPrefix at which the extender is available\n\tURLPrefix string `json:\"urlPrefix\"`\n\t// Verb for the filter call, empty if not supported. This verb is appended to the URLPrefix when issuing the filter call to extender.\n\tFilterVerb string `json:\"filterVerb,omitempty\"`\n\t// Verb for the prioritize call, empty if not supported. This verb is appended to the URLPrefix when issuing the prioritize call to extender.\n\tPrioritizeVerb string `json:\"prioritizeVerb,omitempty\"`\n\t// The numeric multiplier for the node scores that the prioritize call generates.\n\t// The weight should be a positive integer\n\tWeight int `json:\"weight,omitempty\"`\n\t// EnableHttps specifies whether https should be used to communicate with the extender\n\tEnableHttps bool `json:\"enableHttps,omitempty\"`\n\t// TLSConfig specifies the transport layer security config\n\tTLSConfig *restclient.TLSClientConfig `json:\"tlsConfig,omitempty\"`\n\t// HTTPTimeout specifies the timeout duration for a call to the extender. Filter timeout fails the scheduling of the pod. Prioritize\n\t// timeout is ignored, k8s/other extenders priorities are used to select the node.\n\tHTTPTimeout time.Duration `json:\"httpTimeout,omitempty\"`\n}\n```\nHolds the parameters used to communicate with the extender. If a verb is unspecified/empty, it is assumed that the extender chose not to provide that extension.\n\n```go\ntype ExtenderFilterResult struct {\n\t// Filtered set of nodes where the pod can be scheduled\n\tNodes api.NodeList `json:\"nodes,omitempty\"`\n\t// Error message indicating failure\n\tError string `json:\"error,omitempty\"`\n}\n```\nExtenderFilterResult represents the results of a filter call to an extender\n\n```go\ntype HostPriority struct {\n\t// Name of the host\n\tHost string `json:\"host\"`\n\t// Score associated with the host\n\tScore int `json:\"score\"`\n}\n```\nHostPriority represents the priority of scheduling to a particular host, higher priority is better.\n\n```go\ntype HostPriorityList []HostPriority\n```\n\n```go\nfunc (h HostPriorityList) Len() int\n```\n\n```go\nfunc (h HostPriorityList) Less(i, j int) bool\n```\n\n```go\nfunc (h HostPriorityList) Swap(i, j int)\n```\n\n```go\ntype LabelPreference struct {\n\t// Used to identify node \"groups\"\n\tLabel string `json:\"label\"`\n\t// This is a boolean flag\n\t// If true, higher priority is given to nodes that have the label\n\t// If false, higher priority is given to nodes 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 node \"groups\"\n\t// All of the labels should be either present (or absent) for the node 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 node\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\tunversioned.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\t// Holds the information to communicate with the extender(s)\n\tExtenderConfigs []ExtenderConfig `json:\"extenders\"`\n}\n```\n\n```go\nfunc (obj *Policy) GetObjectKind() unversioned.ObjectKind\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 nodes that belong to the same \"group\"\n\tServiceAffinity *ServiceAffinity `json:\"serviceAffinity\"`\n\t// The predicate that checks whether a particular node 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 nodes that belong to the same \"group\"\n\tServiceAntiAffinity *ServiceAntiAffinity `json:\"serviceAntiAffinity\"`\n\t// The priority function that checks whether a particular node 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 node scores that the priority function generates\n\t// The weight should be a positive 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 node \"groups\"\n\t// All of the labels should match for the node 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 node \"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/hyperhq/hypernetes/plugin/pkg/scheduler/api","name":"api","synopsis":"","isRedistributable":true}
