Documentation
¶
Overview ¶
Package osm - Error codes for the adapter
Index ¶
- Variables
- func ErrApplyHelmChart(err error) error
- func ErrCreatingNS(err error) error
- func ErrCustomOperation(err error) error
- func ErrDownloadBinary(err error) error
- func ErrGetLatestRelease(err error) error
- func ErrInstallBinary(err error) error
- func ErrInstallOSM(err error) error
- func ErrInvalidOAMComponentType(compName string) error
- func ErrLoadNamespace(err error, s string) error
- func ErrMeshConfig(err error) error
- func ErrOSMCoreComponentFail(err error) error
- func ErrParseOSMCoreComponent(err error) error
- func ErrProcessOAM(err error) error
- func ErrRunExecutable(err error) error
- func ErrRunOsmCtlCmd(err error, des string) error
- func ErrSampleApp(err error) error
- func ErrSidecarInjection(err error) error
- func ErrTarXZF(err error) error
- func New(config meshkitCfg.Handler, log logger.Handler, kc meshkitCfg.Handler, ...) adapter.Handler
- type CompHandler
- type Handler
- func (h *Handler) ApplyOperation(ctx context.Context, request adapter.OperationRequest) error
- func (h *Handler) CreateKubeconfigs(kubeconfigs []string) error
- func (h *Handler) HandleApplicationConfiguration(config v1alpha1.Configuration, isDel bool, kubeconfigs []string) (string, error)
- func (h *Handler) HandleComponents(comps []v1alpha1.Component, isDel bool, kubeconfigs []string) (string, error)
- func (h *Handler) ProcessOAM(ctx context.Context, oamReq adapter.OAMRequest) (string, error)
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInstallOSMCode represents the errors which are generated // during open service mesh install process ErrInstallOSMCode = "1000" // ErrTarXZFCode represents the errors which are generated // during decompressing and extracting tar.gz file ErrTarXZFCode = "1001" // ErrMeshConfigCode represents the errors which are generated // when an invalid mesh config is found ErrMeshConfigCode = "1002" // ErrRunOsmCtlCmdCode represents the errors which are generated // during fetch manifest process ErrRunOsmCtlCmdCode = "1003" // ErrDownloadBinaryCode represents the errors which are generated // during binary download process ErrDownloadBinaryCode = "1004" // ErrInstallBinaryCode represents the errors which are generated // during binary installation process ErrInstallBinaryCode = "1005" // ErrSampleAppCode represents the errors which are generated // duing sample app installation ErrSampleAppCode = "1006" // ErrCustomOperationCode represents the errors which are generated // when an invalid addon operation is requested ErrCustomOperationCode = "1007" // ErrCreatingNSCode represents the errors which are generated // during the process of creating a namespace ErrCreatingNSCode = "1008" // ErrRunExecutableCode represents the errors which are generated // during the running a executable ErrRunExecutableCode = "1009" // ErrSidecarInjectionCode represents the errors which are generated // during the process of enabling/disabling sidecar injection ErrSidecarInjectionCode = "1010" // ErrOpInvalidCode represents the error which is generated when // there is an invalid operation ErrOpInvalidCode = "1011" // ErrApplyHelmChartCode represents the error which are generated // during the process of applying helm chart ErrApplyHelmChartCode = "1012" // ErrNilClientCode represents the error code which is // generated when kubernetes client is nil ErrNilClientCode = "1013" // ErrInvalidOAMComponentTypeCode represents the error code which is // generated when an invalid oam component is requested ErrInvalidOAMComponentTypeCode = "1014" // ErrOSMCoreComponentFailCode represents the error code which is // generated when an osm core operations fails ErrOSMCoreComponentFailCode = "1015" // ErrProcessOAMCode represents the error code which is // generated when an OAM operations fails ErrProcessOAMCode = "1016" // ErrParseOSMCoreComponentCode represents the error code which is // generated when osm core component manifest parsing fails ErrParseOSMCoreComponentCode = "1017" // ErrParseOAMComponentCode represents the error code which is // generated during the OAM component parsing ErrParseOAMComponentCode = "1018" // ErrParseOAMConfigCode represents the error code which is // generated during the OAM configuration parsing ErrParseOAMConfigCode = "1019" // ErrOpInvalid represents the errors which are generated // when an invalid operation is requested ErrOpInvalid = errors.New(ErrOpInvalidCode, errors.Alert, []string{"Invalid operation"}, []string{"Istio adapter received an invalid operation from the meshey server"}, []string{"The operation is not supported by the adapter", "Invalid operation name"}, []string{"Check if the operation name is valid and supported by the adapter"}) // ErrNilClient represents the error which is // generated when kubernetes client is nil ErrNilClient = errors.New(ErrNilClientCode, errors.Alert, []string{"kubernetes client not initialized"}, []string{"Kubernetes client is nil"}, []string{"kubernetes client not initialized"}, []string{"Reconnect the adaptor to Meshery server"}) // ErrParseOAMComponent represents the error which is // generated during the OAM component parsing ErrParseOAMComponent = errors.New(ErrParseOAMComponentCode, errors.Alert, []string{"error parsing the component"}, []string{"Error occurred while parsing application component in the OAM request made by Meshery server"}, []string{"Could not unmarshall configuration component received via ProcessOAM gRPC call into a valid Component struct"}, []string{"Check if Meshery Server is creating valid component for ProcessOAM gRPC call. This error should never happen and can be reported as a bug in Meshery Server. Also check if Meshery Server and adapters are referring to same component struct provided in MeshKit."}) // ErrParseOAMConfig represents the error which is // generated during the OAM configuration parsing ErrParseOAMConfig = errors.New(ErrParseOAMConfigCode, errors.Alert, []string{"error parsing the configuration"}, []string{"Error occurred while parsing configuration in the request made by Meshery Server"}, []string{"Could not unmarshall OAM config received via ProcessOAM gRPC call into a valid Config struct"}, []string{"Check if Meshery Server is creating valid config for ProcessOAM gRPC call. This error should never happen and can be reported as a bug in Meshery Server. Also, confirm that Meshery Server and Adapters are referring to same config struct provided in MeshKit"}) // ErrGetLatestReleaseCode represents the error which is // generated when the latest stable version could not // be fetched during runtime component registeration ErrGetLatestReleaseCode = "1020" //ErrLoadNamespaceCode occur during the process of applying namespace ErrLoadNamespaceCode = "1021" )
Functions ¶
func ErrApplyHelmChart ¶ added in v0.5.6
ErrApplyHelmChart is the error for applying helm chart
func ErrCreatingNS ¶ added in v0.5.0
ErrCreatingNS is the error while creating the namespace
func ErrCustomOperation ¶ added in v0.5.0
ErrCustomOperation is the error for streaming event
func ErrDownloadBinary ¶ added in v0.5.0
ErrDownloadBinary is the error while downloading osm binary
func ErrGetLatestRelease ¶ added in v0.5.9
ErrGetLatestRelease is the error for get latest versions
func ErrInstallBinary ¶ added in v0.5.0
ErrInstallBinary is the error while downloading osm binary
func ErrInstallOSM ¶ added in v0.5.0
ErrInstallOSM is the error for install mesh
func ErrInvalidOAMComponentType ¶ added in v0.5.7
ErrInvalidOAMComponentType is the error when the OAM component name is not valid
func ErrLoadNamespace ¶ added in v0.5.12
ErrLoadNamespace is the error while applying namespace
func ErrMeshConfig ¶ added in v0.5.0
ErrMeshConfig is the error for mesh config
func ErrOSMCoreComponentFail ¶ added in v0.5.7
ErrOSMCoreComponentFail is the error when core osm component processing fails
func ErrParseOSMCoreComponent ¶ added in v0.5.7
ErrParseOSMCoreComponent is the error when osm core component manifest parsing fails
func ErrProcessOAM ¶ added in v0.5.7
ErrProcessOAM is a generic error which is thrown when an OAM operations fails
func ErrRunExecutable ¶ added in v0.5.0
ErrRunExecutable is the error while running an executable
func ErrRunOsmCtlCmd ¶ added in v0.5.0
ErrRunOsmCtlCmd is the error for mesh port forward
func ErrSampleApp ¶ added in v0.5.0
ErrSampleApp is the error for streaming event
func ErrSidecarInjection ¶ added in v0.5.0
ErrSidecarInjection is the error while enabling/disabling sidecar injection on a particular namespace
func New ¶ added in v0.5.0
func New(config meshkitCfg.Handler, log logger.Handler, kc meshkitCfg.Handler, e *events.EventStreamer) adapter.Handler
New initializes a new handler instance
Types ¶
type CompHandler ¶ added in v0.5.7
CompHandler is the type for functions which can handle OAM components
type Handler ¶ added in v0.5.0
Handler instance for this adapter
func (*Handler) ApplyOperation ¶ added in v0.5.0
ApplyOperation function contains the operation handlers
func (*Handler) CreateKubeconfigs ¶ added in v0.5.22
CreateKubeconfigs creates and writes passed kubeconfig onto the filesystem
func (*Handler) HandleApplicationConfiguration ¶ added in v0.5.7
func (h *Handler) HandleApplicationConfiguration(config v1alpha1.Configuration, isDel bool, kubeconfigs []string) (string, error)
HandleApplicationConfiguration handles the processing of OAM application configuration
func (*Handler) HandleComponents ¶ added in v0.5.7
func (h *Handler) HandleComponents(comps []v1alpha1.Component, isDel bool, kubeconfigs []string) (string, error)
HandleComponents handles the processing of OAM components
func (*Handler) ProcessOAM ¶ added in v0.5.7
ProcessOAM will handles the grpc invocation for handling OAM objects