helpers

package
v0.6.156 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrErrNewDynamicClientGeneratorCode    = "1200"
	ErrInvalidK8SConfigCode                = "1201"
	ErrClientConfigCode                    = "1202"
	ErrFetchKubernetesNodesCode            = "1203"
	ErrFetchNodesCode                      = "1204"
	ErrFetchKubernetesVersionCode          = "1205"
	ErrScanKubernetesCode                  = "1206"
	ErrRetrievePodListCode                 = "1207"
	ErrDetectServiceForDeploymentImageCode = "1208"
	ErrRetrieveNamespacesListCode          = "1209"
	ErrGetNamespaceDeploymentsCode         = "1210"
	ErrDetectServiceWithNameCode           = "1211"
	ErrGeneratingLoadTestCode              = "1212"
	ErrRunningTestCode                     = "1213"
	ErrConvertingResultToMapCode           = "1214"
	ErrGrpcSupportCode                     = "1216"
	ErrStartingNighthawkServerCode         = "1217"
	ErrTransformingDataCode                = "1218"
	ErrRunningNighthawkServerCode          = "1219"
	ErrAddAndValidateExtraHeaderCode       = "1220"
	ErrInClusterConfigCode                 = "1221"
	ErrNewKubeClientGeneratorCode          = "1222"
	ErrRestConfigFromKubeConfigCode        = "1223"
	ErrNewKubeClientCode                   = "1224"
	ErrAdapterInsufficientInformationCode  = "1226"
	ErrDeployingAdapterInK8sEnvCode        = "1227"
	ErrUnDeployingAdapterInK8sEnvCode      = "1228"
	ErrDeployingAdapterInDockerEnvCode     = "1229"
	ErrUnDeployingAdapterInDockerEnvCode   = "1230"
	ErrDeployingAdapterCode                = "1231"
	ErrUnDeployingAdapterCode              = "1232"
	ErrClientSetCode                       = "1233"
)

Please reference the following before contributing an error code: https://docs.meshery.io/project/contributing/contributing-error https://github.com/meshery/meshkit/blob/master/errors/errors.go

Variables

View Source
var TelemetryComps = []string{
	"prometheus", "grafana",
}

Functions

func ErrAddAndValidateExtraHeader

func ErrAddAndValidateExtraHeader(err error) error

func ErrClientConfig

func ErrClientConfig(err error) error

func ErrClientSet

func ErrClientSet(err error) error

func ErrConvertingResultToMap

func ErrConvertingResultToMap(err error) error

func ErrDeployingAdapterInDocker added in v0.6.120

func ErrDeployingAdapterInDocker(err error) error

func ErrDeployingAdapterInK8s added in v0.6.120

func ErrDeployingAdapterInK8s(err error) error

func ErrDeployingAdapterInUnknownPlatform added in v0.6.120

func ErrDeployingAdapterInUnknownPlatform(err error) error

func ErrDetectServiceForDeploymentImage

func ErrDetectServiceForDeploymentImage(err error) error

func ErrDetectServiceWithName

func ErrDetectServiceWithName(err error) error

func ErrFetchKubernetesNodes

func ErrFetchKubernetesNodes(err error) error

func ErrFetchKubernetesVersion

func ErrFetchKubernetesVersion(err error) error

func ErrFetchNodes

func ErrFetchNodes(err error) error

func ErrGeneratingLoadTest

func ErrGeneratingLoadTest(err error) error

func ErrGetNamespaceDeployments

func ErrGetNamespaceDeployments(err error, obj string) error

func ErrGrpcSupport

func ErrGrpcSupport(err error, obj string) error

func ErrInClusterConfig

func ErrInClusterConfig(err error) error

func ErrInvalidK8SConfig

func ErrInvalidK8SConfig(err error) error

func ErrNewDynamicClientGenerator

func ErrNewDynamicClientGenerator(err error) error

func ErrNewKubeClient

func ErrNewKubeClient(err error) error

func ErrNewKubeClientGenerator

func ErrNewKubeClientGenerator(err error) error

func ErrRestConfigFromKubeConfig

func ErrRestConfigFromKubeConfig(err error) error

func ErrRetrieveNamespacesList

func ErrRetrieveNamespacesList(err error) error

func ErrRetrievePodList

func ErrRetrievePodList(err error) error

func ErrRunningNighthawkServer

func ErrRunningNighthawkServer(err error) error

func ErrRunningTest

func ErrRunningTest(err error) error

func ErrScanKubernetes

func ErrScanKubernetes(err error) error

func ErrStartingNighthawkServer

func ErrStartingNighthawkServer(err error) error

func ErrTransformingData

func ErrTransformingData(err error) error

func ErrUnDeployingAdapterInDocker added in v0.6.120

func ErrUnDeployingAdapterInDocker(err error) error

func ErrUnDeployingAdapterInK8s added in v0.6.120

func ErrUnDeployingAdapterInK8s(err error) error

func ErrUnDeployingAdapterInUnknownPlatform added in v0.6.120

func ErrUnDeployingAdapterInUnknownPlatform(err error) error

func FetchKubernetesNodes

func FetchKubernetesNodes(kubeconfig []byte, contextName string) ([]*models.K8SNode, error)

FetchKubernetesNodes - function used to fetch nodes metadata

func FetchKubernetesVersion

func FetchKubernetesVersion(kubeconfig []byte, contextName string) (string, error)

FetchKubernetesVersion - function used to fetch kubernetes server version

func FlattenMinifyKubeConfig

func FlattenMinifyKubeConfig(config []byte) ([]byte, error)

func FortioLoadTest

func FortioLoadTest(opts *models.LoadTestOptions) (map[string]interface{}, *periodic.RunnerResults, error)

FortioLoadTest is the actual code which invokes Fortio to run the load test

func MergeStringMaps

func MergeStringMaps(maps ...map[string]string) map[string]string

func NestedMapExplorer

func NestedMapExplorer(
	mp map[interface{}]interface{},
	fn func(key interface{}, value interface{}) (interface{}, interface{}),
)

func NighthawkLoadTest

func NighthawkLoadTest(opts *models.LoadTestOptions) (map[string]interface{}, *periodic.RunnerResults, error)

NighthawkLoadTest is the actual code which invokes nighthawk to run the load test

func ResolveFSRef

func ResolveFSRef(path string) (string, error)

func ScanKubernetes

func ScanKubernetes(kubeconfig []byte, contextName string) (map[string][]corev1.Pod, error)

ScanKubernetes scans kubernetes to find the pods for each service mesh

func WRK2LoadTest

func WRK2LoadTest(opts *models.LoadTestOptions) (map[string]interface{}, *periodic.RunnerResults, error)

WRK2LoadTest is the actual code which invokes Wrk2 to run the load test

Types

type AdaptersTracker

type AdaptersTracker struct {
	// contains filtered or unexported fields
}

AdaptersTracker is used to hold the list of known adapters

func NewAdaptersTracker

func NewAdaptersTracker(adapterURLs []string) *AdaptersTracker

NewAdaptersTracker returns an instance of AdaptersTracker

func (*AdaptersTracker) AddAdapter

func (a *AdaptersTracker) AddAdapter(_ context.Context, adapter models.Adapter)

AddAdapter is used to add new adapters to the collection

func (*AdaptersTracker) DeployAdapter added in v0.6.82

func (a *AdaptersTracker) DeployAdapter(ctx context.Context, adapter models.Adapter) error

AddAdapter is used to add new adapters to the collection

func (*AdaptersTracker) GetAdapters

func (a *AdaptersTracker) GetAdapters(_ context.Context) []models.Adapter

GetAdapters returns the list of existing adapters

func (*AdaptersTracker) RemoveAdapter

func (a *AdaptersTracker) RemoveAdapter(_ context.Context, adapter models.Adapter)

RemoveAdapter is used to remove existing adapters from the collection

func (*AdaptersTracker) UndeployAdapter added in v0.6.82

func (a *AdaptersTracker) UndeployAdapter(ctx context.Context, adapter models.Adapter) error

RemoveAdapter is used to remove existing adapters from the collection

type HTTPRunnerResults added in v0.6.91

type HTTPRunnerResults fhttp.HTTPRunnerResults

func (*HTTPRunnerResults) UnmarshalJSON added in v0.6.91

func (r *HTTPRunnerResults) UnmarshalJSON(data []byte) error

type UUIDQueryTracker

type UUIDQueryTracker struct {
	// contains filtered or unexported fields
}

UUIDQueryTracker tracks queries for a load test UUID

func NewUUIDQueryTracker

func NewUUIDQueryTracker() *UUIDQueryTracker

NewUUIDQueryTracker creates a new instance of UUIDQueryTracker

func (*UUIDQueryTracker) AddOrFlagQuery

func (a *UUIDQueryTracker) AddOrFlagQuery(_ context.Context, uuid, query string, flag bool)

AddOrFlagQuery either adds a new query or flags an existing one

func (*UUIDQueryTracker) GetQueriesForUUID

func (a *UUIDQueryTracker) GetQueriesForUUID(_ context.Context, uuid string) map[string]bool

GetQueriesForUUID retrieves queries for UUID

func (*UUIDQueryTracker) RemoveUUID

func (a *UUIDQueryTracker) RemoveUUID(_ context.Context, uuid string)

RemoveUUID removes an existing UUID from the collection

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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