Documentation ¶
Index ¶
- Constants
- Variables
- func ErrApplyManifest(err error, deleteStatus, updateStatus bool) error
- func ErrApplyOperatorManifest(err error, deleteStatus, updateStatus bool) error
- func ErrCreateDir(err error, obj string) error
- func ErrCreateManifestsFolder(err error) error
- func ErrDownloadFile(err error, obj string) error
- func ErrFailedGetEphemeralPort(err error) error
- func ErrHealthCheckFailed(err error) error
- func ErrInitPortForward(err error) error
- func ErrInvalidComponent(err error, obj string) error
- func ErrK8SQuery(err error) error
- func ErrK8sConfig(err error) error
- func ErrProcessingMctlConfig(err error) error
- func ErrResetMeshconfig(err error) error
- func ErrRestartMeshery(err error) error
- func ErrRetrievingCurrentContext(err error) error
- func ErrRunPortForward(err error) error
- func ErrSettingDefaultContextToConfig(err error) error
- func ErrSettingTemporaryContext(err error) error
- func ErrStopMeshery(err error) error
- func ErrUnmarshal(err error, obj string) error
- func ErrUnsupportedPlatform(platform string, config string) error
- func IsBetaOrStable(str string) bool
- func IsPodRequired(requiredPods []string, pod string) bool
- func PrintChannelAndVersionToStdout(ctx config.Context, contextName string) string
- type HealthCheckOptions
- type HealthChecker
Constants ¶
View Source
const ( ErrHealthCheckFailedCode = "1000" ErrInvalidComponentCode = "1001" ErrDownloadFileCode = "1002" ErrStopMesheryCode = "1003" ErrResetMeshconfigCode = "1004" ErrApplyManifestCode = "1005" ErrApplyOperatorManifestCode = "1006" ErrCreateDirCode = "1007" ErrUnmarshalCode = "1008" ErrUnsupportedPlatformCode = "1009" ErrRetrievingCurrentContextCode = "1022" ErrSettingDefaultContextToConfigCode = "1059" ErrSettingTemporaryContextCode = "1023" ErrCreateManifestsFolderCode = "1024" ErrProcessingMctlConfigCode = "1025" ErrRestartMesheryCode = "1026" ErrK8sQueryCode = "1041" ErrK8sConfigCode = "1042" ErrInitPortForwardCode = "1047" ErrRunPortForwardCode = "1048" ErrFailedGetEphemeralPortCode = "1049" )
Variables ¶
View Source
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 `, Args: cobra.MaximumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { if len(args) == 0 { return errors.New(utils.SystemContextSubError("please specify a flag or subcommand. Use 'mesheryctl system context --help' to display user guide.\n", "context")) } if ok := utils.IsValidSubcommand(availableSubcommands, args[0]); !ok { return errors.New(utils.SystemContextSubError(fmt.Sprintf("'%s' is a 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
View Source
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 errors.New(utils.SystemError("please specify a flag or subcommand. Use 'mesheryctl system --help' to display user guide.\n")) } if ok := utils.IsValidSubcommand(availableSubcommands, args[0]); !ok { return errors.New(utils.SystemError(fmt.Sprintf("'%s' is a invalid command. Use 'mesheryctl system --help' to display usage guide.\n", args[0]))) } mctlCfg, err := config.GetMesheryCtl(viper.GetViper()) if err != nil { return errors.Wrap(err, "error processing config") } 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 ErrCreateDir ¶ added in v0.5.46
func ErrCreateManifestsFolder ¶ added in v0.5.54
func ErrDownloadFile ¶ added in v0.5.39
func ErrFailedGetEphemeralPort ¶ added in v0.6.2
func ErrHealthCheckFailed ¶ added in v0.5.39
func ErrInitPortForward ¶ added in v0.6.2
func ErrInvalidComponent ¶ added in v0.6.2
func ErrK8SQuery ¶ added in v0.6.2
func ErrK8sConfig ¶ added in v0.6.2
func ErrProcessingMctlConfig ¶ added in v0.5.54
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 ErrSettingDefaultContextToConfig ¶ added in v0.6.2
func ErrSettingTemporaryContext ¶ added in v0.5.54
func ErrStopMeshery ¶ added in v0.5.46
func ErrUnmarshal ¶ added in v0.5.46
func ErrUnsupportedPlatform ¶ added in v0.5.46
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
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 }
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
Click to show internal directories.
Click to hide internal directories.