Skip to content

Commit

Permalink
updated references;
Browse files Browse the repository at this point in the history
  • Loading branch information
t-u-r-b-o-3-0-0-0 committed Apr 18, 2023
1 parent c17ce60 commit ee99ef1
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 26 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# go-sse

[![Go Report Card](https://goreportcard.com/badge/github.com/alexandrevicenzi/go-sse)](https://goreportcard.com/report/github.com/alexandrevicenzi/go-sse)
[![Go Report Card](https://goreportcard.com/badge/github.com/nfwsncked/go-sse)](https://goreportcard.com/report/github.com/nfwsncked/go-sse)
[![Build Status](https://travis-ci.org/alexandrevicenzi/go-sse.svg?branch=master)](https://travis-ci.org/alexandrevicenzi/go-sse)
[![GoDoc](https://godoc.org/github.com/alexandrevicenzi/go-sse?status.svg)](http://godoc.org/github.com/alexandrevicenzi/go-sse)
[![GoDoc](https://godoc.org/github.com/nfwsncked/go-sse?status.svg)](http://godoc.org/github.com/nfwsncked/go-sse)

Server-Sent Events for Go

## Fork reasoning
Some event driven patterns require direct access to the client upon connect/disconnect. Original repo doesn't provide any potential access to these and seems to be not that much maintained. I didn't find any reasonably good implementations across other forks, so why not contributing myself or with your help :)

## About

[Server-sent events](http://www.html5rocks.com/en/tutorials/eventsource/basics/) is a method of continuously sending data from a server to the browser, rather than repeatedly requesting it, replacing the "long polling way".
Expand All @@ -25,7 +28,7 @@ It's [supported](http://caniuse.com/#feat=eventsource) by all major browsers and

## Instalation

`go get github.com/alexandrevicenzi/go-sse`
`go get github.com/nfwsncked/go-sse`

## Example

Expand All @@ -40,7 +43,7 @@ import (
"strconv"
"time"

"github.com/alexandrevicenzi/go-sse"
"github.com/nfwsncked/go-sse"
)

func main() {
Expand Down Expand Up @@ -73,7 +76,7 @@ e.onmessage = function(event) {
};
```

More examples available [here](https://github.com/alexandrevicenzi/go-sse/tree/master/_examples).
More examples available [here](https://github.com/nfwsncked/go-sse/tree/master/_examples).

## License

Expand Down
12 changes: 6 additions & 6 deletions _examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Examples on how to use `go-sse` with multiple libraries and frameworks.

| Project | Supported | Example |
|:--------|:---------:|:-------:|
| [chi](https://github.com/go-chi/chi) || [chi.go](https://github.com/alexandrevicenzi/go-sse/blob/master/_examples/chi.go) |
| [echo](https://github.com/labstack/echo) || [echo.go](https://github.com/alexandrevicenzi/go-sse/blob/master/_examples/echo.go) |
| [chi](https://github.com/go-chi/chi) || [chi.go](https://github.com/nfwsncked/go-sse/blob/master/_examples/chi.go) |
| [echo](https://github.com/labstack/echo) || [echo.go](https://github.com/nfwsncked/go-sse/blob/master/_examples/echo.go) |
| [fasthttp](https://github.com/valyala/fasthttp) || |
| [gin](https://github.com/gin-gonic/gin) || [gin.go](https://github.com/alexandrevicenzi/go-sse/blob/master/_examples/gin.go) |
| [iris](https://github.com/kataras/iris) || [iris/main.go](https://github.com/alexandrevicenzi/go-sse/blob/master/_examples/iris/main.go) |
| [gorilla/mux](https://github.com/gorilla/mux) || [gorilla.go](https://github.com/alexandrevicenzi/go-sse/blob/master/_examples/gorilla.go) |
| `net/http` || [net_http.go](https://github.com/alexandrevicenzi/go-sse/blob/master/_examples/net_http.go) or [net_http_options.go](https://github.com/alexandrevicenzi/go-sse/blob/master/_examples/net_http_options.go) |
| [gin](https://github.com/gin-gonic/gin) || [gin.go](https://github.com/nfwsncked/go-sse/blob/master/_examples/gin.go) |
| [iris](https://github.com/kataras/iris) || [iris/main.go](https://github.com/nfwsncked/go-sse/blob/master/_examples/iris/main.go) |
| [gorilla/mux](https://github.com/gorilla/mux) || [gorilla.go](https://github.com/nfwsncked/go-sse/blob/master/_examples/gorilla.go) |
| `net/http` || [net_http.go](https://github.com/nfwsncked/go-sse/blob/master/_examples/net_http.go) or [net_http_options.go](https://github.com/nfwsncked/go-sse/blob/master/_examples/net_http_options.go) |
2 changes: 1 addition & 1 deletion _examples/chi.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"strconv"
"time"

"github.com/alexandrevicenzi/go-sse"
"github.com/go-chi/chi"
"github.com/go-chi/chi/middleware"
"github.com/nfwsncked/go-sse"
)

func main() {
Expand Down
3 changes: 1 addition & 2 deletions _examples/echo.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import (
"strconv"
"time"

"github.com/alexandrevicenzi/go-sse"
"github.com/labstack/echo/v4"
"github.com/nfwsncked/go-sse"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion _examples/gin.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"strconv"
"time"

"github.com/alexandrevicenzi/go-sse"
"github.com/gin-gonic/gin"
"github.com/nfwsncked/go-sse"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion _examples/gorilla.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"strconv"
"time"

"github.com/alexandrevicenzi/go-sse"
"github.com/gorilla/mux"
"github.com/nfwsncked/go-sse"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion _examples/iris/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ module iris_example
go 1.15

require (
github.com/alexandrevicenzi/go-sse v1.6.0
github.com/nfwsncked/go-sse v1.6.0
github.com/kataras/iris/v12 v12.2.0-alpha2.0.20210127020946-ce25e698f8f8
)
3 changes: 0 additions & 3 deletions _examples/iris/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ import (
"os"
"strconv"
"time"

"github.com/alexandrevicenzi/go-sse"
"github.com/kataras/iris/v12"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion _examples/net_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strconv"
"time"

"github.com/alexandrevicenzi/go-sse"
"github.com/nfwsncked/go-sse"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion _examples/net_http_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strconv"
"time"

"github.com/alexandrevicenzi/go-sse"
"github.com/nfwsncked/go-sse"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
sse:
image: golang:alpine
working_dir: /go/src/github.com/alexandrevicenzi/go-sse
working_dir: /go/src/github.com/nfwsncked/go-sse
command: bash -c "cd _examples && go run net_http.go"
ports:
- "3000:3000"
environment:
- GO111MODULE=on
volumes:
- .:/go/src/github.com/alexandrevicenzi/go-sse
- .:/go/src/github.com/nfwsncked/go-sse
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/alexandrevicenzi/go-sse
module github.com/nfwsncked/go-sse

go 1.11
go 1.20

0 comments on commit ee99ef1

Please sign in to comment.