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


Golang config.NewMux函數代碼示例

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


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

示例1: NewEndpointsConfig

// NewEndpointsConfig creates a new EndpointsConfig.
// It immediately runs the created EndpointsConfig.
func NewEndpointsConfig() *EndpointsConfig {
	updates := make(chan struct{})
	store := &endpointsStore{updates: updates, endpoints: make(map[string]map[types.NamespacedName]api.Endpoints)}
	mux := config.NewMux(store)
	bcaster := config.NewBroadcaster()
	go watchForUpdates(bcaster, store, updates)
	return &EndpointsConfig{mux, bcaster, store}
}
開發者ID:vrosnet,項目名稱:kubernetes,代碼行數:10,代碼來源:config.go

示例2: NewServiceConfig

// NewServiceConfig creates a new ServiceConfig.
// It immediately runs the created ServiceConfig.
func NewServiceConfig() *ServiceConfig {
	updates := make(chan struct{})
	store := &serviceStore{updates: updates, services: make(map[string]map[types.NamespacedName]api.Service)}
	mux := config.NewMux(store)
	bcaster := config.NewBroadcaster()
	go watchForUpdates(bcaster, store, updates)
	return &ServiceConfig{mux, bcaster, store}
}
開發者ID:vrosnet,項目名稱:kubernetes,代碼行數:10,代碼來源:config.go

示例3: NewEndpointsConfig

// NewEndpointsConfig creates a new EndpointsConfig.
// It immediately runs the created EndpointsConfig.
func NewEndpointsConfig() *EndpointsConfig {
	updates := make(chan struct{})
	store := &endpointsStore{updates: updates, endpoints: make(map[string]map[string]api.Endpoints)}
	mux := config.NewMux(store)
	watcher := config.NewWatcher()
	go watchForUpdates(watcher, store, updates)
	return &EndpointsConfig{mux, watcher, store}
}
開發者ID:ericcapricorn,項目名稱:kubernetes,代碼行數:10,代碼來源:config.go

示例4: NewServiceConfig

// NewServiceConfig creates a new ServiceConfig.
// It immediately runs the created ServiceConfig.
func NewServiceConfig() *ServiceConfig {
	updates := make(chan struct{})
	store := &serviceStore{updates: updates, services: make(map[string]map[string]api.Service)}
	mux := config.NewMux(store)
	watcher := config.NewWatcher()
	go watchForUpdates(watcher, store, updates)
	return &ServiceConfig{mux, watcher, store}
}
開發者ID:ericcapricorn,項目名稱:kubernetes,代碼行數:10,代碼來源:config.go

示例5: NewPodConfig

// NewPodConfig creates an object that can merge many configuration sources into a stream
// of normalized updates to a pod configuration.
func NewPodConfig(mode PodConfigNotificationMode) *PodConfig {
	updates := make(chan kubelet.PodUpdate, 1)
	storage := newPodStorage(updates, mode)
	podConfig := &PodConfig{
		pods:    storage,
		mux:     config.NewMux(storage),
		updates: updates,
	}
	return podConfig
}
開發者ID:hortonworks,項目名稱:kubernetes-yarn,代碼行數:12,代碼來源:config.go

示例6: NewPodConfig

// NewPodConfig creates an object that can merge many configuration sources into a stream
// of normalized updates to a pod configuration.
func NewPodConfig(mode PodConfigNotificationMode, recorder record.EventRecorder) *PodConfig {
	updates := make(chan kubelet.PodUpdate, 50)
	storage := newPodStorage(updates, mode, recorder)
	podConfig := &PodConfig{
		pods:    storage,
		mux:     config.NewMux(storage),
		updates: updates,
		sources: util.StringSet{},
	}
	return podConfig
}
開發者ID:chenzhen411,項目名稱:kubernetes,代碼行數:13,代碼來源:config.go


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