Documentation ¶
Index ¶
Constants ¶
View Source
const ( EventRoomStarted = "room_started" EventRoomFinished = "room_finished" EventParticipantJoined = "participant_joined" EventParticipantLeft = "participant_left" EventTrackPublished = "track_published" EventTrackUnpublished = "track_unpublished" EventEgressStarted = "egress_started" EventEgressUpdated = "egress_updated" EventEgressEnded = "egress_ended" EventIngressStarted = "ingress_started" EventIngressEnded = "ingress_ended" )
Variables ¶
Functions ¶
func Receive ¶
Receive reads and verifies incoming webhook is signed with key/secret pair closes body after reading
func ReceiveWebhookEvent ¶ added in v0.13.0
func ReceiveWebhookEvent(r *http.Request, provider auth.KeyProvider) (*livekit.WebhookEvent, error)
ReceiveWebhookEvent reads and verifies incoming webhook, and returns a parsed WebhookEvent
Types ¶
type DefaultNotifier ¶ added in v1.5.4
type DefaultNotifier struct {
// contains filtered or unexported fields
}
func (*DefaultNotifier) QueueNotify ¶ added in v1.5.4
func (n *DefaultNotifier) QueueNotify(_ context.Context, event *livekit.WebhookEvent) error
func (*DefaultNotifier) Stop ¶ added in v1.5.4
func (n *DefaultNotifier) Stop(force bool)
type QueuedNotifier ¶ added in v1.5.4
type QueuedNotifier interface {
QueueNotify(ctx context.Context, event *livekit.WebhookEvent) error
}
func NewDefaultNotifier ¶ added in v1.5.4
func NewDefaultNotifier(apiKey, apiSecret string, urls []string) QueuedNotifier
type URLNotifier ¶ added in v1.5.4
type URLNotifier struct {
// contains filtered or unexported fields
}
URLNotifier is a QueuedNotifier that sends a POST request to a Webhook URL. It will retry on failure, and will drop events if notification fall too far behind
func NewURLNotifier ¶ added in v1.5.4
func NewURLNotifier(params URLNotifierParams) *URLNotifier
func (*URLNotifier) QueueNotify ¶ added in v1.5.4
func (n *URLNotifier) QueueNotify(event *livekit.WebhookEvent) error
func (*URLNotifier) SetKeys ¶ added in v1.5.4
func (n *URLNotifier) SetKeys(apiKey, apiSecret string)
func (*URLNotifier) Stop ¶ added in v1.5.4
func (n *URLNotifier) Stop(force bool)
Click to show internal directories.
Click to hide internal directories.