- Add `PostInterrupt` plugin, useful for customization of the
**os.Interrupt** singal, before that Iris closed the server
automatically.
```go
iris.Plugins.PostInterrupt(func(s *Framework){
// when os.Interrupt signal is fired the body of this function will be
fired,
// you're responsible for closing the server with s.Close()
// if that event is not registered then the framework
// will close the server for you.
/* Do any custom cleanup and finally call the s.Close()
remember you have the iris.Plugins.PreClose(func(s *Framework)) event
too
so you can split your logic in two logically places.
*/
})
```
full commit from development branch.
Examples, book, middleware, plugins are updated to the latest iris
version. Read HISTORY.md for more.
The 'old' v5 branch which relied on fasthttp exists for those who want
to use it navigate there: https://github.com/kataras/iris/tree/5.0.0
Remote Cache is not inside docs or history because it's not ready for
production yet, however it seems to works fine, but until I test it on
more than 2kk requests I will not add this on history or docs. The
upcoming 24 hours I will upload a relative package which will combine
all cache features to one
just an improvement to the `LETSENCRYPT` in order to meet your needs,
it lets you configure the cache file to any directory or to disable it
by passing "" as the second argument.
**OUTLINE**
```
// ListenLETSENCRYPT starts a server listening at the specific nat
address
// using key & certification taken from the letsencrypt.org 's servers
// it's also starts a second 'http' server to redirect all
'http://$ADDR_HOSTNAME:80' to the' https://$ADDR'
// it creates a cache file to store the certifications, for performance
reasons, this file by-default is "./letsencrypt.cache"
// if you skip the second parameter then the cache file is
"./letsencrypt.cache"
// if you want to disable cache then simple pass as second argument an
empty emtpy string ""
//
// example:
https://github.com/iris-contrib/examples/blob/master/letsencyrpt/main.go
//
// supports localhost domains for testing,
// NOTE: if you are ready for production then use
`$app.Serve(iris.LETSENCRYPTPROD("mydomain.com"))` instead
ListenLETSENCRYPT(addr string, cacheFileOptional ...string)
```
**OVERVIEW**
```
package main
import "github.com/kataras/iris"
func main() {
iris.Get("/", func(ctx *iris.Context) {
ctx.Write("Hello from SECURE SERVER!")
})
iris.ListenLETSENCRYPT("mydomain.com", "./mycachefile.cache)
}
```