1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-23 04:47:02 +00:00

Add Party.Container.SetDependencyMatcher, hero.Container.DependencyMatcher and hero.Dependency.Match to fullfil the feature request asked at: #1842

This commit is contained in:
Gerasimos (Makis) Maropoulos
2022-03-01 21:26:02 +02:00
parent 5ce8475f35
commit 61872a1612
9 changed files with 79 additions and 30 deletions

View File

@@ -4,11 +4,11 @@ import (
"time"
"github.com/kataras/iris/v12"
"github.com/r3labs/sse"
"github.com/r3labs/sse/v2"
)
// First of all install the sse third-party package (you can use other if you don't like this approach or go ahead to the "sse" example)
// $ go get -u github.com/r3labs/sse
// $ go get github.com/r3labs/sse/v2@v2.7.4
func main() {
app := iris.New()
s := sse.New()
@@ -22,7 +22,7 @@ func main() {
*/
s.CreateStream("messages")
app.Any("/events", iris.FromStd(s.HTTPHandler))
app.Any("/events", iris.FromStd(s))
go func() {
// You design when to send messages to the client,