26 lines
1.1 KiB
Go
26 lines
1.1 KiB
Go
|
package events
|
||
|
|
||
|
type Handler interface {
|
||
|
// Handle receives events from the eventsub transports.
|
||
|
//
|
||
|
// NOTE: When using webooks as the eventsub transport you should make sure
|
||
|
// that you handle the message in a background goroutine and return as soon
|
||
|
// as possible. If you don't, you may receive duplicate messages as twitch
|
||
|
// will consider the processing failed after one or two seconds. If you fail
|
||
|
// to respond quickly enough too many times, the subscription may be revoked
|
||
|
// and you will have to resubscribe to the eventsub events.
|
||
|
Handle(event any) error
|
||
|
}
|
||
|
|
||
|
type RevocationHandler interface {
|
||
|
// Handle is called when an eventsub subscription is revoked.
|
||
|
//
|
||
|
// NOTE: When using webooks as the eventsub transport you should make sure
|
||
|
// that you handle the message in a background goroutine and return as soon
|
||
|
// as possible. If you don't, you may receive duplicate messages as twitch
|
||
|
// will consider the processing failed after one or two seconds. If you fail
|
||
|
// to respond quickly enough too many times, the subscription may be revoked
|
||
|
// and you will have to resubscribe to the eventsub events.
|
||
|
Handle() error
|
||
|
}
|