Documentation ¶
Index ¶
- func BuildCentralVODServer(parentCtxt context.Context, httpCfg common.APIServerConfig, ...) (*http.Server, error)
- func BuildEdgeAPIServer(parentCtxt context.Context, sourceCfg common.VideoSourceConfig, ...) (*http.Server, error)
- func BuildMetricsCollectionServer(httpCfg common.HTTPServerConfig, metricsCollector goutils.MetricsCollector, ...) (*http.Server, error)
- func BuildSystemManagementServer(httpCfg common.APIServerConfig, manager control.SystemManager, ...) (*http.Server, error)
- type EdgeAPIHandler
- type EdgeNodeLivenessHandler
- type NewVideoSourceRequest
- type PlaylistForwardCB
- type PlaylistReceiveHandler
- type RecordingSegmentListResponse
- type RecordingSessionListResponse
- type RecordingSessionResponse
- type RequestResponseClient
- type SegmentReceiveHandler
- type StartNewRecordingRequest
- type SystemManagerHandler
- func (h SystemManagerHandler) ChangeSourceStreamingState(w http.ResponseWriter, r *http.Request)
- func (h SystemManagerHandler) ChangeSourceStreamingStateHandler() http.HandlerFunc
- func (h SystemManagerHandler) DefineNewVideoSource(w http.ResponseWriter, r *http.Request)
- func (h SystemManagerHandler) DefineNewVideoSourceHandler() http.HandlerFunc
- func (h SystemManagerHandler) DeleteRecording(w http.ResponseWriter, r *http.Request)
- func (h SystemManagerHandler) DeleteRecordingHandler() http.HandlerFunc
- func (h SystemManagerHandler) DeleteVideoSource(w http.ResponseWriter, r *http.Request)
- func (h SystemManagerHandler) DeleteVideoSourceHandler() http.HandlerFunc
- func (h SystemManagerHandler) GetRecording(w http.ResponseWriter, r *http.Request)
- func (h SystemManagerHandler) GetRecordingHandler() http.HandlerFunc
- func (h SystemManagerHandler) GetVideoSource(w http.ResponseWriter, r *http.Request)
- func (h SystemManagerHandler) GetVideoSourceHandler() http.HandlerFunc
- func (h SystemManagerHandler) ListRecordings(w http.ResponseWriter, r *http.Request)
- func (h SystemManagerHandler) ListRecordingsHandler() http.HandlerFunc
- func (h SystemManagerHandler) ListRecordingsOfSource(w http.ResponseWriter, r *http.Request)
- func (h SystemManagerHandler) ListRecordingsOfSourceHandler() http.HandlerFunc
- func (h SystemManagerHandler) ListSegmentsOfRecording(w http.ResponseWriter, r *http.Request)
- func (h SystemManagerHandler) ListSegmentsOfRecordingHandler() http.HandlerFunc
- func (h SystemManagerHandler) ListVideoSources(w http.ResponseWriter, r *http.Request)
- func (h SystemManagerHandler) ListVideoSourcesHandler() http.HandlerFunc
- func (h SystemManagerHandler) StartNewRecording(w http.ResponseWriter, r *http.Request)
- func (h SystemManagerHandler) StartNewRecordingHandler() http.HandlerFunc
- func (h SystemManagerHandler) StopRecording(w http.ResponseWriter, r *http.Request)
- func (h SystemManagerHandler) StopRecordingHandler() http.HandlerFunc
- func (h SystemManagerHandler) UpdateVideoSourceName(w http.ResponseWriter, r *http.Request)
- func (h SystemManagerHandler) UpdateVideoSourceNameHandler() http.HandlerFunc
- type SystemManagerLivenessHandler
- func (h SystemManagerLivenessHandler) Alive(w http.ResponseWriter, r *http.Request)
- func (h SystemManagerLivenessHandler) AliveHandler() http.HandlerFunc
- func (h SystemManagerLivenessHandler) Ready(w http.ResponseWriter, r *http.Request)
- func (h SystemManagerLivenessHandler) ReadyHandler() http.HandlerFunc
- type VODHandler
- type VideoSegmentForwardCB
- type VideoSourceInfoListResponse
- type VideoSourceInfoResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildCentralVODServer ¶
func BuildCentralVODServer( parentCtxt context.Context, httpCfg common.APIServerConfig, forwardCB VideoSegmentForwardCB, dbConns db.ConnectionManager, manager vod.PlaylistManager, metrics goutils.HTTPRequestMetricHelper, ) (*http.Server, error)
BuildCentralVODServer create control node VOD server. It is responsible for * segment receive for video stream proxy * VOD server
@param parentCtxt context.Context - REST handler parent context @param httpCfg common.APIServerConfig - HTTP server configuration @param forwardCB VideoSegmentForwardCB - callback to forward newly received segments @param dbConns db.ConnectionManager - DB connection manager @param manager vod.PlaylistManager - video playlist manager @param metrics goutils.HTTPRequestMetricHelper - metric collection agent @returns HTTP server instance
func BuildEdgeAPIServer ¶ added in v0.2.0
func BuildEdgeAPIServer( parentCtxt context.Context, sourceCfg common.VideoSourceConfig, defaultSegmentURIPrefix *string, dbConns db.ConnectionManager, sourceManager edge.VideoSourceOperator, httpCfg common.APIServerConfig, forwardCB PlaylistForwardCB, playlistManager vod.PlaylistManager, metrics goutils.HTTPRequestMetricHelper, ) (*http.Server, error)
BuildEdgeAPIServer create edge node API server
@param parentCtxt context.Context - REST handler parent context @param self common.VideoSourceConfig - video source entity parameter @param defaultSegmentURIPrefix *string - if video segment URI prefix is not provided when submitting a new playlist, use this default prefix instead. @param dbConns db.ConnectionManager - DB connection manager @param sourceManager edge.VideoSourceOperator - video source manager @param httpCfg common.APIServerConfig - HTTP server configuration @param forwardCB PlaylistForwardCB - callback to forward newly received playlists @param playlistManager vod.PlaylistManager - video playlist manager @param metrics goutils.HTTPRequestMetricHelper - metric collection agent @returns HTTP server instance
func BuildMetricsCollectionServer ¶
func BuildMetricsCollectionServer( httpCfg common.HTTPServerConfig, metricsCollector goutils.MetricsCollector, collectionEndpoint string, maxRESTRequests int, ) (*http.Server, error)
BuildMetricsCollectionServer create server to host metrics collection endpoint
@param httpCfg common.HTTPServerConfig - HTTP server configuration @param metricsCollector goutils.MetricsCollector - metrics collector @param collectionEndpoint string - endpoint to expose the metrics on @param maxRESTRequests int - max number fo parallel requests to support @returns HTTP server instance
func BuildSystemManagementServer ¶
func BuildSystemManagementServer( httpCfg common.APIServerConfig, manager control.SystemManager, metrics goutils.HTTPRequestMetricHelper, ) (*http.Server, error)
BuildSystemManagementServer create system management API server
@param httpCfg common.APIServerConfig - HTTP server configuration @param manager control.SystemManager - core system manager @param metrics goutils.HTTPRequestMetricHelper - metric collection agent @returns HTTP server instance
Types ¶
type EdgeAPIHandler ¶ added in v0.2.0
type EdgeAPIHandler struct { goutils.RestAPIHandler // contains filtered or unexported fields }
EdgeAPIHandler REST API interface for basic information retrieval from the edge node
func NewEdgeAPIHandler ¶ added in v0.2.0
func NewEdgeAPIHandler( dbConns db.ConnectionManager, logConfig common.HTTPRequestLogging, metrics goutils.HTTPRequestMetricHelper, ) (EdgeAPIHandler, error)
NewEdgeAPIHandler define a new edge API handler
@param dbConns db.ConnectionManager - DB connection manager @param logConfig common.HTTPRequestLogging - handler log settings @param metrics goutils.HTTPRequestMetricHelper - metric collection agent @returns new EdgeAPIHandler
func (EdgeAPIHandler) ListVideoSources ¶ added in v0.2.0
func (h EdgeAPIHandler) ListVideoSources(w http.ResponseWriter, r *http.Request)
ListVideoSources godoc @Summary List known video sources @Description Fetch list of known video sources on this edge @tags management,edge @Produce json @Param X-Request-ID header string false "Request ID" @Success 200 {object} VideoSourceInfoListResponse "success" @Failure 400 {object} goutils.RestAPIBaseResponse "error" @Failure 403 {object} goutils.RestAPIBaseResponse "error" @Failure 404 {string} string "error" @Failure 500 {object} goutils.RestAPIBaseResponse "error" @Router /v1/source [get]
func (EdgeAPIHandler) ListVideoSourcesHandler ¶ added in v0.2.0
func (h EdgeAPIHandler) ListVideoSourcesHandler() http.HandlerFunc
ListVideoSourcesHandler Wrapper around ListVideoSources
type EdgeNodeLivenessHandler ¶
type EdgeNodeLivenessHandler struct { goutils.RestAPIHandler // contains filtered or unexported fields }
EdgeNodeLivenessHandler liveness REST API interface for edge node
func NewEdgeNodeLivenessHandler ¶
func NewEdgeNodeLivenessHandler( self common.VideoSourceConfig, dbConns db.ConnectionManager, manager edge.VideoSourceOperator, logConfig common.HTTPRequestLogging, ) (EdgeNodeLivenessHandler, error)
NewEdgeNodeLivenessHandler define a new edge node liveness REST API handler
@param self common.VideoSourceConfig - video source entity parameter @param dbConns db.ConnectionManager - DB connection manager @param manager edge.VideoSourceOperator - video source manager @param logConfig common.HTTPRequestLogging - handler log settings @return new EdgeNodeLivenessHandler
func (EdgeNodeLivenessHandler) Alive ¶
func (h EdgeNodeLivenessHandler) Alive(w http.ResponseWriter, r *http.Request)
Alive godoc @Summary Edge Node liveness check @Description Will return success to indicate Edge Node is live @tags util,management,edge @Produce json @Param X-Request-ID header string false "Request ID" @Success 200 {object} goutils.RestAPIBaseResponse "success" @Failure 400 {object} goutils.RestAPIBaseResponse "error" @Failure 404 {string} string "error" @Failure 500 {object} goutils.RestAPIBaseResponse "error" @Router /v1/alive [get]
func (EdgeNodeLivenessHandler) AliveHandler ¶
func (h EdgeNodeLivenessHandler) AliveHandler() http.HandlerFunc
AliveHandler Wrapper around Alive
func (EdgeNodeLivenessHandler) Ready ¶
func (h EdgeNodeLivenessHandler) Ready(w http.ResponseWriter, r *http.Request)
Ready godoc @Summary Edge Node readiness check @Description Will return success to indicate Edge Node is ready @tags util,management,edge @Produce json @Param X-Request-ID header string false "Request ID" @Success 200 {object} goutils.RestAPIBaseResponse "success" @Failure 400 {object} goutils.RestAPIBaseResponse "error" @Failure 404 {string} string "error" @Failure 500 {object} goutils.RestAPIBaseResponse "error" @Router /v1/ready [get]
func (EdgeNodeLivenessHandler) ReadyHandler ¶
func (h EdgeNodeLivenessHandler) ReadyHandler() http.HandlerFunc
ReadyHandler Wrapper around Ready
type NewVideoSourceRequest ¶
type NewVideoSourceRequest struct { Name string `json:"name" validate:"required"` TargetSegmentLen int `json:"segment_len" validate:"required,gte=1"` Description *string `json:"description,omitempty"` PlaylistURI *string `json:"playlist,omitempty" validate:"omitempty,uri"` }
NewVideoSourceRequest parameters to define a new video source
type PlaylistForwardCB ¶
PlaylistForwardCB callback signature of function for sending newly received HLS playlist onward for processing
type PlaylistReceiveHandler ¶
type PlaylistReceiveHandler struct { goutils.RestAPIHandler // contains filtered or unexported fields }
PlaylistReceiveHandler HLS playlist receiver
This is only meant to be used by the edge node
func NewPlaylistReceiveHandler ¶
func NewPlaylistReceiveHandler( parentCtxt context.Context, playlistParser hls.PlaylistParser, forwardPlaylist PlaylistForwardCB, defaultSourceName string, defaultSegmentURIPrefix *string, logConfig common.HTTPRequestLogging, metrics goutils.HTTPRequestMetricHelper, ) (PlaylistReceiveHandler, error)
NewPlaylistReceiveHandler define a new HLS playlist receiver
@param parentCtxt context.Context - REST handler parent context @param playlistParser hls.PlaylistParser - playlist parser object @param forwardPlaylist - callback function for sending newly received HLS playlist onward for processing @param defaultSourceName string - if video source name not provided, use this as the default name for the playlist. @param defaultSegmentURIPrefix *string - if video segment URI prefix is not provided, use this as the default prefix. @param logConfig common.HTTPRequestLogging - handler log settings @param metrics goutils.HTTPRequestMetricHelper - metric collection agent @returns new PlaylistReceiveHandler
func (PlaylistReceiveHandler) NewPlaylist ¶
func (h PlaylistReceiveHandler) NewPlaylist(w http.ResponseWriter, r *http.Request)
NewPlaylist godoc @Summary Process new HLS playlist @Description Receives new HLS playlist for processing. The sender should provide the location where the MPEG-TS segment are stored as a URI prefix. The HLS playlist monitor will use that prefix to pull the segments into the system. A default is used if none provided. @tags edge @Accept plain @Produce json @Param X-Request-ID header string false "Request ID" @Param Video-Source-Name header string false "Video source name this playlist belongs to" @Param MPEG-TS-URI-Prefix header string false "URI prefix for the MPEG-TS segments. The assumption is that all segments listed in the playlist are relative to this prefix." @Param playlist body string true "Playlist list content" @Success 200 {object} goutils.RestAPIBaseResponse "success" @Failure 400 {object} goutils.RestAPIBaseResponse "error" @Failure 403 {object} goutils.RestAPIBaseResponse "error" @Failure 404 {string} string "error" @Failure 500 {object} goutils.RestAPIBaseResponse "error" @Router /v1/playlist [post]
func (PlaylistReceiveHandler) NewPlaylistHandler ¶
func (h PlaylistReceiveHandler) NewPlaylistHandler() http.HandlerFunc
NewPlaylistHandler Wrapper around NewPlaylist
type RecordingSegmentListResponse ¶
type RecordingSegmentListResponse struct { goutils.RestAPIBaseResponse // Segments video segments associated with a recording session Segments []common.VideoSegment `json:"segments" validate:"required,dive"` }
RecordingSegmentListResponse response containing set of segment associated with a recording
type RecordingSessionListResponse ¶
type RecordingSessionListResponse struct { goutils.RestAPIBaseResponse // Recordings video recording session info list Recordings []common.Recording `json:"recordings" validate:"required,dive"` }
RecordingSessionListResponse response containing information for set of recording session
type RecordingSessionResponse ¶
type RecordingSessionResponse struct { goutils.RestAPIBaseResponse // Recording video recording session info Recording common.Recording `json:"recording" validate:"required,dive"` }
RecordingSessionResponse response containing information for one recording session
type RequestResponseClient ¶
type RequestResponseClient interface { goutils.RequestResponseClient }
RequestResponseClient mirrors the goutils.RequestResponseClient
type SegmentReceiveHandler ¶
type SegmentReceiveHandler struct { goutils.RestAPIHandler // contains filtered or unexported fields }
SegmentReceiveHandler HLS video segment receiver
This is only meant to be used by the system control node
func NewSegmentReceiveHandler ¶
func NewSegmentReceiveHandler( parentCtxt context.Context, forwardSegment VideoSegmentForwardCB, logConfig common.HTTPRequestLogging, metrics goutils.HTTPRequestMetricHelper, ) (SegmentReceiveHandler, error)
NewSegmentReceiveHandler define a new video segment receiver
@param parentCtxt context.Context - REST handler parent context @param forwardSegment VideoSegmentForwardCB - callback function for sending newly received video segment onward for processing @param logConfig common.HTTPRequestLogging - handler log settings @param metrics goutils.HTTPRequestMetricHelper - metric collection agent @returns new SegmentReceiveHandler
func (SegmentReceiveHandler) NewSegment ¶
func (h SegmentReceiveHandler) NewSegment(w http.ResponseWriter, r *http.Request)
NewSegment godoc @Summary Process new HLS video segment @Description Process new HLS video segment @tags live,cloud @Accept plain @Produce json @Param X-Request-ID header string false "Request ID" @Param Source-ID header string true "Video source ID this segment belongs to" @Param Segment-Name header string true "Video segment name" @Param Segment-Start-TS header int64 true "Video segment start timestamp - epoch seconds" @Param Segment-Length-MSec header int64 true "Video segment duration in millisecond" @Param Segment-URI header string true "Video segment URI" @Param segmentContent body []byte true "Video segment content" @Success 200 {object} goutils.RestAPIBaseResponse "success" @Failure 400 {object} goutils.RestAPIBaseResponse "error" @Failure 403 {object} goutils.RestAPIBaseResponse "error" @Failure 404 {string} string "error" @Failure 500 {object} goutils.RestAPIBaseResponse "error" @Router /v1/new-segment [post]
func (SegmentReceiveHandler) NewSegmentHandler ¶
func (h SegmentReceiveHandler) NewSegmentHandler() http.HandlerFunc
NewSegmentHandler Wrapper around NewSegment
type StartNewRecordingRequest ¶
type StartNewRecordingRequest struct { Alias *string `json:"alias,omitempty"` Description *string `json:"description,omitempty"` StartTime int64 `json:"start_time_epoch,omitempty"` }
StartNewRecordingRequest parameters to start a new video recording
type SystemManagerHandler ¶
type SystemManagerHandler struct { goutils.RestAPIHandler // contains filtered or unexported fields }
SystemManagerHandler REST API interface to SystemManager
This is only meant to be used by the control node
func NewSystemManagerHandler ¶
func NewSystemManagerHandler( manager control.SystemManager, logConfig common.HTTPRequestLogging, metrics goutils.HTTPRequestMetricHelper, ) (SystemManagerHandler, error)
NewSystemManagerHandler define a new system manager REST API handler
@param manager control.SystemManager - core system manager @param logConfig common.HTTPRequestLogging - handler log settings @param metrics goutils.HTTPRequestMetricHelper - metric collection agent @returns new SystemManagerHandler
func (SystemManagerHandler) ChangeSourceStreamingState ¶
func (h SystemManagerHandler) ChangeSourceStreamingState(w http.ResponseWriter, r *http.Request)
ChangeSourceStreamingState godoc @Summary Change video source streaming state @Description Change video source streaming state @tags management,cloud @Produce json @Param X-Request-ID header string false "Request ID" @Param sourceID path string true "Video source ID" @Param new_state query string true "New video source streaming state [true,false]" @Success 200 {object} goutils.RestAPIBaseResponse "success" @Failure 400 {object} goutils.RestAPIBaseResponse "error" @Failure 403 {object} goutils.RestAPIBaseResponse "error" @Failure 404 {string} string "error" @Failure 500 {object} goutils.RestAPIBaseResponse "error" @Router /v1/source/{sourceID}/streaming [put]
func (SystemManagerHandler) ChangeSourceStreamingStateHandler ¶
func (h SystemManagerHandler) ChangeSourceStreamingStateHandler() http.HandlerFunc
ChangeSourceStreamingStateHandler Wrapper around ChangeSourceStreamingState
func (SystemManagerHandler) DefineNewVideoSource ¶
func (h SystemManagerHandler) DefineNewVideoSource(w http.ResponseWriter, r *http.Request)
DefineNewVideoSource godoc @Summary Define a new video source @Description Define a new video source within the system. @tags management,cloud @Accept json @Produce json @Param X-Request-ID header string false "Request ID" @Param param body NewVideoSourceRequest true "Video source parameters" @Success 200 {object} VideoSourceInfoResponse "success" @Failure 400 {object} goutils.RestAPIBaseResponse "error" @Failure 403 {object} goutils.RestAPIBaseResponse "error" @Failure 404 {string} string "error" @Failure 500 {object} goutils.RestAPIBaseResponse "error" @Router /v1/source [post]
func (SystemManagerHandler) DefineNewVideoSourceHandler ¶
func (h SystemManagerHandler) DefineNewVideoSourceHandler() http.HandlerFunc
DefineNewVideoSourceHandler Wrapper around DefineNewVideoSource
func (SystemManagerHandler) DeleteRecording ¶
func (h SystemManagerHandler) DeleteRecording(w http.ResponseWriter, r *http.Request)
DeleteRecording godoc @Summary Delete recording session @Description Delete the video recording sessions @tags management,cloud @Produce json @Param X-Request-ID header string false "Request ID" @Param recordingID path string true "Video recording session ID" @Param force query string false "If exist, will complete operation regardless of whether the video source is accepting inbound requests." @Success 200 {object} goutils.RestAPIBaseResponse "success" @Failure 400 {object} goutils.RestAPIBaseResponse "error" @Failure 403 {object} goutils.RestAPIBaseResponse "error" @Failure 404 {string} string "error" @Failure 500 {object} goutils.RestAPIBaseResponse "error" @Router /v1/recording/{recordingID} [delete]
func (SystemManagerHandler) DeleteRecordingHandler ¶
func (h SystemManagerHandler) DeleteRecordingHandler() http.HandlerFunc
DeleteRecordingHandler Wrapper around DeleteRecording
func (SystemManagerHandler) DeleteVideoSource ¶
func (h SystemManagerHandler) DeleteVideoSource(w http.ResponseWriter, r *http.Request)
DeleteVideoSource godoc @Summary Delete a video source @Description Delete a video source @tags management,cloud @Produce json @Param X-Request-ID header string false "Request ID" @Param sourceID path string true "Video source ID" @Success 200 {object} goutils.RestAPIBaseResponse "success" @Failure 400 {object} goutils.RestAPIBaseResponse "error" @Failure 403 {object} goutils.RestAPIBaseResponse "error" @Failure 404 {string} string "error" @Failure 500 {object} goutils.RestAPIBaseResponse "error" @Router /v1/source/{sourceID} [delete]
func (SystemManagerHandler) DeleteVideoSourceHandler ¶
func (h SystemManagerHandler) DeleteVideoSourceHandler() http.HandlerFunc
DeleteVideoSourceHandler Wrapper around DeleteVideoSource
func (SystemManagerHandler) GetRecording ¶
func (h SystemManagerHandler) GetRecording(w http.ResponseWriter, r *http.Request)
GetRecording godoc @Summary Get recording session @Description Get the video recording sessions @tags management,cloud @Produce json @Param X-Request-ID header string false "Request ID" @Param recordingID path string true "Video recording session ID" @Success 200 {object} RecordingSessionResponse "success" @Failure 400 {object} goutils.RestAPIBaseResponse "error" @Failure 403 {object} goutils.RestAPIBaseResponse "error" @Failure 404 {string} string "error" @Failure 500 {object} goutils.RestAPIBaseResponse "error" @Router /v1/recording/{recordingID} [get]
func (SystemManagerHandler) GetRecordingHandler ¶
func (h SystemManagerHandler) GetRecordingHandler() http.HandlerFunc
GetRecordingHandler Wrapper around GetRecording
func (SystemManagerHandler) GetVideoSource ¶
func (h SystemManagerHandler) GetVideoSource(w http.ResponseWriter, r *http.Request)
GetVideoSource godoc @Summary Fetch video source @Description Fetch video source @tags management,cloud @Produce json @Param X-Request-ID header string false "Request ID" @Param sourceID path string true "Video source ID" @Success 200 {object} VideoSourceInfoResponse "success" @Failure 400 {object} goutils.RestAPIBaseResponse "error" @Failure 403 {object} goutils.RestAPIBaseResponse "error" @Failure 404 {string} string "error" @Failure 500 {object} goutils.RestAPIBaseResponse "error" @Router /v1/source/{sourceID} [get]
func (SystemManagerHandler) GetVideoSourceHandler ¶
func (h SystemManagerHandler) GetVideoSourceHandler() http.HandlerFunc
GetVideoSourceHandler Wrapper around GetVideoSource
func (SystemManagerHandler) ListRecordings ¶
func (h SystemManagerHandler) ListRecordings(w http.ResponseWriter, r *http.Request)
ListRecordings godoc @Summary Fetch recordings @Description Fetch video recording sessions @tags management,cloud @Produce json @Param X-Request-ID header string false "Request ID" @Success 200 {object} RecordingSessionListResponse "success" @Failure 400 {object} goutils.RestAPIBaseResponse "error" @Failure 403 {object} goutils.RestAPIBaseResponse "error" @Failure 404 {string} string "error" @Failure 500 {object} goutils.RestAPIBaseResponse "error" @Router /v1/recording [get]
func (SystemManagerHandler) ListRecordingsHandler ¶
func (h SystemManagerHandler) ListRecordingsHandler() http.HandlerFunc
ListRecordingsHandler Wrapper around ListRecordings
func (SystemManagerHandler) ListRecordingsOfSource ¶
func (h SystemManagerHandler) ListRecordingsOfSource(w http.ResponseWriter, r *http.Request)
ListRecordingsOfSource godoc @Summary Fetch recordings of source @Description Fetch video recording sessions associated with a video source @tags management,cloud @Produce json @Param X-Request-ID header string false "Request ID" @Param sourceID path string true "Video source ID" @Param only_active query string false "If exist, only list active recording sessions" @Success 200 {object} RecordingSessionListResponse "success" @Failure 400 {object} goutils.RestAPIBaseResponse "error" @Failure 403 {object} goutils.RestAPIBaseResponse "error" @Failure 404 {string} string "error" @Failure 500 {object} goutils.RestAPIBaseResponse "error" @Router /v1/source/{sourceID}/recording [get]
func (SystemManagerHandler) ListRecordingsOfSourceHandler ¶
func (h SystemManagerHandler) ListRecordingsOfSourceHandler() http.HandlerFunc
ListRecordingsOfSourceHandler Wrapper around ListRecordingsOfSource
func (SystemManagerHandler) ListSegmentsOfRecording ¶
func (h SystemManagerHandler) ListSegmentsOfRecording(w http.ResponseWriter, r *http.Request)
ListSegmentsOfRecording godoc @Summary Get segments associated with recording @Description Get the video segments associated with a recording session @tags management,cloud @Produce json @Param X-Request-ID header string false "Request ID" @Param recordingID path string true "Video recording session ID" @Success 200 {object} RecordingSegmentListResponse "success" @Failure 400 {object} goutils.RestAPIBaseResponse "error" @Failure 403 {object} goutils.RestAPIBaseResponse "error" @Failure 404 {string} string "error" @Failure 500 {object} goutils.RestAPIBaseResponse "error" @Router /v1/recording/{recordingID}/segment [get]
func (SystemManagerHandler) ListSegmentsOfRecordingHandler ¶
func (h SystemManagerHandler) ListSegmentsOfRecordingHandler() http.HandlerFunc
ListSegmentsOfRecordingHandler Wrapper around ListSegmentsOfRecording
func (SystemManagerHandler) ListVideoSources ¶
func (h SystemManagerHandler) ListVideoSources(w http.ResponseWriter, r *http.Request)
ListVideoSources godoc @Summary List known video sources @Description Fetch list of known video sources in the system @tags management,cloud @Produce json @Param X-Request-ID header string false "Request ID" @Success 200 {object} VideoSourceInfoListResponse "success" @Failure 400 {object} goutils.RestAPIBaseResponse "error" @Failure 403 {object} goutils.RestAPIBaseResponse "error" @Failure 404 {string} string "error" @Failure 500 {object} goutils.RestAPIBaseResponse "error" @Router /v1/source [get]
func (SystemManagerHandler) ListVideoSourcesHandler ¶
func (h SystemManagerHandler) ListVideoSourcesHandler() http.HandlerFunc
ListVideoSourcesHandler Wrapper around ListVideoSources
func (SystemManagerHandler) StartNewRecording ¶
func (h SystemManagerHandler) StartNewRecording(w http.ResponseWriter, r *http.Request)
StartNewRecording godoc @Summary Start video recording @Description Starting a new video recording session on a particular video source @tags management,cloud @Accept json @Produce json @Param X-Request-ID header string false "Request ID" @Param sourceID path string true "Video source ID" @Param requestPayload body StartNewRecordingRequest false "Recording session parameters" @Success 200 {object} RecordingSessionResponse "success" @Failure 400 {object} goutils.RestAPIBaseResponse "error" @Failure 403 {object} goutils.RestAPIBaseResponse "error" @Failure 404 {string} string "error" @Failure 500 {object} goutils.RestAPIBaseResponse "error" @Router /v1/source/{sourceID}/recording [post]
func (SystemManagerHandler) StartNewRecordingHandler ¶
func (h SystemManagerHandler) StartNewRecordingHandler() http.HandlerFunc
StartNewRecordingHandler Wrapper around StartNewRecording
func (SystemManagerHandler) StopRecording ¶
func (h SystemManagerHandler) StopRecording(w http.ResponseWriter, r *http.Request)
StopRecording godoc @Summary Stop recording session @Description Stop the video recording sessions @tags management,cloud @Produce json @Param X-Request-ID header string false "Request ID" @Param recordingID path string true "Video recording session ID" @Param force query string false "If exist, will complete operation regardless of whether the video source is accepting inbound requests." @Success 200 {object} goutils.RestAPIBaseResponse "success" @Failure 400 {object} goutils.RestAPIBaseResponse "error" @Failure 403 {object} goutils.RestAPIBaseResponse "error" @Failure 404 {string} string "error" @Failure 500 {object} goutils.RestAPIBaseResponse "error" @Router /v1/recording/{recordingID}/stop [post]
func (SystemManagerHandler) StopRecordingHandler ¶
func (h SystemManagerHandler) StopRecordingHandler() http.HandlerFunc
StopRecordingHandler Wrapper around StopRecording
func (SystemManagerHandler) UpdateVideoSourceName ¶
func (h SystemManagerHandler) UpdateVideoSourceName(w http.ResponseWriter, r *http.Request)
UpdateVideoSourceName godoc @Summary Update a video source's name @Description Update a video source's name @tags management,cloud @Produce json @Param X-Request-ID header string false "Request ID" @Param sourceID path string true "Video source ID" @Param new_name query string true "New video source name" @Success 200 {object} goutils.RestAPIBaseResponse "success" @Failure 400 {object} goutils.RestAPIBaseResponse "error" @Failure 403 {object} goutils.RestAPIBaseResponse "error" @Failure 404 {string} string "error" @Failure 500 {object} goutils.RestAPIBaseResponse "error" @Router /v1/source/{sourceID}/name [put]
func (SystemManagerHandler) UpdateVideoSourceNameHandler ¶
func (h SystemManagerHandler) UpdateVideoSourceNameHandler() http.HandlerFunc
UpdateVideoSourceNameHandler Wrapper around UpdateVideoSourceName
type SystemManagerLivenessHandler ¶
type SystemManagerLivenessHandler struct { goutils.RestAPIHandler // contains filtered or unexported fields }
SystemManagerLivenessHandler liveness REST API interface for SystemManager
func NewSystemManagerLivenessHandler ¶
func NewSystemManagerLivenessHandler( manager control.SystemManager, logConfig common.HTTPRequestLogging, ) (SystemManagerLivenessHandler, error)
NewSystemManagerLivenessHandler define a new system manager liveness REST API handler
@param manager control.SystemManager - core system manager @param logConfig common.HTTPRequestLogging - handler log settings @returns new SystemManagerLivenessHandler
func (SystemManagerLivenessHandler) Alive ¶
func (h SystemManagerLivenessHandler) Alive(w http.ResponseWriter, r *http.Request)
Alive godoc @Summary System Manager API liveness check @Description Will return success to indicate system manager REST API module is live @tags util,management,cloud @Produce json @Param X-Request-ID header string false "Request ID" @Success 200 {object} goutils.RestAPIBaseResponse "success" @Failure 400 {object} goutils.RestAPIBaseResponse "error" @Failure 404 {string} string "error" @Failure 500 {object} goutils.RestAPIBaseResponse "error" @Router /v1/alive [get]
func (SystemManagerLivenessHandler) AliveHandler ¶
func (h SystemManagerLivenessHandler) AliveHandler() http.HandlerFunc
AliveHandler Wrapper around Alive
func (SystemManagerLivenessHandler) Ready ¶
func (h SystemManagerLivenessHandler) Ready(w http.ResponseWriter, r *http.Request)
Ready godoc @Summary System Manager API readiness check @Description Will return success if system manager REST API module is ready for use @tags util,management,cloud @Produce json @Param X-Request-ID header string false "Request ID" @Success 200 {object} goutils.RestAPIBaseResponse "success" @Failure 400 {object} goutils.RestAPIBaseResponse "error" @Failure 404 {string} string "error" @Failure 500 {object} goutils.RestAPIBaseResponse "error" @Router /v1/ready [get]
func (SystemManagerLivenessHandler) ReadyHandler ¶
func (h SystemManagerLivenessHandler) ReadyHandler() http.HandlerFunc
ReadyHandler Wrapper around Alive
type VODHandler ¶
type VODHandler struct { goutils.RestAPIHandler // contains filtered or unexported fields }
VODHandler HLS VOD handler
func NewVODHandler ¶
func NewVODHandler( dbConns db.ConnectionManager, manager vod.PlaylistManager, logConfig common.HTTPRequestLogging, metrics goutils.HTTPRequestMetricHelper, ) (VODHandler, error)
NewVODHandler define a new HLS VOD handler
@param dbConns db.ConnectionManager - DB connection manager @param manager vod.PlaylistManager - video playlist manager @param logConfig common.HTTPRequestLogging - handler log settings @param metrics goutils.HTTPRequestMetricHelper - metric collection agent @returns new LiveStreamHandler
func (VODHandler) GetLiveStreamVideoFilesHandler ¶
func (h VODHandler) GetLiveStreamVideoFilesHandler() http.HandlerFunc
GetLiveStreamVideoFilesHandler Wrapper around getVideoFiles in live stream mode GetLiveStreamVideoFiles godoc @Summary Query files for a HLS live stream @Description Query files for a HLS live stream, which include both the `m3u8` playlist file and `ts` MPEG-TS file. @tags vod,live,edge,cloud @Produce plain @Param X-Request-ID header string false "Request ID" @Param videoSourceID path string true "Video source ID" @Param fileName path string true "Target file name" @Success 200 {object} []byte "HLS m3u8 playlist / MPEG-TS" @Failure 400 {object} goutils.RestAPIBaseResponse "error" @Failure 403 {object} goutils.RestAPIBaseResponse "error" @Failure 404 {string} string "error" @Failure 500 {object} goutils.RestAPIBaseResponse "error" @Router /v1/vod/live/{videoSourceID}/{fileName} [get]
func (VODHandler) GetRecordingVideoFilesHandler ¶
func (h VODHandler) GetRecordingVideoFilesHandler() http.HandlerFunc
GetRecordingVideoFilesHandler Wrapper around getVideoFiles in recording mode GetRecordingVideoFiles godoc @Summary Query files for a HLS recording @Description Query files for a HLS recording, which include both the `m3u8` playlist file and `ts` MPEG-TS file. @tags vod,recording,edge,cloud @Produce plain @Param X-Request-ID header string false "Request ID" @Param recordingID path string true "Video recording ID" @Param fileName path string true "Target file name" @Success 200 {object} []byte "HLS m3u8 playlist / MPEG-TS" @Failure 400 {object} goutils.RestAPIBaseResponse "error" @Failure 403 {object} goutils.RestAPIBaseResponse "error" @Failure 404 {string} string "error" @Failure 500 {object} goutils.RestAPIBaseResponse "error" @Router /v1/vod/recording/{recordingID}/{fileName} [get]
type VideoSegmentForwardCB ¶
type VideoSegmentForwardCB func( ctxt context.Context, sourceID string, segment hls.Segment, content []byte, ) error
VideoSegmentForwardCB callback signature of function for sending newly received video segments onward for processing
type VideoSourceInfoListResponse ¶
type VideoSourceInfoListResponse struct { goutils.RestAPIBaseResponse // Sources list of video source infos Sources []common.VideoSource `json:"sources"` }
VideoSourceInfoListResponse response containing list of video sources
type VideoSourceInfoResponse ¶
type VideoSourceInfoResponse struct { goutils.RestAPIBaseResponse // Source the video source info Source common.VideoSource `json:"source" validate:"required,dive"` }
VideoSourceInfoResponse response containing information for one video source