Speak the ntfy JSON API directly: subscribe, publish, group topics that share a server and credentials, reconnect with backoff and a since cursor, and list account subscriptions, reservations, and ACL grants.
14 lines
187 B
Go
14 lines
187 B
Go
package ntfy
|
|
|
|
import (
|
|
"bufio"
|
|
"io"
|
|
)
|
|
|
|
func newScanner(r io.Reader) *bufio.Scanner {
|
|
sc := bufio.NewScanner(r)
|
|
buf := make([]byte, 64*1024)
|
|
sc.Buffer(buf, 10*1024*1024)
|
|
return sc
|
|
}
|