Documentation ¶
Overview ¶
Package connectgo implements utilities for building and serving neutral-diet services.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConnectWrapper ¶
NewConnectWrapper creates a service.ConnectWrapper instance
func RegisterConnectGoServer ¶
func RegisterConnectGoServer(in RegisterConnectGoServerInput)
RegisterConnectGoServer registers the handlers for the connect-go server.
Types ¶
type Config ¶
type Config struct {
ConnectConfig *ConnectConfig `env:",prefix=GRPC_CONNECT_"`
}
Config represents the configuration settings for the connect-go server.
type ConnectConfig ¶
type ConnectConfig struct { Port int `env:"PORT,default=8080"` ShutdownTimeout time.Duration `env:"TIMEOUT,default=3s"` }
ConnectConfig represents the connection settings for the connect-go server.
type RegisterConnectGoServerInput ¶
type RegisterConnectGoServerInput struct { Logger *zerolog.Logger ConnectSvc *service.ConnectWrapper Mux *http.ServeMux `name:"connectGoMux"` AuthClient *auth.Client }
RegisterConnectGoServerInput represents the input to the RegisterConnectGoServer function.
type Server ¶
type Server struct { Server *http.Server Mux *http.ServeMux ShutdownTimeout time.Duration // contains filtered or unexported fields }
A Server represents a HTTP server with a shutdown timer.
func NewConnectGoServer ¶
NewConnectGoServer starts and returns server. Adds HTTP logger handlers to Mux.
Click to show internal directories.
Click to hide internal directories.