k8s

package
v2.3.11+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// k8s annotations for create pod
	YUNION_CNI_NETWORK_ANNOTATION = "cni.yunion.io/network"
	YUNION_CNI_IPADDR_ANNOTATION  = "cni.yunion.io/ip"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HostStatusPredicate

type HostStatusPredicate struct{}

func (*HostStatusPredicate) Clone

func (p *HostStatusPredicate) Clone() IPredicate

func (*HostStatusPredicate) Execute

func (p *HostStatusPredicate) Execute(pod *v1.Pod, node *v1.Node, host *candidate.HostDesc) (bool, error)

func (*HostStatusPredicate) Name

func (p *HostStatusPredicate) Name() string

func (*HostStatusPredicate) PreExecute

func (p *HostStatusPredicate) PreExecute(pod *v1.Pod, node *v1.Node, host *candidate.HostDesc) bool

type IPredicate

type IPredicate interface {
	Name() string
	Clone() IPredicate
	PreExecute(pod *v1.Pod, node *v1.Node, host *candidate.HostDesc) bool
	Execute(pod *v1.Pod, node *v1.Node, host *candidate.HostDesc) (bool, error)
}

type NetworkPredicate

type NetworkPredicate struct {
	// contains filtered or unexported fields
}

func (*NetworkPredicate) Clone

func (p *NetworkPredicate) Clone() IPredicate

func (*NetworkPredicate) Execute

func (p *NetworkPredicate) Execute(pod *v1.Pod, node *v1.Node, host *candidate.HostDesc) (bool, error)

func (*NetworkPredicate) Name

func (p *NetworkPredicate) Name() string

func (*NetworkPredicate) PreExecute

func (p *NetworkPredicate) PreExecute(pod *v1.Pod, node *v1.Node, host *candidate.HostDesc) bool

type SPredicatesManager

type SPredicatesManager struct {
	// contains filtered or unexported fields
}
var PredicatesManager *SPredicatesManager

func (*SPredicatesManager) DoFilter

func (man *SPredicatesManager) DoFilter(pod *v1.Pod, node *v1.Node, host *candidate.HostDesc) (bool, error)

func (*SPredicatesManager) Has

func (man *SPredicatesManager) Has(newPre IPredicate) bool

func (*SPredicatesManager) Register

func (man *SPredicatesManager) Register(pres ...IPredicate) *SPredicatesManager

Jump to

Keyboard shortcuts

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