mesh

package
v0.7.20 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrGettingSessionDataCode                = "1098"
	ErrNoAdaptersCode                        = "1099"
	ErrPromptCode                            = "1100"
	ErrCreatingDeployRequestCode             = "1101"
	ErrCreatingDeployResponseRequestCode     = "1102"
	ErrCreatingDeployResponseStreamCode      = "1103"
	ErrCreatingValidateResponseStreamCode    = "1104"
	ErrTimeoutWaitingForDeployResponseCode   = "1105"
	ErrFailedDeployingMeshCode               = "1106"
	ErrCreatingValidateRequestCode           = "1107"
	ErrCreatingValidateResponseRequestCode   = "1108"
	ErrTimeoutWaitingForValidateResponseCode = "1109"
	ErrSMIConformanceTestsFailedCode         = "1110"
	ErrValidateAdapterCode                   = "1111"
	ErrSendOperationCode                     = "1112"
	ErrValidMeshNameCode                     = "1113"
	ErrWaitValidateResponseCode              = "1114"
)

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 (
	// no adapters found
	ErrNoAdapters = errors.New(ErrNoAdaptersCode, errors.Fatal,
		[]string{"Unable to validate adapter"},
		[]string{"Adapter for required mesh not found"},
		[]string{"Unable to fetch Mesh adapter, adapter not valid."},
		[]string{"Deploy a proper Meshery Adapter for your service mesh. See https://docs.meshery.io/concepts/architecture/adapters for list of adapters"})

	ErrFailedDeployingMesh = errors.New(ErrFailedDeployingMeshCode, errors.Fatal,
		[]string{"Failed to deploy the service mesh"},
		[]string{"Failed to deploy the service mesh"},
		[]string{"Network error or wrong environment configurations"},
		[]string{"Ensure your have a strong connection and the right environment configuration"})

	ErrTimeoutWaitingForDeployResponse = errors.New(ErrTimeoutWaitingForDeployResponseCode, errors.Fatal,
		[]string{"Timed out waiting for deploy event"},
		[]string{"Timed out waiting for deployment"},
		[]string{"Network error or wrong environment configurations"},
		[]string{"Ensure your have a strong connection and the right environment configuration"})

	ErrTimeoutWaitingForValidateResponse = errors.New(ErrTimeoutWaitingForValidateResponseCode, errors.Fatal,
		[]string{"Timed out waiting for validate response"},
		[]string{"Timed out waiting for validate response"},
		[]string{"Network error or wrong environment configurations"},
		[]string{"Ensure your have a strong connection and the right environment configuration"})

	ErrSMIConformanceTestsFailed = errors.New(ErrSMIConformanceTestsFailedCode, errors.Fatal, []string{"SMI conformance tests failed"}, []string{"SMI conformance tests failed"}, []string{}, []string{"Join https://layer5io.slack.com/archives/C010H0HE2E6"})
)
View Source
var (
	MeshCmd = &cobra.Command{
		Use:   "mesh",
		Short: "Cloud Native Lifecycle Management",
		Long: `Provisioning, configuration, and on-going operational management of service meshes.
	Find more information at: https://docs.meshery.io/reference/mesheryctl#command-reference`,
		PersistentPreRunE: func(cmd *cobra.Command, args []string) error {

			if cmd.HasSubCommands() {
				return cmd.Help()
			}

			mctlCfg, err = config.GetMesheryCtl(viper.GetViper())
			if err != nil {
				utils.Log.Error(err)
				return nil
			}

			if len(args) > 0 {

				r, _ := regexp.Compile(`\W`)

				if len(args) == 1 {
					meshName = strings.ToUpper(args[0])
				}
				meshName = r.ReplaceAllString(strings.ToUpper(strings.Join(args, "_")), "_")
			}

			meshName, err = validateMesh(mctlCfg, meshName)
			if err != nil {
				utils.Log.Error(err)
			}

			if err = validateAdapter(mctlCfg, meshName); err != nil {
				utils.Log.Error(err)
			}
			return nil
		},
	}
)

MeshCmd represents the Performance Management CLI command

Functions

func ErrCreatingDeployRequest added in v0.5.46

func ErrCreatingDeployRequest(err error) error

func ErrCreatingDeployResponseRequest added in v0.5.46

func ErrCreatingDeployResponseRequest(err error) error

func ErrCreatingDeployResponseStream added in v0.5.46

func ErrCreatingDeployResponseStream(err error) error

func ErrCreatingValidateRequest added in v0.5.46

func ErrCreatingValidateRequest(err error) error

func ErrCreatingValidateResponseRequest added in v0.5.46

func ErrCreatingValidateResponseRequest(err error) error

func ErrCreatingValidateResponseStream added in v0.5.46

func ErrCreatingValidateResponseStream(err error) error

func ErrGettingSessionData added in v0.5.46

func ErrGettingSessionData(err error) error

When unable to get release data

func ErrPrompt added in v0.5.46

func ErrPrompt(err error) error

func ErrSendOperation added in v0.6.137

func ErrSendOperation(err error) error

func ErrValidMeshName added in v0.6.137

func ErrValidMeshName(meshName string) error

func ErrValidatingAdapters added in v0.6.137

func ErrValidatingAdapters(err error) error

func ErrWaitValidateResponse added in v0.6.137

func ErrWaitValidateResponse(err error) error

Types

type Operation

type Operation struct {
	Adapter    string `json:"adapter"`
	CustomBody string `json:"customBody"`
	DeleteOp   string `json:"deleteOp"`
	Namespace  string `json:"namespace"`
	Query      string `json:"query"`
}

Operation is the common body type to be passed for Mesh Ops

Jump to

Keyboard shortcuts

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