Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cont ¶
type Cont struct {
// contains filtered or unexported fields
}
Cont keeps your server which implement the Continuous continuously
func (*Cont) AddServer ¶
func (cont *Cont) AddServer(srv Continuous, listenOn *ListenOn, opts ...ServerOption) error
AddServer and a server which implement Continuous interface the added server will start to listen to the socket, but it only accept connections after serving
type ContServer ¶
type ContServer struct {
// contains filtered or unexported fields
}
ContServer combines listener, addresss and a continuous
type Continuous ¶
Continuous is the interface of a basic server
func WrapGRPCServer ¶
func WrapGRPCServer(s *grpc.Server) Continuous
func WrapHTTPServer ¶
func WrapHTTPServer(s *http.Server) Continuous
func WrapHTTPServerTLS ¶
func WrapHTTPServerTLS(s *http.Server, certFile, keyFile string) Continuous
type Option ¶
type Option func(cont *Cont)
Option to new a Cont
func LoggerOutput ¶
LoggerOutput sets a io.Writer to output log
type ServerOption ¶
type ServerOption func(cs *ContServer)
func ListenerUpgrader ¶
func ListenerUpgrader(upgrader func(lis net.Listener) net.Listener) ServerOption
ListenerUpgrader upgrade a raw listener to a higher level listener
func TLSConfig ¶
func TLSConfig(c *tls.Config) ServerOption
Click to show internal directories.
Click to hide internal directories.