func NewFakeControllerSource() *FakeControllerSource {
	return &FakeControllerSource{
		items:       map[nnu]runtime.Object{},
		broadcaster: watch.NewBroadcaster(100, watch.WaitIfChannelFull),
	}
}
Exemple #2
0
func NewPodRegistry(pods *api.PodList) *PodRegistry {
	return &PodRegistry{
		Pods:        pods,
		broadcaster: watch.NewBroadcaster(0, watch.WaitIfChannelFull),
	}
}
Exemple #3
0
func NewGeneric(list runtime.Object) *GenericRegistry {
	return &GenericRegistry{
		ObjectList:  list,
		Broadcaster: watch.NewBroadcaster(0, watch.WaitIfChannelFull),
	}
}
Exemple #4
0
// NewFake makes a new fake MasterElector.
func NewFake() *Fake {
	// 0 means block for clients.
	return &Fake{mux: watch.NewBroadcaster(0, watch.WaitIfChannelFull)}
}
Exemple #5
0
// Creates a new event broadcaster.
func NewBroadcaster() EventBroadcaster {
	return &eventBroadcasterImpl{watch.NewBroadcaster(maxQueuedEvents, watch.DropIfChannelFull)}
}