Documentation ¶
Overview ¶
Package server provides a basic HTTP server wrapper
Package server provides a basic HTTP server wrapper
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
Group encapsulates managing multiple Server instances
func NewGroup ¶
func NewGroup(ctx context.Context, conf config.ServerConfig) *Group
NewGroup creares a new server group.
func (*Group) GoListenAndServe ¶
GoListenAndServe constructs a NewServer and adds it to the Group. Two goroutines are started. One for the http listener and one to initiate a graceful shutdown. This method blocks on adding the go routines to maintain startup order of each listener.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server has generic functionality for service: it starts the service and performs basic checks
func NewServer ¶
NewServer initializes new service. Configuration is pulled from viper configuration.
func (Server) ListenAndServe ¶
ListenAndServe starts the server