mirror of
https://github.com/kataras/iris.git
synced 2025-12-23 21:07:03 +00:00
Update to 4.1.0, New: SSH Remote control, READ HISTORY.md
https://github.com/kataras/iris/blob/master/HISTORY.md
This commit is contained in:
15
iris.go
15
iris.go
@@ -85,7 +85,7 @@ import (
|
||||
|
||||
const (
|
||||
// Version of the iris
|
||||
Version = "4.0.0"
|
||||
Version = "4.1.0"
|
||||
|
||||
banner = ` _____ _
|
||||
|_ _| (_)
|
||||
@@ -102,7 +102,10 @@ var (
|
||||
Logger *logger.Logger
|
||||
Plugins PluginContainer
|
||||
Websocket WebsocketServer
|
||||
Servers *ServerList
|
||||
// Look ssh.go for this field's configuration
|
||||
// example: https://github.com/iris-contrib/examples/blob/master/ssh/main.go
|
||||
SSH *SSHServer
|
||||
Servers *ServerList
|
||||
// Available is a channel type of bool, fired to true when the server is opened and all plugins ran
|
||||
// never fires false, if the .Close called then the channel is re-allocating.
|
||||
// the channel is closed only when .ListenVirtual is used, otherwise it remains open until you close it.
|
||||
@@ -121,6 +124,7 @@ func initDefault() {
|
||||
Logger = Default.Logger
|
||||
Plugins = Default.Plugins
|
||||
Websocket = Default.Websocket
|
||||
SSH = Default.SSH
|
||||
Servers = Default.Servers
|
||||
Available = Default.Available
|
||||
}
|
||||
@@ -180,6 +184,7 @@ type (
|
||||
Logger *logger.Logger
|
||||
Plugins PluginContainer
|
||||
Websocket WebsocketServer
|
||||
SSH *SSHServer
|
||||
Available chan bool
|
||||
// this is setted once when .Tester(t) is called
|
||||
testFramework *httpexpect.Expect
|
||||
@@ -201,6 +206,7 @@ func New(cfg ...config.Iris) *Framework {
|
||||
Config: &c,
|
||||
responses: &responseEngines{},
|
||||
Available: make(chan bool),
|
||||
SSH: &SSHServer{},
|
||||
}
|
||||
{
|
||||
///NOTE: set all with s.Config pointer
|
||||
@@ -283,6 +289,11 @@ func (s *Framework) initialize() {
|
||||
if debugPath := s.Config.ProfilePath; debugPath != "" {
|
||||
s.Handle(MethodGet, debugPath+"/*action", profileMiddleware(debugPath)...)
|
||||
}
|
||||
|
||||
// ssh
|
||||
if s.SSH != nil && s.SSH.Enabled() {
|
||||
s.SSH.bindTo(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Framework) acquireCtx(reqCtx *fasthttp.RequestCtx) *Context {
|
||||
|
||||
Reference in New Issue
Block a user