-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Party.Container.SetDependencyMatcher, hero.Container.DependencyMa…
…tcher and hero.Dependency.Match to fullfil the feature request asked at: #1842
- Loading branch information
Showing
9 changed files
with
79 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected] | ||
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, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters