Exemple #1
0
// NewPod creates a new pod discovery.
func NewPod(l log.Logger, pods cache.SharedInformer) *Pod {
	return &Pod{
		informer: pods,
		store:    pods.GetStore(),
		logger:   l,
	}
}
Exemple #2
0
// NewEndpoints returns a new endpoints discovery.
func NewEndpoints(l log.Logger, svc, eps, pod cache.SharedInformer) *Endpoints {
	ep := &Endpoints{
		logger:         l,
		endpointsInf:   eps,
		endpointsStore: eps.GetStore(),
		serviceInf:     svc,
		serviceStore:   svc.GetStore(),
		podInf:         pod,
		podStore:       pod.GetStore(),
	}

	return ep
}
Exemple #3
0
// NewNode returns a new node discovery.
func NewNode(l log.Logger, inf cache.SharedInformer) *Node {
	return &Node{logger: l, informer: inf, store: inf.GetStore()}
}
Exemple #4
0
// NewService returns a new service discovery.
func NewService(l log.Logger, inf cache.SharedInformer) *Service {
	return &Service{logger: l, informer: inf, store: inf.GetStore()}
}