kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/watch_test.go

type watchJSON

// roundTripOrDie round trips an object to get defaults set.
func roundTripOrDie(codec runtime.Codec, object runtime.Object) runtime.Object {}

var watchTestTable

func podWatchTestTable() []struct {}

func TestWatchWebsocket(t *testing.T) {}

func TestWatchWebsocketClientClose(t *testing.T) {}

func TestWatchClientClose(t *testing.T) {}

func TestWatchRead(t *testing.T) {}

func TestWatchHTTPAccept(t *testing.T) {}

func TestWatchParamParsing(t *testing.T) {}

func TestWatchProtocolSelection(t *testing.T) {}

type fakeTimeoutFactory

func (t *fakeTimeoutFactory) TimeoutCh() (<-chan time.Time, func() bool) {}

// serveWatch will serve a watch response according to the watcher and watchServer.
// Before watchServer.HandleHTTP, an error may occur like k8s.io/apiserver/pkg/endpoints/handlers/watch.go#serveWatch does.
func serveWatch(watcher watch.Interface, watchServer *handlers.WatchServer, preServeErr error) http.HandlerFunc {}

func TestWatchHTTPErrors(t *testing.T) {}

func TestWatchHTTPErrorsBeforeServe(t *testing.T) {}

func TestWatchHTTPDynamicClientErrors(t *testing.T) {}

func TestWatchHTTPTimeout(t *testing.T) {}

// BenchmarkWatchHTTP measures the cost of serving a watch.
func BenchmarkWatchHTTP(b *testing.B) {}

func BenchmarkWatchHTTP_UTF8(b *testing.B) {}

func toObjectSlice(in []example.Pod) []runtime.Object {}

func runWatchHTTPBenchmark(b *testing.B, items []runtime.Object, contentType string) {}

// BenchmarkWatchWebsocket measures the cost of serving a watch.
func BenchmarkWatchWebsocket(b *testing.B) {}

// BenchmarkWatchProtobuf measures the cost of serving a watch.
func BenchmarkWatchProtobuf(b *testing.B) {}

type fakeCachingObject

func (f *fakeCachingObject) CacheEncode(_ runtime.Identifier, encode func(runtime.Object, io.Writer) error, w io.Writer) error {}

func (f *fakeCachingObject) GetObject() runtime.Object {}

func (f *fakeCachingObject) GetObjectKind() schema.ObjectKind {}

func (f *fakeCachingObject) DeepCopyObject() runtime.Object {}

var _

var _

func wrapCachingObject(in []example.Pod) []runtime.Object {}

func BenchmarkWatchCachingObjectJSON(b *testing.B) {}

func BenchmarkWatchCachingObjectProtobuf(b *testing.B) {}