Documentation
¶
Index ¶
- func CollectDistinctSourceSeries(seriesList ...[]*pb.SourceSeries) []*pb.SourceSeries
- func FilterAndRank(in *model.ObsTimeSeries, prop *model.StatObsProp)
- func GetBestSeries(in *pb.ObsTimeSeries, importName string, useLatest bool) (*pb.Series, *string)
- func GetStatAll(ctx context.Context, in *pb.GetStatAllRequest, store *store.Store) (*pb.GetStatAllResponse, error)
- func GetStatSeries(ctx context.Context, in *pb.GetStatSeriesRequest, store *store.Store) (*pb.GetStatSeriesResponse, error)
- func GetStatSet(ctx context.Context, in *pb.GetStatSetRequest, store *store.Store) (*pb.GetStatSetResponse, error)
- func GetStatSetSeries(ctx context.Context, in *pb.GetStatSetSeriesRequest, store *store.Store) (*pb.GetStatSetSeriesResponse, error)
- func GetStatSetSeriesWithinPlace(ctx context.Context, in *pb.GetStatSetSeriesWithinPlaceRequest, ...) (*pb.GetStatSetSeriesResponse, error)
- func GetStatSetWithinPlace(ctx context.Context, in *pb.GetStatSetWithinPlaceRequest, store *store.Store) (*pb.GetStatSetResponse, error)
- func GetStatSetWithinPlaceAll(ctx context.Context, in *pb.GetStatSetWithinPlaceRequest, store *store.Store) (*pb.GetStatSetAllResponse, error)
- func GetStatValue(ctx context.Context, in *pb.GetStatValueRequest, store *store.Store) (*pb.GetStatValueResponse, error)
- func GetStats(ctx context.Context, in *pb.GetStatsRequest, store *store.Store) (*pb.GetStatsResponse, error)
- func ReadStatCollection(ctx context.Context, btGroup *bigtable.Group, rowList cbt.RowList, ...) (map[string]*pb.ObsCollection, error)
- func ReadStats(ctx context.Context, btGroup *bigtable.Group, rowList cbt.RowList, ...) (map[string]map[string]*model.ObsTimeSeries, error)
- func ReadStatsPb(ctx context.Context, btGroup *bigtable.Group, rowList cbt.RowList, ...) (map[string]map[string]*pb.ObsTimeSeries, error)
- func TokenFn(keyTokens map[string]*util.PlaceStatVar) func(rowKey string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectDistinctSourceSeries ¶ added in v1.33.0
func CollectDistinctSourceSeries(seriesList ...[]*pb.SourceSeries) []*pb.SourceSeries
CollectDistinctSourceSeries merges lists of SourceSeries. For same source series, the one with more data points is used. In most cases, this is the series with the latest data as well.
func FilterAndRank ¶
func FilterAndRank(in *model.ObsTimeSeries, prop *model.StatObsProp)
FilterAndRank filters and ranks ObsTimeSeries in place.
func GetBestSeries ¶
func GetBestSeries( in *pb.ObsTimeSeries, importName string, useLatest bool, ) (*pb.Series, *string)
GetBestSeries gets the best series for a collection of series with different metadata.
- If "importName" is set, pick the series with the import name.
- If "useLatest" is true, pick the series with latest date and set the second return value to be the latest date.
Note "importName" is preferred over "useLatest".
func GetStatAll ¶
func GetStatAll(ctx context.Context, in *pb.GetStatAllRequest, store *store.Store) ( *pb.GetStatAllResponse, error)
GetStatAll implements API for Mixer.GetStatAll.
func GetStatSeries ¶
func GetStatSeries( ctx context.Context, in *pb.GetStatSeriesRequest, store *store.Store) ( *pb.GetStatSeriesResponse, error)
GetStatSeries implements API for Mixer.GetStatSeries. TODO(shifucun): consilidate and dedup the logic among these similar APIs.
func GetStatSet ¶
func GetStatSet(ctx context.Context, in *pb.GetStatSetRequest, store *store.Store) ( *pb.GetStatSetResponse, error)
GetStatSet implements API for Mixer.GetStatSet.
func GetStatSetSeries ¶
func GetStatSetSeries(ctx context.Context, in *pb.GetStatSetSeriesRequest, store *store.Store) ( *pb.GetStatSetSeriesResponse, error)
GetStatSetSeries implements API for Mixer.GetStatSetSeries.
func GetStatSetSeriesWithinPlace ¶
func GetStatSetSeriesWithinPlace( ctx context.Context, in *pb.GetStatSetSeriesWithinPlaceRequest, store *store.Store) ( *pb.GetStatSetSeriesResponse, error, )
GetStatSetSeriesWithinPlace implements API for Mixer.GetStatSetSeriesWithinPlace.
func GetStatSetWithinPlace ¶
func GetStatSetWithinPlace( ctx context.Context, in *pb.GetStatSetWithinPlaceRequest, store *store.Store) ( *pb.GetStatSetResponse, error, )
GetStatSetWithinPlace implements API for Mixer.GetStatSetWithinPlace.
func GetStatSetWithinPlaceAll ¶
func GetStatSetWithinPlaceAll( ctx context.Context, in *pb.GetStatSetWithinPlaceRequest, store *store.Store) ( *pb.GetStatSetAllResponse, error, )
GetStatSetWithinPlaceAll implements API for Mixer.GetStatSetWithinPlaceAll.
func GetStatValue ¶
func GetStatValue(ctx context.Context, in *pb.GetStatValueRequest, store *store.Store) ( *pb.GetStatValueResponse, error)
GetStatValue implements API for Mixer.GetStatValue.
func GetStats ¶
func GetStats(ctx context.Context, in *pb.GetStatsRequest, store *store.Store) ( *pb.GetStatsResponse, error)
GetStats implements API for Mixer.GetStats.
func ReadStatCollection ¶ added in v1.33.0
func ReadStatCollection( ctx context.Context, btGroup *bigtable.Group, rowList cbt.RowList, keyTokens map[string]string) ( map[string]*pb.ObsCollection, error)
ReadStatCollection reads and process ObsCollection cache from BigTable in parallel.
func ReadStats ¶ added in v1.33.0
func ReadStats( ctx context.Context, btGroup *bigtable.Group, rowList cbt.RowList, keyTokens map[string]*util.PlaceStatVar) ( map[string]map[string]*model.ObsTimeSeries, error)
ReadStats reads and process BigTable rows in parallel. Consider consolidate this function and bigTableReadRowsParallel.
func ReadStatsPb ¶ added in v1.33.0
func ReadStatsPb( ctx context.Context, btGroup *bigtable.Group, rowList cbt.RowList, keyTokens map[string]*util.PlaceStatVar) ( map[string]map[string]*pb.ObsTimeSeries, error)
ReadStatsPb reads and process BigTable rows in parallel. Consider consolidate this function and bigTableReadRowsParallel.
Types ¶
This section is empty.