first version of go-sonic, missing lot of stuff
This commit is contained in:
commit
dd927a4ab4
7 changed files with 238 additions and 0 deletions
24
cmd/main/main.go
Normal file
24
cmd/main/main.go
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/expectedsh/go-sonic/sonic"
|
||||
)
|
||||
|
||||
func main() {
|
||||
connection := &sonic.Connection{
|
||||
Host: "localhost",
|
||||
Port: 1491,
|
||||
Password: "SecretPassword",
|
||||
Channel: sonic.Ingest,
|
||||
}
|
||||
|
||||
e := connection.Connect()
|
||||
if e != nil {
|
||||
panic(e)
|
||||
}
|
||||
|
||||
channel := sonic.IngesterChannel{Connection: connection}
|
||||
e = channel.Push("test", "default", "captain", "lol is truth")
|
||||
fmt.Println(e)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue