Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var TDummy = reflect.TypeOf(DummyTool{})
var TGin = reflect.TypeOf(GinTool{})
var TGorm = reflect.TypeOf(GormTool{})
var TLogrus = reflect.TypeOf(LogrusTool{})
var TRedis = reflect.TypeOf(RedisTool{})
Functions ¶
func NewHttpsListener ¶ added in v0.0.4
NewHttpsListener returns a net.Listener that listens on the specified address and returns *tls.Conn connections with LetsEncrypt certificates for the provided domain or domains.
Use of this function implies acceptance of the LetsEncrypt Terms of Service. If domains is not empty, the provided domains are passed to HostWhitelist. If domains is empty, the listener will do LetsEncrypt challenges for any requested domain, which is not recommended.
Certificates are cached in a "golang-autocert" directory under an operating system-specific cache or temp directory. This may not be suitable for servers spanning multiple machines.
The returned listener uses a *tls.Config that enables HTTP/2, and should only be used with servers that support HTTP/2.
The returned Listener also enables TCP keep-alives on the accepted connections. The returned *tls.Conn are returned before their TLS handshake has completed.
Types ¶
type DummyConfig ¶
type DummyConfig struct {
Debug bool
}
type DummyTool ¶
type DummyTool struct {
// contains filtered or unexported fields
}
func (*DummyTool) Dependencies ¶
type GinTool ¶
func (*GinTool) Dependencies ¶
type GormConfig ¶
type GormTool ¶
func (*GormTool) Dependencies ¶
type IBelt ¶
type LogrusConfig ¶
type LogrusTool ¶
func (*LogrusTool) Configure ¶
func (t *LogrusTool) Configure(config ...interface{})
func (*LogrusTool) Dependencies ¶
func (t *LogrusTool) Dependencies() []reflect.Type
func (*LogrusTool) Start ¶
func (t *LogrusTool) Start(belt IBelt)
func (*LogrusTool) Stop ¶
func (t *LogrusTool) Stop(belt IBelt)