Documentation ¶
Index ¶
- type ReportingFramework
- func (rf *ReportingFramework) CollectMetricsOnce(t *testing.T) (time.Time, time.Time, operator.CollectPrometheusMetricsDataResponse)
- func (rf *ReportingFramework) CreateMeteringReport(report *metering.Report) error
- func (rf *ReportingFramework) GetMeteringReport(name string) (*metering.Report, error)
- func (rf *ReportingFramework) GetMeteringReportDataSource(name string) (*metering.ReportDataSource, error)
- func (rf *ReportingFramework) GetMeteringReportQuery(name string) (*metering.ReportQuery, error)
- func (rf *ReportingFramework) GetPrestoTable(name string) (*metering.PrestoTable, error)
- func (rf *ReportingFramework) GetReportResults(t *testing.T, report *metering.Report, waitTimeout time.Duration) []map[string]interface{}
- func (rf *ReportingFramework) NewSimpleReport(name, queryName string, schedule *metering.ReportSchedule, ...) *metering.Report
- func (rf *ReportingFramework) PrestoTableExists(t *testing.T, name string) (bool, error)
- func (rf *ReportingFramework) ReportingOperatorPOSTRequest(endpoint string, body []byte) (respBody []byte, code int, err error)
- func (rf *ReportingFramework) ReportingOperatorRequest(endpoint string, query map[string]string) (respBody []byte, code int, err error)
- func (rf *ReportingFramework) RequireReportDataSourcesForQueryHaveData(t *testing.T, queries []string, ...)
- func (rf *ReportingFramework) RequireReportQueriesReady(t *testing.T, queries []string, pollInterval, timeout time.Duration)
- func (rf *ReportingFramework) RequireReportSuccessfullyRuns(t *testing.T, report *metering.Report, waitTimeout time.Duration)
- func (rf *ReportingFramework) StoreDataSourceData(dataSourceName string, metrics []*prestostore.PrometheusMetric) error
- func (rf *ReportingFramework) WaitForAllMeteringReportDataSourceTables(t *testing.T, pollInterval, timeout time.Duration) ([]*metering.ReportDataSource, error)
- func (rf *ReportingFramework) WaitForMeteringReportDataSource(t *testing.T, name string, pollInterval, timeout time.Duration, ...) (*metering.ReportDataSource, error)
- func (rf *ReportingFramework) WaitForMeteringReportDataSourceTable(t *testing.T, name string, pollInterval, timeout time.Duration) (*metering.ReportDataSource, error)
- func (rf *ReportingFramework) WaitForMeteringReportQuery(t *testing.T, name string, pollInterval, timeout time.Duration) (*metering.ReportQuery, error)
- func (rf *ReportingFramework) WaitForPrestoTable(t *testing.T, name string, pollInterval, timeout time.Duration, ...) (*metering.PrestoTable, error)
- func (rf *ReportingFramework) WaitForReportDataSourcePrestoTable(t *testing.T, ds *metering.ReportDataSource, ...) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReportingFramework ¶
type ReportingFramework struct { MeteringClient metering.MeteringV1Interface KubeClient kubernetes.Interface HTTPClient *http.Client RouteClient routev1client.RouteV1Client Namespace string DefaultTimeout time.Duration ReportOutputDirectory string KubeAPIURL *url.URL KubeAPIPath string UseKubeProxyForReportingAPI bool UseRouteForReportingAPI bool RouteBearerToken string ReportingAPIURL *url.URL HTTPSAPI bool // contains filtered or unexported fields }
func New ¶
func New( httpsAPI, useKubeProxyForReportingAPI, useRouteForReportingAPI bool, namespace, routeBearerToken, reportingAPIURL, reportOutputDir string, kubeconfig *rest.Config, kubeClient kubernetes.Interface, meteringClient metering.MeteringV1Interface, ) (*ReportingFramework, error)
New initializes a test reporting framework and returns it.
func (*ReportingFramework) CollectMetricsOnce ¶
func (rf *ReportingFramework) CollectMetricsOnce(t *testing.T) (time.Time, time.Time, operator.CollectPrometheusMetricsDataResponse)
func (*ReportingFramework) CreateMeteringReport ¶
func (rf *ReportingFramework) CreateMeteringReport(report *metering.Report) error
func (*ReportingFramework) GetMeteringReport ¶
func (rf *ReportingFramework) GetMeteringReport(name string) (*metering.Report, error)
func (*ReportingFramework) GetMeteringReportDataSource ¶
func (rf *ReportingFramework) GetMeteringReportDataSource(name string) (*metering.ReportDataSource, error)
func (*ReportingFramework) GetMeteringReportQuery ¶
func (rf *ReportingFramework) GetMeteringReportQuery(name string) (*metering.ReportQuery, error)
func (*ReportingFramework) GetPrestoTable ¶
func (rf *ReportingFramework) GetPrestoTable(name string) (*metering.PrestoTable, error)
func (*ReportingFramework) GetReportResults ¶
func (*ReportingFramework) NewSimpleReport ¶
func (rf *ReportingFramework) NewSimpleReport(name, queryName string, schedule *metering.ReportSchedule, reportingStart, reportingEnd *time.Time) *metering.Report
func (*ReportingFramework) PrestoTableExists ¶
func (*ReportingFramework) ReportingOperatorPOSTRequest ¶
func (*ReportingFramework) ReportingOperatorRequest ¶
func (*ReportingFramework) RequireReportDataSourcesForQueryHaveData ¶
func (rf *ReportingFramework) RequireReportDataSourcesForQueryHaveData(t *testing.T, queries []string, collectResp operator.CollectPrometheusMetricsDataResponse)
func (*ReportingFramework) RequireReportQueriesReady ¶
func (*ReportingFramework) RequireReportSuccessfullyRuns ¶
func (*ReportingFramework) StoreDataSourceData ¶
func (rf *ReportingFramework) StoreDataSourceData(dataSourceName string, metrics []*prestostore.PrometheusMetric) error
func (*ReportingFramework) WaitForAllMeteringReportDataSourceTables ¶
func (rf *ReportingFramework) WaitForAllMeteringReportDataSourceTables(t *testing.T, pollInterval, timeout time.Duration) ([]*metering.ReportDataSource, error)
func (*ReportingFramework) WaitForMeteringReportDataSource ¶
func (rf *ReportingFramework) WaitForMeteringReportDataSource(t *testing.T, name string, pollInterval, timeout time.Duration, dsFunc func(ds *metering.ReportDataSource) (bool, error)) (*metering.ReportDataSource, error)
func (*ReportingFramework) WaitForMeteringReportDataSourceTable ¶
func (rf *ReportingFramework) WaitForMeteringReportDataSourceTable(t *testing.T, name string, pollInterval, timeout time.Duration) (*metering.ReportDataSource, error)
func (*ReportingFramework) WaitForMeteringReportQuery ¶
func (rf *ReportingFramework) WaitForMeteringReportQuery(t *testing.T, name string, pollInterval, timeout time.Duration) (*metering.ReportQuery, error)
func (*ReportingFramework) WaitForPrestoTable ¶
func (rf *ReportingFramework) WaitForPrestoTable(t *testing.T, name string, pollInterval, timeout time.Duration, tableFunc func(table *metering.PrestoTable) (bool, error)) (*metering.PrestoTable, error)
func (*ReportingFramework) WaitForReportDataSourcePrestoTable ¶
func (rf *ReportingFramework) WaitForReportDataSourcePrestoTable(t *testing.T, ds *metering.ReportDataSource, pollInterval, timeout time.Duration) (bool, error)
Click to show internal directories.
Click to hide internal directories.