Documentation ¶
Index ¶
- Constants
- Variables
- func ErrApplyManifest(err error, deleteStatus, updateStatus bool) error
- func ErrApplyOperatorManifest(err error, deleteStatus, updateStatus bool) error
- func ErrContextContent() error
- func ErrCreateDir(err error, obj string) error
- func ErrCreateManifestsFolder(err error) error
- func ErrCreatingDockerClient(err error) error
- func ErrDownloadFile(err error, obj string) error
- func ErrFailedGetEphemeralPort(err error) error
- func ErrGetCurrentContext(err error) error
- func ErrHealthCheckFailed(err error) error
- func ErrInitPortForward(err error) error
- func ErrK8SQuery(err error) error
- func ErrK8sConfig(err error) error
- func ErrProviderInfo(err error) error
- func ErrResetMeshconfig(err error) error
- func ErrRestartMeshery(err error) error
- func ErrRetrievingCurrentContext(err error) error
- func ErrRunPortForward(err error) error
- func ErrSetCurrentContext(err error) error
- func ErrSettingDefaultContextToConfig(err error) error
- func ErrSettingTemporaryContext(err error) error
- func ErrStopMeshery(err error) error
- func ErrSwitchChannelResponse() error
- func ErrTokenContext(err error) error
- func ErrUnmarshalDockerCompose(err error, obj string) error
- func ErrUnmarshallConfig(err error) error
- func ErrUnsupportedPlatform(platform string, config string) error
- func ErrUploadFileParams(err error) error
- func ErrValidProvider() error
- func ErrWriteConfig(err error) error
- func FormatErrorReference() string
- func IsBetaOrStable(str string) bool
- func IsPodRequired(requiredPods []string, pod string) bool
- func PrintChannelAndVersionToStdout(ctx config.Context, contextName string) string
- func PrintProviderToStdout(ctx config.Context, contextName string) string
- type HealthCheckOptions
- type HealthChecker
Constants ¶
const ( ErrHealthCheckFailedCode = "1133" ErrDownloadFileCode = "1134" ErrStopMesheryCode = "1135" ErrResetMeshconfigCode = "1136" ErrApplyManifestCode = "1137" ErrApplyOperatorManifestCode = "1138" ErrCreateDirCode = "1139" ErrUnsupportedPlatformCode = "1140" ErrRetrievingCurrentContextCode = "1141" ErrSettingDefaultContextToConfigCode = "1142" ErrSettingTemporaryContextCode = "1143" ErrCreateManifestsFolderCode = "1144" ErrRestartMesheryCode = "1145" ErrK8sQueryCode = "1146" ErrK8sConfigCode = "1147" ErrInitPortForwardCode = "1148" ErrRunPortForwardCode = "1149" ErrFailedGetEphemeralPortCode = "1150" ErrUnmarshalDockerComposeCode = "1151" ErrCreatingDockerClientCode = "1152" ErrWriteConfigCode = "1153" ErrContextContentCode = "1154" ErrSwitchChannelResponseCode = "1155" ErrGetCurrentContextCode = "1156" ErrSetCurrentContextCode = "1157" ErrTokenContextCode = "1158" ErrProviderInfoCode = "1159" ErrValidProviderCode = "1160" ErrUnmarshallConfigCode = "1161" ErrUploadFileParamsCode = "1162" )
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
const BYTE_SIZE = 2000
Variables ¶
var ContextCmd = &cobra.Command{ Use: "context [command]", Short: "Configure your Meshery deployment(s)", Long: `Configure and switch between different named Meshery server and component versions and deployments.`, Example: ` // Base command mesheryctl system context `, RunE: func(cmd *cobra.Command, args []string) error { if len(args) == 0 { _ = cmd.Help() os.Exit(0) } if ok := utils.IsValidSubcommand(availableSubcommands, args[0]); !ok { return errors.New(utils.SystemContextSubError(fmt.Sprintf("'%s' is an invalid command. Include one of these arguments: [ create | delete | list | switch | view ]. Use 'mesheryctl system context --help' to display sample usage.\n", args[0]), "context")) } return nil }, }
ContextCmd represents the context command
var ModelCmd = &cobra.Command{ Use: "model", Short: "View list of models and detail of models", Long: `View list of models and detailed information of a specific model`, Example: ` // To view list of components mesheryctl exp model list // To view a specific model mesheryctl exp model view [model-name] `, PreRunE: func(cmd *cobra.Command, args []string) error { mctlCfg, err := config.GetMesheryCtl(viper.GetViper()) if err != nil { return err } err = utils.IsServerRunning(mctlCfg.GetBaseMesheryURL()) if err != nil { return err } ctx, err := mctlCfg.GetCurrentContext() if err != nil { return err } err = ctx.ValidateVersion() if err != nil { return err } return nil }, RunE: func(cmd *cobra.Command, args []string) error { if len(args) == 0 { return cmd.Help() } if ok := utils.IsValidSubcommand(availableSubcommands, args[0]); !ok { return errors.New(utils.SystemModelSubError(fmt.Sprintf("'%s' is an invalid subcommand. Please provide required options from [view]. Use 'mesheryctl exp model --help' to display usage guide.\n", args[0]), "model")) } _, err := config.GetMesheryCtl(viper.GetViper()) if err != nil { log.Fatalln(err, "error processing config") } err = viewProviderCmd.RunE(cmd, args) if err != nil { return err } err = cmd.Usage() if err != nil { return err } return nil }, }
ModelCmd represents the `mesheryctl exp model` command
var SystemCmd = &cobra.Command{ Use: "system", Short: "Meshery Lifecycle Management", Long: `Manage the state and configuration of Meshery server, components, and client.`, RunE: func(cmd *cobra.Command, args []string) error { if len(args) == 0 { return cmd.Help() } if ok := utils.IsValidSubcommand(availableSubcommands, args[0]); !ok { return errors.New(utils.SystemError(fmt.Sprintf("'%s' is an invalid command. Use 'mesheryctl system --help' to display usage guide.\n", args[0]))) } mctlCfg, err := config.GetMesheryCtl(viper.GetViper()) if err != nil { utils.Log.Error(err) return nil } mctlCfg.GetBaseMesheryURL() return nil }, }
SystemCmd represents Meshery Lifecycle Management cli commands
Functions ¶
func ErrApplyManifest ¶ added in v0.5.46
func ErrApplyOperatorManifest ¶ added in v0.5.46
func ErrContextContent ¶ added in v0.6.137
func ErrContextContent() error
func ErrCreateDir ¶ added in v0.5.46
func ErrCreateManifestsFolder ¶ added in v0.5.54
func ErrCreatingDockerClient ¶ added in v0.6.86
func ErrDownloadFile ¶ added in v0.5.39
func ErrFailedGetEphemeralPort ¶ added in v0.6.2
func ErrGetCurrentContext ¶ added in v0.6.137
func ErrHealthCheckFailed ¶ added in v0.5.39
func ErrInitPortForward ¶ added in v0.6.2
func ErrK8SQuery ¶ added in v0.6.2
func ErrK8sConfig ¶ added in v0.6.2
func ErrProviderInfo ¶ added in v0.6.137
func ErrResetMeshconfig ¶ added in v0.5.46
func ErrRestartMeshery ¶ added in v0.5.54
func ErrRetrievingCurrentContext ¶ added in v0.5.54
func ErrRunPortForward ¶ added in v0.6.2
func ErrSetCurrentContext ¶ added in v0.6.137
func ErrSettingDefaultContextToConfig ¶ added in v0.6.2
func ErrSettingTemporaryContext ¶ added in v0.5.54
func ErrStopMeshery ¶ added in v0.5.46
func ErrSwitchChannelResponse ¶ added in v0.6.137
func ErrSwitchChannelResponse() error
func ErrTokenContext ¶ added in v0.6.137
func ErrUnmarshalDockerCompose ¶ added in v0.6.132
func ErrUnmarshallConfig ¶ added in v0.6.137
func ErrUnsupportedPlatform ¶ added in v0.5.46
func ErrUploadFileParams ¶ added in v0.6.137
func ErrValidProvider ¶ added in v0.6.137
func ErrValidProvider() error
func ErrWriteConfig ¶ added in v0.6.137
func FormatErrorReference ¶ added in v0.6.137
func FormatErrorReference() string
A Format reference that returns Mesheryctl's URL docs for system command and sub commands
func IsBetaOrStable ¶ added in v0.5.1
IsBetaOrStable to determine which release channel is being used
func IsPodRequired ¶ added in v0.5.64
IsPodRequired checks if a given pod is specified in the required pods
func PrintChannelAndVersionToStdout ¶ added in v0.5.1
PrintChannelAndVersionToStdout to return current release channel details
Types ¶
type HealthCheckOptions ¶ added in v0.5.33
type HealthCheckOptions struct { // PrintLogs to keep incheck to print logs during a healthcheck PrintLogs bool // IsPreRunE to keep incheck if healthchecks are triggered as as a PreRunE IsPreRunE bool // the command under which the healthchecks are being triggered Subcommand string // if RunDockerChecks is true we run docker checks RunDockerChecks bool // if RunKubernetesChecks is true we run k8s checks RunKubernetesChecks bool // if RunVersionChecks is true we run version checks RunVersionChecks bool // if RunComponentChecks is true we run component checks RunComponentChecks bool // if RunOperatorChecks is true we run operator checks RunOperatorChecks bool }
type HealthChecker ¶ added in v0.5.33
type HealthChecker struct { Options *HealthCheckOptions // contains filtered or unexported fields }
func NewHealthChecker ¶ added in v0.5.33
func NewHealthChecker(options *HealthCheckOptions) (*HealthChecker, error)
func (*HealthChecker) Run ¶ added in v0.5.33
func (hc *HealthChecker) Run() error
Run triggers all the healthchecks according to the requirements defined from struct HealthChecks
func (*HealthChecker) RunPreflightHealthChecks ¶ added in v0.5.33
func (hc *HealthChecker) RunPreflightHealthChecks() error
Run preflight healthchecks to verify environment health