Skip to content

Commit

Permalink
socket activation will be reimplemented
Browse files Browse the repository at this point in the history
in a new minor version
  • Loading branch information
hekmon committed Sep 21, 2020
1 parent 17db8fa commit 6ad3ab6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 146 deletions.
27 changes: 0 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,30 +135,3 @@ if watchdog != nil {
}()
}
```

## Socket activation

See: [http://0pointer.de/blog/projects/socket-activation.html](http://0pointer.de/blog/projects/socket-activation.html) for more information.

With the following socket file:

```systemdsocket
[Socket]
ListenStream=9091
BindIPv6Only=both
[Install]
WantedBy=sockets.target
```

Retrieve the socket and serve it.

```go
listener, err := activation.Listen(":9091")
if err != nil {
log.Fatal(err)
}
http.Serve(listener, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello from 9091")
}))
```
119 changes: 0 additions & 119 deletions activation/activation.go

This file was deleted.

0 comments on commit 6ad3ab6

Please sign in to comment.