39 lines
847 B
Go
39 lines
847 B
Go
package etc
|
|
|
|
import (
|
|
lib "git.sr.ht/~cco/go-scopes"
|
|
"git.sr.ht/~cco/go-scopes/app"
|
|
"git.sr.ht/~cco/go-scopes/common/testing"
|
|
"git.sr.ht/~cco/go-scopes/config"
|
|
"git.sr.ht/~cco/go-scopes/core"
|
|
"git.sr.ht/~cco/go-scopes/core/action"
|
|
"git.sr.ht/~cco/go-scopes/logging"
|
|
"git.sr.ht/~cco/go-scopes/matrix"
|
|
)
|
|
|
|
func ConfigMx() lib.Config {
|
|
b := config.Base
|
|
|
|
app_c := &app.Cfg{
|
|
BaseCfg: b("matrix", testing.Start),
|
|
Logging: &logging.Cfg{
|
|
Logfile: "log/matrix.log",
|
|
Level: "debug",
|
|
},
|
|
}
|
|
app_c.AddAction("demo", action.Base(action.Forward, "test-receiver"))
|
|
|
|
test_rcvr := b("test-receiver", core.Start).
|
|
AddAction("demo", action.Base(AH_MxReceiver))
|
|
|
|
cell_0 := b("cell-0", matrix.Start)
|
|
|
|
app_c.Add(cell_0, test_rcvr)
|
|
|
|
return app_c
|
|
}
|
|
|
|
// register action handlers from ..._test.go here.
|
|
var (
|
|
AH_MxReceiver lib.ActionHandler
|
|
)
|