biller

package
v0.0.0-...-6ecb9a7 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2021 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBillerOutput

func CreateBillerOutput(teamId uint) chan decimal.Decimal

func CreateStatsOutput

func CreateStatsOutput(appId uint) chan ProcessedOutput

func RemoveBillerOutput

func RemoveBillerOutput(teamId uint, ch chan decimal.Decimal)

func RemoveStatsOutput

func RemoveStatsOutput(appId uint, ch chan ProcessedOutput)

func StartBillerFromCID

func StartBillerFromCID(app db.App, team db.Team, cid string) error

func StartBilling

func StartBilling(conn *dokku.DokkuConn) error

func StartBillingApp

func StartBillingApp(conn *dokku.DokkuConn, app db.App) error

func StopBiller

func StopBiller(appId uint)

Types

type BillerEvent

type BillerEvent struct {
	NewContainerId string
	Delete         bool
}

type ProcessedOutput

type ProcessedOutput struct {
	Timestamp       time.Time
	MemUsage        decimal.Decimal
	MemUsagePercent float64
	CpuUsage        decimal.Decimal
	CpuUsagePercent float64
}

type Stats

type Stats struct {
	Read     time.Time `json:"read"`
	CpuStats struct {
		CpuUsage struct {
			PercpuUsage []interface{} `json:"percpu_usage"`
			TotalUsage  int64         `json:"total_usage"`
		} `json:"cpu_usage"`
		SystemCpuUsage int64 `json:"system_cpu_usage"`
		OnlineCpus     int64 `json:"online_cpus"`
	} `json:"cpu_stats"`
	PrecpuStats struct {
		CpuUsage struct {
			TotalUsage int64 `json:"total_usage"`
		} `json:"cpu_usage"`
		SystemCpuUsage int64 `json:"system_cpu_usage"`
		OnlineCpus     int64 `json:"online_cpus"`
	} `json:"precpu_stats"`
	MemoryStats struct {
		Stats struct {
			Cache int64 `json:"cache"`
		} `json:"stats"`
		Usage int64 `json:"usage"`
		Limit int64 `json:"limit"`
	} `json:"memory_stats"`
}

func (*Stats) Process

func (stat *Stats) Process() ProcessedOutput

Jump to

Keyboard shortcuts

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