Documentation ¶
Overview ¶
Package server implements the replicant server API.
Index ¶
- type Config
- type Handler
- type Params
- type SHandler
- type Server
- func (s *Server) AddHandler(method, path string, handler Handler)
- func (s *Server) AddServerHandler(method, path string, handler SHandler)
- func (s *Server) Close(ctx context.Context) (err error)
- func (s *Server) Manager() (m *manager.Manager)
- func (s *Server) Router() (r *httprouter.Router)
- func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request)
- func (s *Server) Start() (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ListenAddress string `json:"listen_address" yaml:"listen_address"` WriteTimeout time.Duration `json:"write_timeout" yaml:"write_timeout"` ReadTimeout time.Duration `json:"read_timeout" yaml:"read_timeout"` ReadHeaderTimeout time.Duration `json:"read_header_timeout" yaml:"read_header_timeout"` }
Config for replicant server
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is an replicant manager and api server
func (*Server) AddHandler ¶
AddHandler adds a handler for the given method and path
func (*Server) AddServerHandler ¶
AddServerHandler adds a handler for the given method and path
func (*Server) Router ¶
func (s *Server) Router() (r *httprouter.Router)
Router returns this server http router
Click to show internal directories.
Click to hide internal directories.