crunchy_bridge

package
v0.63.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: BSD-2-Clause, BSD-3-Clause, PostgreSQL Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSystemState added in v0.52.3

func GetSystemState(ctx context.Context, server *state.Server, logger *util.Logger) (system state.SystemState)

GetSystemState - Gets system information about a Crunchy Bridge instance

Types

type CPUMetrics added in v0.52.3

type CPUMetrics struct {
	Iowait float64
	System float64
	User   float64
	Steal  float64
}

type Client added in v0.52.3

type Client struct {
	http.Client

	BaseURL     string
	BearerToken string
	ClusterID   string
}

func (*Client) GetCPUMetrics added in v0.52.3

func (c *Client) GetCPUMetrics(ctx context.Context) (*CPUMetrics, error)

func (*Client) GetClusterInfo added in v0.52.3

func (c *Client) GetClusterInfo(ctx context.Context) (*ClusterInfo, error)

func (*Client) GetDiskUsageMetrics added in v0.52.3

func (c *Client) GetDiskUsageMetrics(ctx context.Context) (*DiskUsageMetrics, error)

func (*Client) GetIOPSMetrics added in v0.52.3

func (c *Client) GetIOPSMetrics(ctx context.Context) (*IOPSMetrics, error)

func (*Client) GetLoadAverageMetrics added in v0.52.3

func (c *Client) GetLoadAverageMetrics(ctx context.Context) (*LoadAverageMetrics, error)

func (*Client) GetMemoryMetrics added in v0.52.3

func (c *Client) GetMemoryMetrics(ctx context.Context) (*MemoryMetrics, error)

func (*Client) NewRequest added in v0.52.3

func (c *Client) NewRequest(ctx context.Context, method string, path string) (*http.Request, error)

type ClusterInfo added in v0.52.3

type ClusterInfo struct {
	CPU        int32       `json:"cpu"`
	CreatedAt  string      `json:"created_at"`
	Memory     float32     `json:"memory"`
	Name       string      `json:"name"`
	ParentID   null.String `json:"parent_id"`
	PlanID     string      `json:"plan_id"`
	ProviderID string      `json:"provider_id"`
	RegionID   string      `json:"region_id"`
	Storage    int32       `json:"storage"`
}

type DiskUsageMetrics added in v0.52.3

type DiskUsageMetrics struct {
	DatabaseSize uint64
	LogSize      uint64
	WalSize      uint64
}

type IOPSMetrics added in v0.52.3

type IOPSMetrics struct {
	Writes float64
	Reads  float64
}

type LoadAverageMetrics added in v0.52.3

type LoadAverageMetrics struct {
	One float64
}

type MemoryMetrics added in v0.52.3

type MemoryMetrics struct {
	MemoryUsedPct float64
	SwapUsedPct   float64
}

type MetricPoint added in v0.52.3

type MetricPoint struct {
	Time  string  `json:"time"`
	Value float64 `json:"value"`
}

type MetricSeries added in v0.52.3

type MetricSeries struct {
	IsEmpty bool          `json:"is_empty"`
	Name    string        `json:"name"`
	Points  []MetricPoint `json:"points"`
	Title   string        `json:"title"`
}

type MetricViews added in v0.52.3

type MetricViews struct {
	Name   string         `json:"name"`
	Series []MetricSeries `json:"series"`
}

Jump to

Keyboard shortcuts

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