clickhouse

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClickHouseHandler

type ClickHouseHandler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(doer doer) ClickHouseHandler

func (*ClickHouseHandler) ServiceClickHouseDatabaseCreate

func (h *ClickHouseHandler) ServiceClickHouseDatabaseCreate(ctx context.Context, project string, serviceName string, in *ServiceClickHouseDatabaseCreateIn) error

func (*ClickHouseHandler) ServiceClickHouseDatabaseDelete

func (h *ClickHouseHandler) ServiceClickHouseDatabaseDelete(ctx context.Context, project string, serviceName string, database string) error

func (*ClickHouseHandler) ServiceClickHouseQueryStats

func (h *ClickHouseHandler) ServiceClickHouseQueryStats(ctx context.Context, project string, serviceName string) ([]QueryOut, error)

func (*ClickHouseHandler) ServiceClickHouseTieredStorageSummary

func (h *ClickHouseHandler) ServiceClickHouseTieredStorageSummary(ctx context.Context, project string, serviceName string) (*ServiceClickHouseTieredStorageSummaryOut, error)

type Handler

type Handler interface {
	// ServiceClickHouseDatabaseCreate create a database
	// POST /project/{project}/service/{service_name}/clickhouse/db
	// https://api.aiven.io/doc/#tag/Service:_ClickHouse/operation/ServiceClickHouseDatabaseCreate
	ServiceClickHouseDatabaseCreate(ctx context.Context, project string, serviceName string, in *ServiceClickHouseDatabaseCreateIn) error

	// ServiceClickHouseDatabaseDelete delete a database
	// DELETE /project/{project}/service/{service_name}/clickhouse/db/{database}
	// https://api.aiven.io/doc/#tag/Service:_ClickHouse/operation/ServiceClickHouseDatabaseDelete
	ServiceClickHouseDatabaseDelete(ctx context.Context, project string, serviceName string, database string) error

	// ServiceClickHouseQueryStats return statistics on recent queries
	// GET /project/{project}/service/{service_name}/clickhouse/query/stats
	// https://api.aiven.io/doc/#tag/Service:_ClickHouse/operation/ServiceClickHouseQueryStats
	ServiceClickHouseQueryStats(ctx context.Context, project string, serviceName string) ([]QueryOut, error)

	// ServiceClickHouseTieredStorageSummary get the ClickHouse tiered storage summary
	// GET /project/{project}/service/{service_name}/clickhouse/tiered-storage/summary
	// https://api.aiven.io/doc/#tag/Service:_ClickHouse/operation/ServiceClickHouseTieredStorageSummary
	ServiceClickHouseTieredStorageSummary(ctx context.Context, project string, serviceName string) (*ServiceClickHouseTieredStorageSummaryOut, error)
}

type HourlyOut

type HourlyOut struct {
	EstimatedCost   string `json:"estimated_cost,omitempty"`
	HourStart       string `json:"hour_start"`
	PeakStoredBytes int    `json:"peak_stored_bytes"`
}

type QueryOut

type QueryOut struct {
	Calls      *int     `json:"calls,omitempty"`
	Database   string   `json:"database,omitempty"`
	MaxTime    *int     `json:"max_time,omitempty"`
	MeanTime   *int     `json:"mean_time,omitempty"`
	MinTime    *int     `json:"min_time,omitempty"`
	P95Time    *int     `json:"p95_time,omitempty"`
	Query      string   `json:"query,omitempty"`
	Rows       *float64 `json:"rows,omitempty"`
	StddevTime *int     `json:"stddev_time,omitempty"`
	TotalTime  *int     `json:"total_time,omitempty"`
}

type ServiceClickHouseDatabaseCreateIn

type ServiceClickHouseDatabaseCreateIn struct {
	Database string `json:"database"`
}

type ServiceClickHouseTieredStorageSummaryOut

type ServiceClickHouseTieredStorageSummaryOut struct {
	CurrentCost         string                 `json:"current_cost"`
	ForecastedCost      string                 `json:"forecasted_cost"`
	ForecastedRate      string                 `json:"forecasted_rate,omitempty"`
	StorageUsageHistory StorageUsageHistoryOut `json:"storage_usage_history"`
	TotalStorageUsage   int                    `json:"total_storage_usage"`
}

type StorageUsageHistoryOut

type StorageUsageHistoryOut struct {
	Hourly []HourlyOut `json:"hourly"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL