mesh

package
v0.6.51 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ErrGettingSessionDataCode                = "1009"
	ErrNoAdaptersCode                        = "1010"
	ErrPromptCode                            = "1011"
	ErrCreatingDeployRequestCode             = "1012"
	ErrCreatingDeployResponseRequestCode     = "1013"
	ErrAddingAuthDetailsCode                 = "1014"
	ErrCreatingDeployResponseStreamCode      = "1015"
	ErrTimeoutWaitingForDeployResponseCode   = "1016"
	ErrFailedDeployingMeshCode               = "1017"
	ErrCreatingValidateRequestCode           = "1018"
	ErrCreatingValidateResponseRequestCode   = "1019"
	ErrTimeoutWaitingForValidateResponseCode = "1020"
	ErrSMIConformanceTestsFailedCode         = "1021"
)

Variables

View Source
var (
	// no adapters found
	ErrNoAdapters = errors.New(ErrNoAdaptersCode, errors.Fatal, []string{"Adapter for required mesh not found"}, []string{"Adapter for required mesh not found"}, []string{""}, []string{"Deploy the proper Meshery Adapter for your service mesh"})

	ErrFailedDeployingMesh = errors.New(ErrFailedDeployingMeshCode, errors.Fatal, []string{"Failed to deploy the service mesh"}, []string{"Failed to deploy the service mesh"}, []string{}, []string{"Check your environment and try again"})

	ErrTimeoutWaitingForDeployResponse = errors.New(ErrTimeoutWaitingForDeployResponseCode, errors.Fatal, []string{"Timed out waiting for deploy event"}, []string{"Timed out waiting for deployment"}, []string{}, []string{"Check your environment and try again"})

	ErrTimeoutWaitingForValidateResponse = errors.New(ErrTimeoutWaitingForValidateResponseCode, errors.Fatal, []string{"Timed out waiting for validate response"}, []string{"Timed out waiting for validate response"}, []string{""}, []string{"Check your environment and try again"})

	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: "Service Mesh Lifecycle Management",
		Long:  "Provisioning, configuration, and on-going operational management of service meshes",
		PersistentPreRunE: func(cmd *cobra.Command, args []string) error {

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

			mctlCfg, err = config.GetMesheryCtl(viper.GetViper())
			if err != nil {
				log.Fatalln(err)
			}

			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 {
				log.Fatalln(err)
			}

			if err = validateAdapter(mctlCfg, meshName); err != nil {
				log.Fatalln(err)
			}
			return nil
		},
	}
)

MeshCmd represents the Performance Management CLI command

Functions

func ErrAddingAuthDetails added in v0.5.46

func ErrAddingAuthDetails(err error) error

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

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