unsubscribe()
Unsubscribe to realtime changes in your service.
- Javascript
- Go
const key = await kontenbase.realtime.subscribe(
'posts',
{ event: '*' },
(message) => {
if (message.error) {
console.log(message.error)
return
}
console.log(message.event, message.payload)
}
)
kontenbase.realtime.unsubscribe(key)
err := client.Realtime.Unsubsribe(key)
if err != nil {
return err
}