MCPcopy Create free account
hub / github.com/kataras/iris / TLS

Function TLS

iris.go:934–940  ·  view source on GitHub ↗

TLS can be used as an argument for the `Run` method. It will start the Application's secure server. Use it like you used to use the http.ListenAndServeTLS function. Addr should have the form of [host]:port, i.e localhost:443 or :443. "certFileOrContents" & "keyFileOrContents" should be filenames w

(addr string, certFileOrContents, keyFileOrContents string, hostConfigs ...host.Configurator)

Source from the content-addressed store, hash-verified

932//
933// See `Run` for more.
934func TLS(addr string, certFileOrContents, keyFileOrContents string, hostConfigs ...host.Configurator) Runner {
935 return func(app *Application) error {
936 return app.NewHost(&http.Server{Addr: addr}).
937 Configure(hostConfigs...).
938 ListenAndServeTLS(certFileOrContents, keyFileOrContents)
939 }
940}
941
942// AutoTLS can be used as an argument for the `Run` method.
943// It will start the Application's secure server using

Callers

nothing calls this directly

Calls 3

ListenAndServeTLSMethod · 0.80
NewHostMethod · 0.80
ConfigureMethod · 0.65

Tested by

no test coverage detected