Documentation ¶
Overview ¶
Package appmesh stores common operations
Index ¶
- Variables
- func ErrAddonFromHelm(err error) error
- func ErrAddonFromTemplate(err error) error
- func ErrAppMeshCoreComponentFail(err error) error
- func ErrApplyHelmChart(err error) error
- func ErrClientConfig(err error) error
- func ErrCustomOperation(err error) error
- func ErrInstallAppMesh(err error) error
- func ErrInvalidOAMComponentType(compName string) error
- func ErrLoadNamespaceToMesh(err error) error
- func ErrMeshConfig(err error) error
- func ErrParseAppMeshCoreComponent(err error) error
- func ErrProcessOAM(err error) error
- func ErrSampleApp(err error, status string) error
- func ErrStreamEvent(err error) error
- func New(c meshkitCfg.Handler, l logger.Handler, kc meshkitCfg.Handler, ...) adapter.Handler
- type AppMesh
- func (appMesh *AppMesh) ApplyOperation(ctx context.Context, opReq adapter.OperationRequest) error
- func (appMesh *AppMesh) CreateKubeconfigs(kubeconfigs []string) error
- func (appMesh *AppMesh) HandleApplicationConfiguration(config v1alpha1.Configuration, isDel bool, kubeconfigs []string) (string, error)
- func (appMesh *AppMesh) HandleComponents(comps []v1alpha1.Component, isDel bool, kubeconfigs []string) (string, error)
- func (appMesh *AppMesh) LoadNamespaceToMesh(namespace string, remove bool, kubeconfigs []string) error
- func (appMesh *AppMesh) ProcessOAM(ctx context.Context, oamReq adapter.OAMRequest) (string, error)
- type CompHandler
Constants ¶
This section is empty.
Variables ¶
var ( // ErrCustomOperationCode should really have an error code defined by now. ErrCustomOperationCode = "appmesh_test_code" // ErrInstallAppMeshCode provisioning failure ErrInstallAppMeshCode = "appmesh_test_code" // ErrMeshConfigCode service mesh configuration failure ErrMeshConfigCode = "appmesh_test_code" // ErrClientConfigCode adapter configuration failure ErrClientConfigCode = "appmesh_test_code" // ErrStreamEventCode failure ErrStreamEventCode = "appmesh_test_code" // ErrSampleAppCode failure ErrSampleAppCode = "appmesh_test_code" // ErrLoadNamespaceToMeshCode represents the error // which is generated when the namespace could not be labelled and updated ErrLoadNamespaceToMeshCode = "appmesh_test_code" // ErrOpInvalidCode failure ErrOpInvalidCode = "appmesh_test_code" // ErrNilClientCode represents the error code which is // generated when kubernetes client is nil ErrNilClientCode = "replace" // ErrApplyHelmChartCode represents the error generated // during the process of applying helm chart ErrApplyHelmChartCode = "replace" // ErrParseAppMeshCoreComponentCode represents the error code // when app-mesh core components can't be parsed ErrParseAppMeshCoreComponentCode = "replace" // ErrAppMeshCoreComponentFailCode represents error code when // there is an error parsing components ErrAppMeshCoreComponentFailCode = "replace" // ErrInvalidOAMComponentTypeCode represents error code when // invalid OAM components are registerd ErrInvalidOAMComponentTypeCode = "replace" // ErrProcessOAMCode represents error code while parsing OAM // components ErrProcessOAMCode = "replace" // ErrAddonFromTemplateCode represents the errors which are generated // during addon deployment process ErrAddonFromTemplateCode = "replace" //ErrAddonFromHelmCode represents the error while installing addons through helm charts ErrAddonFromHelmCode = "replace" // ErrParseOAMComponentCode represents the error which is // generated during the OAM component parsing ErrParseOAMComponentCode = "replace" // ErrParseOAMConfigCode represents the error which is // generated during the OAM configuration parsing ErrParseOAMConfigCode = "replace" // ErrOpInvalid is an error when an invalid operation is requested ErrOpInvalid = errors.New(ErrOpInvalidCode, errors.Alert, []string{"Invalid operation"}, []string{}, []string{}, []string{}) // ErrNilClient represents the error 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 occured while prasing application component in the OAM request made"}, []string{"Invalid OAM component passed in OAM request"}, []string{"Check if your request has vaild OAM components"}) // 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 occured while prasing component config in the OAM request made"}, []string{"Invalid OAM config passed in OAM request"}, []string{"Check if your request has vaild OAM config"}) )
Functions ¶
func ErrAddonFromHelm ¶ added in v0.2.4
ErrAddonFromHelm is the error for installing addons through helm chart
func ErrAddonFromTemplate ¶
ErrAddonFromTemplate is the error for streaming event
func ErrAppMeshCoreComponentFail ¶
ErrAppMeshCoreComponentFail is the error when core appmesh component processing fails
func ErrApplyHelmChart ¶
ErrApplyHelmChart is the occurend while applying helm chart
func ErrClientConfig ¶
ErrClientConfig is the error for setting client config
func ErrCustomOperation ¶
ErrCustomOperation is the error for custom operations
func ErrInstallAppMesh ¶
ErrInstallAppMesh is the error for install mesh
func ErrInvalidOAMComponentType ¶
ErrInvalidOAMComponentType is the error when the OAM component name is not valid
func ErrLoadNamespaceToMesh ¶ added in v0.2.2
ErrLoadNamespaceToMesh identifies the inability to label the appropropriate namespace
func ErrParseAppMeshCoreComponent ¶
ErrParseAppMeshCoreComponent is the error when app-mesh core component manifest parsing fails
func ErrProcessOAM ¶
ErrProcessOAM is a generic error which is thrown when an OAM operations fails
func ErrSampleApp ¶
ErrSampleApp is the error for operations on the sample apps
func ErrStreamEvent ¶
ErrStreamEvent is the error for streaming event
func New ¶
func New(c meshkitCfg.Handler, l logger.Handler, kc meshkitCfg.Handler, e *events.EventStreamer) adapter.Handler
New initializes AppMesh handler.
Types ¶
type AppMesh ¶
AppMesh is the app-mesh adapter. It embeds adapter.Adapter
func (*AppMesh) ApplyOperation ¶
ApplyOperation applies the requested operation on app-mesh
func (*AppMesh) CreateKubeconfigs ¶ added in v0.5.2
CreateKubeconfigs creates and writes passed kubeconfig onto the filesystem
func (*AppMesh) HandleApplicationConfiguration ¶
func (appMesh *AppMesh) HandleApplicationConfiguration(config v1alpha1.Configuration, isDel bool, kubeconfigs []string) (string, error)
HandleApplicationConfiguration handles the processing of OAM application configuration
func (*AppMesh) HandleComponents ¶
func (appMesh *AppMesh) HandleComponents(comps []v1alpha1.Component, isDel bool, kubeconfigs []string) (string, error)
HandleComponents handles the processing of OAM components
func (*AppMesh) LoadNamespaceToMesh ¶
func (appMesh *AppMesh) LoadNamespaceToMesh(namespace string, remove bool, kubeconfigs []string) error
LoadNamespaceToMesh enables sidecar injection on by labelling requested namespace
func (*AppMesh) ProcessOAM ¶ added in v0.2.5
ProcessOAM handles the grpc invocation for handling OAM objects