Push the full channel logic into the implementation of the broadcaster

in watch/mux.go rather than being in the client event recording code.
This commit is contained in:
Alex Robinson
2015-01-13 01:40:17 +00:00
parent 702a6f96b4
commit be6b1cf0e2
5 changed files with 64 additions and 59 deletions

View File

@@ -39,7 +39,7 @@ type GenericRegistry struct {
func NewGeneric(list runtime.Object) *GenericRegistry {
return &GenericRegistry{
ObjectList: list,
Broadcaster: watch.NewBroadcaster(0),
Broadcaster: watch.NewBroadcaster(0, watch.WaitIfChannelFull),
}
}

View File

@@ -36,7 +36,7 @@ type PodRegistry struct {
func NewPodRegistry(pods *api.PodList) *PodRegistry {
return &PodRegistry{
Pods: pods,
broadcaster: watch.NewBroadcaster(0),
broadcaster: watch.NewBroadcaster(0, watch.WaitIfChannelFull),
}
}