func NewFakePVCControllerSource() *FakePVCControllerSource {
	return &FakePVCControllerSource{
		FakeControllerSource{
			Items:       map[nnu]runtime.Object{},
			Broadcaster: watch.NewBroadcaster(100, watch.WaitIfChannelFull),
		}}
}
示例#2
0
// Creates a new event broadcaster.
func NewBroadcaster() EventBroadcaster {
	return &eventBroadcasterImpl{watch.NewBroadcaster(maxQueuedEvents, watch.DropIfChannelFull)}
}
示例#3
0
func NewBroadcasterForTests(sleepDuration time.Duration) EventBroadcaster {
	return &eventBroadcasterImpl{watch.NewBroadcaster(maxQueuedEvents, watch.DropIfChannelFull), sleepDuration}
}
示例#4
0
// Creates a new event broadcaster.
func NewBroadcaster() EventBroadcaster {
	return &eventBroadcasterImpl{watch.NewBroadcaster(maxQueuedEvents, watch.DropIfChannelFull), defaultSleepDuration}
}
示例#5
0
func NewGeneric(list runtime.Object) *GenericRegistry {
	return &GenericRegistry{
		ObjectList:  list,
		Broadcaster: watch.NewBroadcaster(0, watch.WaitIfChannelFull),
	}
}
示例#6
0
func NewPodRegistry(pods *api.PodList) *PodRegistry {
	return &PodRegistry{
		Pods:        pods,
		broadcaster: watch.NewBroadcaster(0, watch.WaitIfChannelFull),
	}
}
示例#7
0
文件: fake.go 项目: 40a/bootkube
// NewFake makes a new fake MasterElector.
func NewFake() *Fake {
	// 0 means block for clients.
	return &Fake{mux: watch.NewBroadcaster(0, watch.WaitIfChannelFull)}
}