Add support for session restore on the linux portals backend, fixing #77
This commit is contained in:
parent
7a806f7b00
commit
c6c54c77a7
8 changed files with 70 additions and 13 deletions
|
|
@ -55,14 +55,14 @@ const (
|
|||
|
||||
type ControllerInfo struct {
|
||||
Name string
|
||||
Init func() (Controller, error)
|
||||
Init func(bool) (Controller, error)
|
||||
|
||||
priority int
|
||||
}
|
||||
|
||||
var Controllers []ControllerInfo
|
||||
|
||||
func RegisterController(name string, init func() (Controller, error), priority int) {
|
||||
func RegisterController(name string, init func(bool) (Controller, error), priority int) {
|
||||
Controllers = append(Controllers, ControllerInfo{name, init, priority})
|
||||
sort.SliceStable(Controllers, func(i, j int) bool {
|
||||
return Controllers[i].priority < Controllers[j].priority
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue