當前位置: 首頁>>代碼示例>>Golang>>正文


Golang watch.NewBroadcaster函數代碼示例

本文整理匯總了Golang中k8s/io/kubernetes/pkg/watch.NewBroadcaster函數的典型用法代碼示例。如果您正苦於以下問題:Golang NewBroadcaster函數的具體用法?Golang NewBroadcaster怎麽用?Golang NewBroadcaster使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了NewBroadcaster函數的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: NewFakePVCControllerSource

func NewFakePVCControllerSource() *FakePVCControllerSource {
	return &FakePVCControllerSource{
		FakeControllerSource{
			Items:       map[nnu]runtime.Object{},
			Broadcaster: watch.NewBroadcaster(100, watch.WaitIfChannelFull),
		}}
}
開發者ID:CodeJuan,項目名稱:kubernetes,代碼行數:7,代碼來源:fake_controller_source.go

示例2: NewBroadcaster

// Creates a new event broadcaster.
func NewBroadcaster() EventBroadcaster {
	return &eventBroadcasterImpl{watch.NewBroadcaster(maxQueuedEvents, watch.DropIfChannelFull)}
}
開發者ID:liuhewei,項目名稱:kubernetes,代碼行數:4,代碼來源:event.go

示例3: NewBroadcasterForTests

func NewBroadcasterForTests(sleepDuration time.Duration) EventBroadcaster {
	return &eventBroadcasterImpl{watch.NewBroadcaster(maxQueuedEvents, watch.DropIfChannelFull), sleepDuration}
}
開發者ID:RyanBinfeng,項目名稱:kubernetes,代碼行數:3,代碼來源:event.go

示例4: NewBroadcaster

// Creates a new event broadcaster.
func NewBroadcaster() EventBroadcaster {
	return &eventBroadcasterImpl{watch.NewBroadcaster(maxQueuedEvents, watch.DropIfChannelFull), defaultSleepDuration}
}
開發者ID:RyanBinfeng,項目名稱:kubernetes,代碼行數:4,代碼來源:event.go

示例5: NewGeneric

func NewGeneric(list runtime.Object) *GenericRegistry {
	return &GenericRegistry{
		ObjectList:  list,
		Broadcaster: watch.NewBroadcaster(0, watch.WaitIfChannelFull),
	}
}
開發者ID:MarWestermann,項目名稱:gofabric8,代碼行數:6,代碼來源:generic.go

示例6: NewPodRegistry

func NewPodRegistry(pods *api.PodList) *PodRegistry {
	return &PodRegistry{
		Pods:        pods,
		broadcaster: watch.NewBroadcaster(0, watch.WaitIfChannelFull),
	}
}
開發者ID:MarWestermann,項目名稱:gofabric8,代碼行數:6,代碼來源:pod.go

示例7: NewFake

// NewFake makes a new fake MasterElector.
func NewFake() *Fake {
	// 0 means block for clients.
	return &Fake{mux: watch.NewBroadcaster(0, watch.WaitIfChannelFull)}
}
開發者ID:40a,項目名稱:bootkube,代碼行數:5,代碼來源:fake.go


注:本文中的k8s/io/kubernetes/pkg/watch.NewBroadcaster函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。