shepherd_platform

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Platform

type Platform interface {
	// Init is called once during shepherd startup.
	Init(ctx context.Context, pc *platform.PlatformConfig, caches *platform.Caches) error
	// Set VMPool in cache
	SetVMPool(ctx context.Context, vmPool *edgeproto.VMPool)
	// Gets the IP for a cluster
	GetClusterIP(ctx context.Context, clusterInst *edgeproto.ClusterInst) (string, error)
	// Gets a platform client to be able to run commands against (mainly for curling the prometheuses)
	GetClusterPlatformClient(ctx context.Context, clusterInst *edgeproto.ClusterInst, clientType string) (ssh.Client, error)
	// Gets a rootLb ssh client for VM apps
	GetVmAppRootLbClient(ctx context.Context, appInst *edgeproto.AppInst) (ssh.Client, error)
	// Gets cloudlet-level metrics. This is platform-dependent, hence the common interfcae
	GetPlatformStats(ctx context.Context) (shepherd_common.CloudletMetrics, error)
	// Get VM metrics - this is really a set of AppMetrics
	GetVmStats(ctx context.Context, key *edgeproto.AppInstKey) (shepherd_common.AppMetrics, error)
	// Get Platform Specific collection time. If the platform doesn't have periodic collection, it will return 0
	GetMetricsCollectInterval() time.Duration
	// Inform the platform that a VM App was added or deleted
	VmAppChangedCallback(ctx context.Context, appInst *edgeproto.AppInst, newState edgeproto.TrackedState)
	// Set Prometheus address. For platforms that rely on prometheus to gather cloudlet stats
	SetUsageAccessArgs(ctx context.Context, addr string, client ssh.Client) error
	// Check if the platform is running locally
	IsPlatformLocal(ctx context.Context) bool
}

Platform abstracts the underlying cloudlet platform.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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