kubernetes/vendor/go.etcd.io/etcd/server/v3/etcdserver/api/v2http/client.go

const authPrefix

const keysPrefix

const machinesPrefix

const membersPrefix

const statsPrefix

// NewClientHandler generates a muxed http.Handler with the given parameters to serve etcd client requests.
func NewClientHandler(lg *zap.Logger, server etcdserver.ServerPeer, timeout time.Duration) http.Handler {}

func handleV2(lg *zap.Logger, mux *http.ServeMux, server etcdserver.ServerV2, timeout time.Duration) {}

type keysHandler

func (h *keysHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {}

type machinesHandler

func (h *machinesHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {}

type membersHandler

func (h *membersHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {}

type statsHandler

func (h *statsHandler) serveStore(w http.ResponseWriter, r *http.Request) {}

func (h *statsHandler) serveSelf(w http.ResponseWriter, r *http.Request) {}

func (h *statsHandler) serveLeader(w http.ResponseWriter, r *http.Request) {}

// parseKeyRequest converts a received http.Request on keysPrefix to
// a server Request, performing validation of supplied fields as appropriate.
// If any validation fails, an empty Request and non-nil error is returned.
func parseKeyRequest(r *http.Request, clock clockwork.Clock) (etcdserverpb.Request, bool, error) {}

// writeKeyEvent trims the prefix of key path in a single Event under
// StoreKeysPrefix, serializes it and writes the resulting JSON to the given
// ResponseWriter, along with the appropriate headers.
func writeKeyEvent(w http.ResponseWriter, resp etcdserver.Response, noValueOnSuccess bool) error {}

func writeKeyNoAuth(w http.ResponseWriter) {}

// writeKeyError logs and writes the given Error to the ResponseWriter.
// If Error is not an etcdErr, the error will be converted to an etcd error.
func writeKeyError(lg *zap.Logger, w http.ResponseWriter, err error) {}

func handleKeyWatch(ctx context.Context, lg *zap.Logger, w http.ResponseWriter, resp etcdserver.Response, stream bool) {}

func trimEventPrefix(ev *v2store.Event, prefix string) *v2store.Event {}

func trimNodeExternPrefix(n *v2store.NodeExtern, prefix string) {}

func trimErrorPrefix(err error, prefix string) error {}

func unmarshalRequest(lg *zap.Logger, r *http.Request, req json.Unmarshaler, w http.ResponseWriter) bool {}

func getID(lg *zap.Logger, p string, w http.ResponseWriter) (types.ID, bool) {}

// getUint64 extracts a uint64 by the given key from a Form. If the key does
// not exist in the form, 0 is returned. If the key exists but the value is
// badly formed, an error is returned. If multiple values are present only the
// first is considered.
func getUint64(form url.Values, key string) (i uint64, err error) {}

// getBool extracts a bool by the given key from a Form. If the key does not
// exist in the form, false is returned. If the key exists but the value is
// badly formed, an error is returned. If multiple values are present only the
// first is considered.
func getBool(form url.Values, key string) (b bool, err error) {}

// trimPrefix removes a given prefix and any slash following the prefix
// e.g.: trimPrefix("foo", "foo") == trimPrefix("foo/", "foo") == ""
func trimPrefix(p, prefix string) (s string) {}

func newMemberCollection(ms []*membership.Member) *httptypes.MemberCollection {}

func newMember(m *membership.Member) httptypes.Member {}