Skip to content

KarpelesLab/spotlib

Repository files navigation

GoDoc

spotlib

Spot connection library, allows accessing Spot and sending end to end encrypted messages to other participants.

Usage

c, err := spotlib.New()
if err != nil {
    return err
}
go func() {
    for ev := range c.Events.On("status") {
        if emmiter.Arg[int](ev, 0) == 1 {
            // we are online!
        }
    }
}()
c.SetHandler("endpoint", func(msg *spotproto.Message) ([]byte, error) {
    // handle message
    ...
})

About

client library for spot

Resources

License

Stars

Watchers

Forks

Packages

No packages published