func RegisterClusterHandlerClient(ctx context.Context, mux *runtime.ServeMux, client etcdserverpb.ClusterClient) error {

	mux.Handle("POST", pattern_Cluster_MemberAdd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
		ctx, cancel := context.WithCancel(req.Context())
		defer cancel()
		if cn, ok := w.(http.CloseNotifier); ok {
			go func(done <-chan struct{}, closed <-chan bool) {
				select {
				case <-done:
				case <-closed:
					cancel()
				}
			}(ctx.Done(), cn.CloseNotify())
		}
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
		rctx, err := runtime.AnnotateContext(ctx, mux, req)
		if err != nil {
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
			return
		}
		resp, md, err := request_Cluster_MemberAdd_0(rctx, inboundMarshaler, client, req, pathParams)
		ctx = runtime.NewServerMetadataContext(ctx, md)
		if err != nil {
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
			return
		}

		forward_Cluster_MemberAdd_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)

	})

	mux.Handle("POST", pattern_Cluster_MemberRemove_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
		ctx, cancel := context.WithCancel(req.Context())
		defer cancel()
		if cn, ok := w.(http.CloseNotifier); ok {
			go func(done <-chan struct{}, closed <-chan bool) {
				select {
				case <-done:
				case <-closed:
					cancel()
				}
			}(ctx.Done(), cn.CloseNotify())
		}
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
		rctx, err := runtime.AnnotateContext(ctx, mux, req)
		if err != nil {
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
			return
		}
		resp, md, err := request_Cluster_MemberRemove_0(rctx, inboundMarshaler, client, req, pathParams)
		ctx = runtime.NewServerMetadataContext(ctx, md)
		if err != nil {
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
			return
		}

		forward_Cluster_MemberRemove_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)

	})

	mux.Handle("POST", pattern_Cluster_MemberUpdate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
		ctx, cancel := context.WithCancel(req.Context())
		defer cancel()
		if cn, ok := w.(http.CloseNotifier); ok {
			go func(done <-chan struct{}, closed <-chan bool) {
				select {
				case <-done:
				case <-closed:
					cancel()
				}
			}(ctx.Done(), cn.CloseNotify())
		}
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
		rctx, err := runtime.AnnotateContext(ctx, mux, req)
		if err != nil {
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
			return
		}
		resp, md, err := request_Cluster_MemberUpdate_0(rctx, inboundMarshaler, client, req, pathParams)
		ctx = runtime.NewServerMetadataContext(ctx, md)
		if err != nil {
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
			return
		}

		forward_Cluster_MemberUpdate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)

	})

	mux.Handle("POST", pattern_Cluster_MemberList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
		ctx, cancel := context.WithCancel(req.Context())
		defer cancel()
		if cn, ok := w.(http.CloseNotifier); ok {
			go func(done <-chan struct{}, closed <-chan bool) {
				select {
				case <-done:
				case <-closed:
					cancel()
				}
			}(ctx.Done(), cn.CloseNotify())
		}
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
		rctx, err := runtime.AnnotateContext(ctx, mux, req)
		if err != nil {
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
			return
		}
		resp, md, err := request_Cluster_MemberList_0(rctx, inboundMarshaler, client, req, pathParams)
		ctx = runtime.NewServerMetadataContext(ctx, md)
		if err != nil {
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
			return
		}

		forward_Cluster_MemberList_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)

	})

	return nil
}
func RegisterClusterHandlerClient(ctx context.Context, mux *runtime.ServeMux, client etcdserverpb.ClusterClient) error {

	mux.Handle("POST", pattern_Cluster_MemberAdd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
		ctx, cancel := context.WithCancel(req.Context())
		defer cancel()
		if cn, ok := w.(http.CloseNotifier); ok {
			go func(done <-chan struct{}, closed <-chan bool) {
				select {
				case <-done:
				case <-closed:
					cancel()
				}
			}(ctx.Done(), cn.CloseNotify())
		}
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
		rctx, err := runtime.AnnotateContext(ctx, mux, req)
		if err != nil {
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
			return
		}
		resp, md, err := request_Cluster_MemberAdd_0(rctx, inboundMarshaler, client, req, pathParams)
		ctx = runtime.NewServerMetadataContext(ctx, md)
		if err != nil {
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
			return
		}

		forward_Cluster_MemberAdd_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)

	})

	mux.Handle("POST", pattern_Cluster_MemberRemove_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
		ctx, cancel := context.WithCancel(req.Context())
		defer cancel()
		if cn, ok := w.(http.CloseNotifier); ok {
			go func(done <-chan struct{}, closed <-chan bool) {
				select {
				case <-done:
				case <-closed:
					cancel()
				}
			}(ctx.Done(), cn.CloseNotify())
		}
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
		rctx, err := runtime.AnnotateContext(ctx, mux, req)
		if err != nil {
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
			return
		}
		resp, md, err := request_Cluster_MemberRemove_0(rctx, inboundMarshaler, client, req, pathParams)
		ctx = runtime.NewServerMetadataContext(ctx, md)
		if err != nil {
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
			return
		}

		forward_Cluster_MemberRemove_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)

	})

	mux.Handle("POST", pattern_Cluster_MemberUpdate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
		ctx, cancel := context.WithCancel(req.Context())
		defer cancel()
		if cn, ok := w.(http.CloseNotifier); ok {
			go func(done <-chan struct{}, closed <-chan bool) {
				select {
				case <-done:
				case <-closed:
					cancel()
				}
			}(ctx.Done(), cn.CloseNotify())
		}
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
		rctx, err := runtime.AnnotateContext(ctx, mux, req)
		if err != nil {
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
			return
		}
		resp, md, err := request_Cluster_MemberUpdate_0(rctx, inboundMarshaler, client, req, pathParams)
		ctx = runtime.NewServerMetadataContext(ctx, md)
		if err != nil {
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
			return
		}

		forward_Cluster_MemberUpdate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)

	})

	mux.Handle("POST", pattern_Cluster_MemberList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
		ctx, cancel := context.WithCancel(req.Context())
		defer cancel()
		if cn, ok := w.(http.CloseNotifier); ok {
			go func(done <-chan struct{}, closed <-chan bool) {
				select {
				case <-done:
				case <-closed:
					cancel()
				}
			}(ctx.Done(), cn.CloseNotify())
		}
		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
		rctx, err := runtime.AnnotateContext(ctx, mux, req)
		if err != nil {
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
			return
		}
		resp, md, err := request_Cluster_MemberList_0(rctx, inboundMarshaler, client, req, pathParams)
		ctx = runtime.NewServerMetadataContext(ctx, md)
		if err != nil {
			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
			return
		}

		forward_Cluster_MemberList_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)

	})

	return nil
}
func RegisterClusterHandlerClient ( ctx context . Context , mux * runtime . ServeMux , client etcdserverpb . ClusterClient ) error { mux . Handle ( " " , pattern_Cluster_MemberAdd_0 , func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) { ctx , cancel := context . WithCancel ( req . Context ( ) ) defer cancel ( ) if cn , ok := w . ( http . CloseNotifier ) ; ok { go func ( done <- chan struct { } , closed <- chan bool ) { select { case <- done : case <- closed : cancel ( ) } } ( ctx . Done ( ) , cn . CloseNotify ( ) ) } inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req ) rctx , err := runtime . AnnotateContext ( ctx , mux , req ) if err != nil { runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err ) return } resp , md , err := request_Cluster_MemberAdd_0 ( rctx , inboundMarshaler , client , req , pathParams ) ctx = runtime . NewServerMetadataContext ( ctx , md ) if err != nil { runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err ) return } forward_Cluster_MemberAdd_0 ( ctx , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... ) } ) mux . Handle ( " " , pattern_Cluster_MemberRemove_0 , func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) { ctx , cancel := context . WithCancel ( req . Context ( ) ) defer cancel ( ) if cn , ok := w . ( http . CloseNotifier ) ; ok { go func ( done <- chan struct { } , closed <- chan bool ) { select { case <- done : case <- closed : cancel ( ) } } ( ctx . Done ( ) , cn . CloseNotify ( ) ) } inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req ) rctx , err := runtime . AnnotateContext ( ctx , mux , req ) if err != nil { runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err ) return } resp , md , err := request_Cluster_MemberRemove_0 ( rctx , inboundMarshaler , client , req , pathParams ) ctx = runtime . NewServerMetadataContext ( ctx , md ) if err != nil { runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err ) return } forward_Cluster_MemberRemove_0 ( ctx , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... ) } ) mux . Handle ( " " , pattern_Cluster_MemberUpdate_0 , func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) { ctx , cancel := context . WithCancel ( req . Context ( ) ) defer cancel ( ) if cn , ok := w . ( http . CloseNotifier ) ; ok { go func ( done <- chan struct { } , closed <- chan bool ) { select { case <- done : case <- closed : cancel ( ) } } ( ctx . Done ( ) , cn . CloseNotify ( ) ) } inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req ) rctx , err := runtime . AnnotateContext ( ctx , mux , req ) if err != nil { runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err ) return } resp , md , err := request_Cluster_MemberUpdate_0 ( rctx , inboundMarshaler , client , req , pathParams ) ctx = runtime . NewServerMetadataContext ( ctx , md ) if err != nil { runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err ) return } forward_Cluster_MemberUpdate_0 ( ctx , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... ) } ) mux . Handle ( " " , pattern_Cluster_MemberList_0 , func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) { ctx , cancel := context . WithCancel ( req . Context ( ) ) defer cancel ( ) if cn , ok := w . ( http . CloseNotifier ) ; ok { go func ( done <- chan struct { } , closed <- chan bool ) { select { case <- done : case <- closed : cancel ( ) } } ( ctx . Done ( ) , cn . CloseNotify ( ) ) } inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req ) rctx , err := runtime . AnnotateContext ( ctx , mux , req ) if err != nil { runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err ) return } resp , md , err := request_Cluster_MemberList_0 ( rctx , inboundMarshaler , client , req , pathParams ) ctx = runtime . NewServerMetadataContext ( ctx , md ) if err != nil { runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err ) return } forward_Cluster_MemberList_0 ( ctx , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... ) } ) return nil }
// RegisterClusterHandler registers the http handlers for service Cluster to "mux".
// The handlers forward requests to the grpc endpoint over the given implementation of "ClusterClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ClusterClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "ClusterClient" to call the correct interceptors.
RegisterClusterHandler registers the http handlers for service Cluster to mux . The handlers forward requests to the grpc endpoint over the given implementation of ClusterClient . Note : the gRPC framework executes interceptors within the gRPC handler . If the passed in ClusterClient doesn t go through the normal gRPC flow ( creating a gRPC client etc . ) then it will be up to the passed in ClusterClient to call the correct interceptors .