Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAssetNotFound = errors.New("asset not found")
Functions ¶
func ToDStorageURL ¶ added in v0.7.0
Types ¶
type BigQuery ¶ added in v0.7.0
type BigQuery interface {
QueryViewsEvents(ctx context.Context, spec QuerySpec) ([]ViewershipEventRow, error)
QueryViewsSummary(ctx context.Context, playbackID string) (*ViewSummaryRow, error)
}
func NewBigQuery ¶ added in v0.7.0
func NewBigQuery(opts BigQueryOptions) (BigQuery, error)
type BigQueryOptions ¶ added in v0.7.0
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(opts ClientOptions) (*Client, error)
func (*Client) Deprecated_GetTotalViews ¶ added in v0.7.0
func (*Client) QueryEvents ¶ added in v0.7.2
type ClientOptions ¶
type ClientOptions struct {
Prometheus promClient.Config
Livepeer livepeer.ClientOptions
BigQueryOptions
}
type Metric ¶ added in v0.7.0
type Metric struct {
PlaybackID string `json:"playbackId,omitempty"`
DStorageURL string `json:"dStorageUrl,omitempty"`
Timestamp *int64 `json:"timestamp,omitempty"`
Device *string `json:"device,omitempty"`
DeviceType *string `json:"deviceType,omitempty"`
CPU *string `json:"cpu,omitempty"`
OS *string `json:"os,omitempty"`
Browser *string `json:"browser,omitempty"`
BrowserEngine *string `json:"browserEngine,omitempty"`
Continent *string `json:"continent,omitempty"`
Country *string `json:"country,omitempty"`
Subdivision *string `json:"subdivision,omitempty"`
TimeZone *string `json:"timezone,omitempty"`
ViewCount int64 `json:"viewCount"`
PlaytimeMins float64 `json:"playtimeMins"`
TtffMs *float64 `json:"ttffMs,omitempty"`
RebufferRatio *float64 `json:"rebufferRatio,omitempty"`
ErrorRate *float64 `json:"errorRate,omitempty"`
ExistsBeforeStart *float64 `json:"existsBeforeStart,omitempty"`
// Present only on the summary queries. These were imported from the
// prometheus data we had on the first version of this API and are not
// shown in the detailed metrics queries (non-/total).
LegacyViewCount *int64 `json:"legacyViewCount,omitempty"`
}
type Prometheus ¶ added in v0.7.0
type Prometheus struct {
// contains filtered or unexported fields
}
func NewPrometheus ¶ added in v0.7.0
func NewPrometheus(config promClient.Config) (*Prometheus, error)
func (*Prometheus) QueryStartViews ¶ added in v0.7.0
type QueryFilter ¶ added in v0.7.0
type TotalViews ¶
type ViewSummaryRow ¶ added in v0.7.0
type ViewershipEventRow ¶ added in v0.7.0
type ViewershipEventRow struct {
TimeInterval time.Time `bigquery:"time_interval"`
PlaybackID string `bigquery:"playback_id"`
DStorageURL string `bigquery:"d_storage_url"`
DeviceType bigquery.NullString `bigquery:"device_type"`
Device bigquery.NullString `bigquery:"device"`
CPU bigquery.NullString `bigquery:"cpu"`
OS bigquery.NullString `bigquery:"os"`
Browser bigquery.NullString `bigquery:"browser"`
BrowserEngine bigquery.NullString `bigquery:"browser_engine"`
Continent bigquery.NullString `bigquery:"playback_continent_name"`
Country bigquery.NullString `bigquery:"playback_country_name"`
Subdivision bigquery.NullString `bigquery:"playback_subdivisions_name"`
TimeZone bigquery.NullString `bigquery:"playback_timezone"`
ViewCount int64 `bigquery:"view_count"`
PlaytimeMins float64 `bigquery:"playtime_mins"`
TtffMs bigquery.NullFloat64 `bigquery:"ttff_ms"`
RebufferRatio bigquery.NullFloat64 `bigquery:"rebuffer_ratio"`
ErrorRate bigquery.NullFloat64 `bigquery:"error_rate"`
ExistsBeforeStart bigquery.NullFloat64 `bigquery:"exits_before_start"`
}
Click to show internal directories.
Click to hide internal directories.