Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddHandlerFunc ¶
AddHandlerFunc provides interface to add customized handlerFunc
Types ¶
type Config ¶
type Config struct {
Enabled bool `config:"enabled"`
Host string `config:"host"`
Port int `config:"port"`
User string `config:"named_pipe.user"`
SecurityDescriptor string `config:"named_pipe.security_descriptor"`
}
Config is the configuration for the API endpoint.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig is the default configuration used by the API endpoint.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server takes cares of correctly starting the HTTP component of the API and will answers all the routes defined in the received ServeMux.
func NewWithDefaultRoutes ¶
NewWithDefaultRoutes creates a new server with default API routes.
func (*Server) AttachHandler ¶
AttachHandler will attach a handler at the specified route and return an error instead of panicing.
func (*Server) AttachPprof ¶
func (s *Server) AttachPprof()
Click to show internal directories.
Click to hide internal directories.