rest

package
v1.4.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const CtxStartTimestamp = "x-start-timestamp"

Variables

View Source
var (
	DefaultServerMux = http.NewServeMux()
)

Functions

func LoadConfig

func LoadConfig() (srvCfg *rest.ServerConfig, err error)

func NewServer

func NewServer(ipAddr string) (srv *rest.Server, err error)

func RegisterServeMux

func RegisterServeMux(name string)

func RegisterServeMuxHandleFunc

func RegisterServeMuxHandleFunc(name, pattern string, f http.HandlerFunc)

func RegisterServeMuxHandler

func RegisterServeMuxHandler(name, pattern string, h http.Handler)

func RegisterServerHandleFunc

func RegisterServerHandleFunc(pattern string, f http.HandlerFunc)

func RegisterServerHandler

func RegisterServerHandler(pattern string, h http.Handler)

Types

type ServerHandler

type ServerHandler struct {
	Handler http.Handler
}

ServerHandler is a http handler for service-center api

func NewServerHandler

func NewServerHandler(h http.Handler) *ServerHandler

NewServerHandler news a ServerHandler

func (*ServerHandler) ServeHTTP

func (s *ServerHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements http.Handler

Directories

Path Synopsis
v3
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.
v4

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL