Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct { Type EventType `json:"type"` ID_ uuid.UUID `json:"id"` Timestamp_ UnixMillisTime `json:"timestamp"` ManifestID_ string `json:"manifestId"` }
func (*Base) ManifestID ¶
type EventType ¶
type EventType string
const EventTypeTranscode EventType = "transcode"
const EventTypeWebhook EventType = "webhook_event"
type MultistreamTargetInfo ¶ added in v0.2.0
type MultistreamWebhookPayload ¶ added in v0.2.0
type MultistreamWebhookPayload struct {
Target MultistreamTargetInfo `json:"target"`
}
type OrchestratorMetadata ¶
type SegmentMetadata ¶
type TranscodeAttemptInfo ¶
type TranscodeAttemptInfo struct { Orchestrator OrchestratorMetadata `json:"orchestrator"` LatencyMs int64 `json:"latencyMs"` Error *string `json:"error"` }
type TranscodeEvent ¶
type TranscodeEvent struct { Base NodeID string `json:"nodeId"` Segment SegmentMetadata `json:"segment"` StartTime UnixMillisTime `json:"startTime"` LatencyMs int64 `json:"latencyMs"` Success bool `json:"success"` Attempts []TranscodeAttemptInfo `json:"attempts"` }
func NewTranscodeEvent ¶
func NewTranscodeEvent(nodeID, mid string, seg SegmentMetadata, startTime time.Time, success bool, attempts []TranscodeAttemptInfo) *TranscodeEvent
type UnixMillisTime ¶ added in v0.2.0
func NewUnixMillisTime ¶ added in v0.2.0
func NewUnixMillisTime(unixMillis int64) UnixMillisTime
func (UnixMillisTime) MarshalJSON ¶ added in v0.2.0
func (u UnixMillisTime) MarshalJSON() ([]byte, error)
func (UnixMillisTime) UnixMillis ¶ added in v0.2.0
func (u UnixMillisTime) UnixMillis() int64
func (*UnixMillisTime) UnmarshalJSON ¶ added in v0.2.0
func (u *UnixMillisTime) UnmarshalJSON(data []byte) error
type WebhookEvent ¶ added in v0.2.0
type WebhookEvent struct { Base Event string `json:"event"` UserID string `json:"userId"` StreamID string `json:"streamId"` SessionID string `json:"sessionId,omitempty"` Payload json.RawMessage `json:"payload,omitempty"` }
func NewWebhookEvent ¶ added in v0.2.0
func NewWebhookEvent(mid, event, userID, streamID, sessionID string, payload interface{}) (*WebhookEvent, error)
Click to show internal directories.
Click to hide internal directories.