shepherd_unittest

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Platform

type Platform struct {
	// Contains the response string for a given type of a request
	DockerAppMetrics     string
	DockerClusterMetrics string
	DockerContainerPid   string
	CatContainerNetData  string
	DockerPsSizeData     string
	// Cloudlet-level test data
	CloudletMetrics    string
	VmAppInstMetrics   string
	FailPlatformClient bool
	Ncpus              string
}

func (*Platform) GetClusterIP

func (s *Platform) GetClusterIP(ctx context.Context, clusterInst *edgeproto.ClusterInst) (string, error)

func (*Platform) GetClusterPlatformClient

func (s *Platform) GetClusterPlatformClient(ctx context.Context, clusterInst *edgeproto.ClusterInst, clientType string) (ssh.Client, error)

func (*Platform) GetMetricsCollectInterval

func (s *Platform) GetMetricsCollectInterval() time.Duration

func (*Platform) GetPlatformStats

func (s *Platform) GetPlatformStats(ctx context.Context) (shepherd_common.CloudletMetrics, error)

Query local system for the resource usage

func (*Platform) GetVmAppRootLbClient

func (s *Platform) GetVmAppRootLbClient(ctx context.Context, appInst *edgeproto.AppInst) (ssh.Client, error)

func (*Platform) GetVmStats

func (*Platform) Init

func (s *Platform) Init(ctx context.Context, pc *platform.PlatformConfig, caches *platform.Caches) error

func (*Platform) IsPlatformLocal

func (s *Platform) IsPlatformLocal(ctx context.Context) bool

func (*Platform) SetUsageAccessArgs

func (s *Platform) SetUsageAccessArgs(ctx context.Context, addr string, client ssh.Client) error

func (*Platform) SetVMPool

func (s *Platform) SetVMPool(ctx context.Context, vmPool *edgeproto.VMPool)

func (*Platform) VmAppChangedCallback

func (s *Platform) VmAppChangedCallback(ctx context.Context, appInst *edgeproto.AppInst, newState edgeproto.TrackedState)

type UTClient

type UTClient struct {
	pc.LocalClient
	// contains filtered or unexported fields
}

UTClient hijacks a set of commands and returns predetermined output For all other commands it just calls pc.LocalClient equivalents

func (*UTClient) Output

func (s *UTClient) Output(command string) (string, error)

func (*UTClient) OutputWithTimeout

func (s *UTClient) OutputWithTimeout(command string, timeout time.Duration) (string, error)

Jump to

Keyboard shortcuts

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