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 {
Timestamp *int64 `json:"timestamp,omitempty"`
CreatorID data.Nullable[string] `json:"creatorId,omitempty"`
ViewerID data.Nullable[string] `json:"viewerId,omitempty"`
PlaybackID data.Nullable[string] `json:"playbackId,omitempty"`
DStorageURL data.Nullable[string] `json:"dStorageUrl,omitempty"`
Device data.Nullable[string] `json:"device,omitempty"`
DeviceType data.Nullable[string] `json:"deviceType,omitempty"`
CPU data.Nullable[string] `json:"cpu,omitempty"`
OS data.Nullable[string] `json:"os,omitempty"`
Browser data.Nullable[string] `json:"browser,omitempty"`
BrowserEngine data.Nullable[string] `json:"browserEngine,omitempty"`
Continent data.Nullable[string] `json:"continent,omitempty"`
Country data.Nullable[string] `json:"country,omitempty"`
Subdivision data.Nullable[string] `json:"subdivision,omitempty"`
TimeZone data.Nullable[string] `json:"timezone,omitempty"`
GeoHash data.Nullable[string] `json:"geohash,omitempty"`
ViewCount int64 `json:"viewCount"`
PlaytimeMins float64 `json:"playtimeMins"`
TtffMs data.Nullable[float64] `json:"ttffMs,omitempty"`
RebufferRatio data.Nullable[float64] `json:"rebufferRatio,omitempty"`
ErrorRate data.Nullable[float64] `json:"errorRate,omitempty"`
ExitsBeforeStart data.Nullable[float64] `json:"exitsBeforeStart,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 data.Nullable[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 ViewSummaryRow struct {
PlaybackID bigquery.NullString `bigquery:"playback_id"`
DStorageURL bigquery.NullString `bigquery:"d_storage_url"`
ViewCount int64 `bigquery:"view_count"`
LegacyViewCount bigquery.NullInt64 `bigquery:"legacy_view_count"`
PlaytimeMins float64 `bigquery:"playtime_mins"`
}
type ViewershipEventRow ¶ added in v0.7.0
type ViewershipEventRow struct {
TimeInterval time.Time `bigquery:"time_interval"`
// breakdown fields
CreatorID bigquery.NullString `bigquery:"creator_id"`
ViewerID bigquery.NullString `bigquery:"viewer_id"`
PlaybackID bigquery.NullString `bigquery:"playback_id"`
DStorageURL bigquery.NullString `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_subdivision_name"`
TimeZone bigquery.NullString `bigquery:"playback_timezone"`
GeoHash bigquery.NullString `bigquery:"playback_geo_hash"`
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"`
ExitsBeforeStart bigquery.NullFloat64 `bigquery:"exits_before_start"`
}
Click to show internal directories.
Click to hide internal directories.