Documentation ¶
Overview ¶
Package http implements the HTTP transport protocol.
Index ¶
Constants ¶
View Source
const ( DebugMode = "debug" TestMode = "testing" ReleaseMode = "release" )
Variables ¶
View Source
var ProviderSet = wire.NewSet(New, NewOptions, NewRouter)
Functions ¶
Types ¶
type Options ¶
type Options struct { // The hostname of the HTTP server. Host string // The port of the HTTP server. Port int // Read timeout for the HTTP server. ReadTimeout time.Duration // Write timeout for the HTTP server. WriteTimeout time.Duration // Mode of the HTTP server. Includes DebugMode, TestMode, and ReleaseMode. Mode string }
Options for the HTTP server.
func NewOptions ¶
NewOptions creates a new set of o for the HTTP server.
type Server ¶
type Server struct { Name string Version string *Options // contains filtered or unexported fields }
Server is the HTTP server.
func (*Server) GetID ¶
GetID returns the unique identifier of the server. It is useful when a service starts more than one server.
func (*Server) IntranetAddr ¶
func (*Server) Service ¶
func (s *Server) Service() *registry.ServiceInstance
Click to show internal directories.
Click to hide internal directories.