kubernetes/vendor/go.etcd.io/etcd/server/v3/embed/serve.go

type serveCtx

type servers

func newServeCtx(lg *zap.Logger) *serveCtx {}

// serve accepts incoming connections on the listener l,
// creating a new service goroutine for each. The service goroutines
// read requests and then call handler to reply to them.
func (sctx *serveCtx) serve(
	s *etcdserver.EtcdServer,
	tlsinfo *transport.TLSInfo,
	handler http.Handler,
	errHandler func(error),
	grpcDialForRestGatewayBackends func(ctx context.Context) (*grpc.ClientConn, error),
	splitHttp bool,
	gopts ...grpc.ServerOption) (err error) {}

func configureHttpServer(srv *http.Server, cfg config.ServerConfig) error {}

// grpcHandlerFunc returns an http.Handler that delegates to grpcServer on incoming gRPC
// connections or otherHandler otherwise. Given in gRPC docs.
func grpcHandlerFunc(grpcServer *grpc.Server, otherHandler http.Handler) http.Handler {}

type registerHandlerFunc

func (sctx *serveCtx) registerGateway(dial func(ctx context.Context) (*grpc.ClientConn, error)) (*gw.ServeMux, error) {}

type wsProxyZapLogger

func (w wsProxyZapLogger) Warnln(i ...interface{}

func (w wsProxyZapLogger) Debugln(i ...interface{}

func (sctx *serveCtx) createMux(gwmux *gw.ServeMux, handler http.Handler) *http.ServeMux {}

// createAccessController wraps HTTP multiplexer:
// - mutate gRPC gateway request paths
// - check hostname whitelist
// client HTTP requests goes here first
func createAccessController(lg *zap.Logger, s *etcdserver.EtcdServer, mux *http.ServeMux) http.Handler {}

type accessController

func (ac *accessController) ServeHTTP(rw http.ResponseWriter, req *http.Request) {}

// addCORSHeader adds the correct cors headers given an origin
func addCORSHeader(w http.ResponseWriter, origin string) {}

// https://github.com/transmission/transmission/pull/468
func errCVE20185702(host string) string {}

// WrapCORS wraps existing handler with CORS.
// TODO: deprecate this after v2 proxy deprecate
func WrapCORS(cors map[string]struct{}

type corsHandler

func (ch *corsHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request) {}

func (sctx *serveCtx) registerUserHandler(s string, h http.Handler) {}

func (sctx *serveCtx) registerPprof() {}

func (sctx *serveCtx) registerTrace() {}