handlers

package
v0.0.0-...-d38f34e Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HealthCheckHandler

func HealthCheckHandler(w http.ResponseWriter, r *http.Request)

func ListDatabaseHandler

func ListDatabaseHandler(w http.ResponseWriter, r *http.Request)

func RetrieveDatabaseHandler

func RetrieveDatabaseHandler(w http.ResponseWriter, r *http.Request)

Types

type ListDatabaseInfo

type ListDatabaseInfo struct {
	ID      string            `json:"id"`
	Name    string            `json:"name"`
	Status  string            `json:"status"`
	State   string            `json:"state"`
	Image   string            `json:"image"`
	Created int64             `json:"created"`
	Labels  map[string]string `json:"labels"`
}

type MemoryStats

type MemoryStats struct {
	Used  float64 `json:"used_mb"`
	Total float64 `json:"total_mb"`
}

type RetrieveDatabaseInfo

type RetrieveDatabaseInfo struct {
	ID           string            `json:"id"`
	Name         string            `json:"name"`
	Image        string            `json:"image"`
	Status       string            `json:"status"`
	CPUUsage     float64           `json:"cpu_usage"`
	MemoryUsage  MemoryStats       `json:"memory_usage"`
	StorageUsage StorageStats      `json:"storage_usage"`
	Ports        map[string]string `json:"ports,omitempty"`
	Volumes      []VolumeInfo      `json:"volumes,omitempty"`
}

type StorageStats

type StorageStats struct {
	Used  uint64 `json:"used_bytes"`
	Total uint64 `json:"total_bytes"`
}

type VolumeInfo

type VolumeInfo struct {
	Source string `json:"source"`
	Target string `json:"target"`
}

Jump to

Keyboard shortcuts

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