Documentation
¶
Index ¶
- Constants
- Variables
- func GetProxyKey(appInstKey *edgeproto.AppInstKey) string
- func ShouldRunEnvoy(app *edgeproto.App, appInst *edgeproto.AppInst) bool
- type AppMetrics
- type AppStats
- type CloudletMetrics
- type ClusterMetrics
- type ClusterNetMetrics
- type ClusterStats
- type MetricAppInstKey
- type ProxyMetrics
- type StatsOp
- type StatsOptions
- type TcpConnectionsMetric
- type UdpConnectionsMetric
Constants ¶
View Source
const ShepherdSshConnectTimeout = time.Second * 3
Variables ¶
View Source
var ResTrackerCmd = "resource-tracker"
Prerequisite - install small edge-cloud utility on the VM running this docker containers
View Source
var ShepherdPlatformActive bool
Functions ¶
func GetProxyKey ¶
func GetProxyKey(appInstKey *edgeproto.AppInstKey) string
Types ¶
type AppMetrics ¶
type AppStats ¶
type AppStats interface { // Returns current resource usage for a app instance GetAppStats(ctx context.Context) *AppMetrics }
Common interface to deal with AppMetrics Pending EDGECLOUD-1183 implementation
type CloudletMetrics ¶
type CloudletMetrics struct { CollectTime *types.Timestamp // Total number of CPUs VCpuMax uint64 // Current number of CPUs used VCpuUsed uint64 // Total amount of RAM(in MB) MemMax uint64 // Currently used RAM(in MB) MemUsed uint64 // Total amount of Storage(in GB) DiskUsed uint64 // Currently used Storage(in GB) DiskMax uint64 // Total number of Floating IPs available FloatingIpsMax uint64 // Currently used number of Floating IPs FloatingIpsUsed uint64 // Total KBytes received NetRecv uint64 // Total KBytes sent NetSent uint64 // Total available IP addresses Ipv4Max uint64 // Currently used IP addrs Ipv4Used uint64 }
This structure represents cloudlet utilization stats It tracks the Max Available and currently used set of resources
type ClusterMetrics ¶
type ClusterMetrics struct { Cpu float64 CpuTS *types.Timestamp Mem float64 MemTS *types.Timestamp Disk float64 DiskTS *types.Timestamp TcpConns uint64 TcpConnsTS *types.Timestamp TcpRetrans uint64 TcpRetransTS *types.Timestamp UdpSent uint64 UdpSentTS *types.Timestamp UdpRecv uint64 UdpRecvTS *types.Timestamp UdpRecvErr uint64 UdpRecvErrTS *types.Timestamp AutoScaleCpu float64 AutoScaleMem float64 }
type ClusterNetMetrics ¶
type ClusterStats ¶
type ClusterStats interface { // Returns current resource usage for a cluster instance GetClusterStats(ctx context.Context, ops ...StatsOp) *ClusterMetrics GetAppStats(ctx context.Context) map[MetricAppInstKey]*AppMetrics GetAlerts(ctx context.Context) []edgeproto.Alert // Track a new AppInst in the cluster. Must be idempotent TrackAppInst(ctx context.Context, appInst *edgeproto.AppInst) // Untrack an AppInst from the cluster. Must be idempotent UntrackAppInst(ctx context.Context, appInst *edgeproto.AppInst) }
Common interface to deal with ClusterMetrics
type MetricAppInstKey ¶
type MetricAppInstKey struct { ClusterKey edgeproto.ClusterKey CloudletKey edgeproto.CloudletKey Pod string AppInstName string AppInstOrg string }
We keep the name of the pod+ClusterKey rather than AppInstKey The reason is that we do not have a way to differentiate between different pods in a k8s cluster See EDGECLOUD-1183
type ProxyMetrics ¶
type StatsOp ¶
type StatsOp func(opts *StatsOptions)
func WithAutoScaleStats ¶
func WithAutoScaleStats() StatsOp
type StatsOptions ¶
type StatsOptions struct {
GetAutoScaleStats bool
}
func GetStatsOptions ¶
func GetStatsOptions(ops []StatsOp) *StatsOptions
type TcpConnectionsMetric ¶
Click to show internal directories.
Click to hide internal directories.