From 5081ebb4340eb354e77931127ae0714e2063c08a Mon Sep 17 00:00:00 2001 From: Cong Ding Date: Fri, 22 Jun 2018 16:39:13 -0700 Subject: [PATCH] cleanup: remove deadcode Kubernetes-commit: 3bacb04a5f9805bb83e016e341a49d0f13a43598 --- pkg/endpoints/installer.go | 7 ------- pkg/storage/etcd/etcd_watcher.go | 4 ---- pkg/storage/etcd3/store.go | 5 ----- 3 files changed, 16 deletions(-) diff --git a/pkg/endpoints/installer.go b/pkg/endpoints/installer.go index 1b52a5bd0..155e39d7f 100644 --- a/pkg/endpoints/installer.go +++ b/pkg/endpoints/installer.go @@ -862,13 +862,6 @@ func appendIf(actions []action, a action, shouldAppend bool) []action { return actions } -// Wraps a http.Handler function inside a restful.RouteFunction -func routeFunction(handler http.Handler) restful.RouteFunction { - return func(restReq *restful.Request, restResp *restful.Response) { - handler.ServeHTTP(restResp.ResponseWriter, restReq.Request) - } -} - func addParams(route *restful.RouteBuilder, params []*restful.Parameter) { for _, param := range params { route.Param(param) diff --git a/pkg/storage/etcd/etcd_watcher.go b/pkg/storage/etcd/etcd_watcher.go index 21ffc42e5..d3a2e3c53 100644 --- a/pkg/storage/etcd/etcd_watcher.go +++ b/pkg/storage/etcd/etcd_watcher.go @@ -22,7 +22,6 @@ import ( "net/http" "reflect" "sync" - "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -100,9 +99,6 @@ type etcdWatcher struct { cache etcdCache } -// watchWaitDuration is the amount of time to wait for an error from watch. -const watchWaitDuration = 100 * time.Millisecond - // newEtcdWatcher returns a new etcdWatcher; if list is true, watch sub-nodes. // The versioner must be able to handle the objects that transform creates. func newEtcdWatcher(list bool, quorum bool, include includeFunc, pred storage.SelectionPredicate, diff --git a/pkg/storage/etcd3/store.go b/pkg/storage/etcd3/store.go index 23af47b62..6385ea973 100644 --- a/pkg/storage/etcd3/store.go +++ b/pkg/storage/etcd3/store.go @@ -73,11 +73,6 @@ type store struct { leaseManager *leaseManager } -type elemForDecode struct { - data []byte - rev uint64 -} - type objState struct { obj runtime.Object meta *storage.ResponseMeta