nsm

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package nsm - Common operations for the adapter

Index

Constants

View Source
const (
	// SMIManifest is the manifest.yaml file for smi conformance tool
	SMIManifest = "https://raw.githubusercontent.com/layer5io/learn-layer5/master/smi-conformance/manifest.yml"
)

Variables

View Source
var (

	// ErrInstallNSMCode represents the errors which are generated
	// during nsm mesh install process
	ErrInstallNSMCode = "1003"

	// ErrCreatingHelmIndexCode represents the errors which are generated
	// during creation of helm index
	ErrCreatingHelmIndexCode = "1004"

	// ErrEntryWithAppVersionNotExistsCode represents the error which is generated
	// when no entry is found with specified name and app version
	ErrEntryWithAppVersionNotExistsCode = "1005"

	// ErrHelmRepositoryNotFoundCode represents the error which is generated when
	// no valid helm repository is found
	ErrHelmRepositoryNotFoundCode = "1006"

	// ErrDecodeYamlCode represents the error which is generated when yaml
	// decode process fails
	ErrDecodeYamlCode = "1007"

	// ErrMeshConfigCode represents the errors which are generated
	// when an invalid mesh config is found
	ErrMeshConfigCode = "1008"

	// ErrApplyHelmChartCode represents the error which are generated
	// during the process of applying helm chart
	ErrApplyHelmChartCode = "1009"

	// ErrConvertingAppVersionToChartVersionCode represents the errors which are generated
	// during the process of converting app version to chart version
	ErrConvertingAppVersionToChartVersionCode = "1010"

	// ErrCreatingNSMMeshClientCode represents the errors which are generated
	// during creating nsm client process
	ErrCreatingNSMMeshClientCode = "1011"

	// ErrSampleAppCode represents the errors which are generated
	// duing sample app installation
	ErrSampleAppCode = "1012"

	// ErrCustomOperationCode represents the errors which are generated
	// when an invalid addon operation is requested
	ErrCustomOperationCode = "1013"

	// ErrOpInvalidCode represents the errors which are generated
	// when an invalid operation is requested
	ErrOpInvalidCode = "1014"

	// ErrOpInvalid represents the errors which are generated
	// when an invalid operation is requested
	ErrOpInvalid = errors.New(ErrOpInvalidCode, errors.Alert, []string{"Invalid operation"}, []string{}, []string{}, []string{})
)

Functions

func ErrApplyHelmChart added in v0.5.0

func ErrApplyHelmChart(err error) error

ErrApplyHelmChart is the error for applying helm chart

func ErrConvertingAppVersionToChartVersion added in v0.5.0

func ErrConvertingAppVersionToChartVersion(err error) error

ErrConvertingAppVersionToChartVersion is the error for converting app version to chart version

func ErrCreatingHelmIndex added in v0.5.0

func ErrCreatingHelmIndex(err error) error

ErrCreatingHelmIndex is the error for creating helm index

func ErrCreatingNSMMeshClient added in v0.5.0

func ErrCreatingNSMMeshClient(err error) error

ErrCreatingNSMMeshClient is the error for streaming event

func ErrCustomOperation added in v0.5.0

func ErrCustomOperation(err error) error

ErrCustomOperation is the error for streaming event

func ErrDecodeYaml added in v0.5.0

func ErrDecodeYaml(err error) error

ErrDecodeYaml is the error when the yaml unmarshal fails

func ErrEntryWithAppVersionNotExists added in v0.5.0

func ErrEntryWithAppVersionNotExists(entry, appVersion string) error

ErrEntryWithAppVersionNotExists is the error when an entry with the given app version is not found

func ErrHelmRepositoryNotFound added in v0.5.0

func ErrHelmRepositoryNotFound(repo string, err error) error

ErrHelmRepositoryNotFound is the error when no valid remote helm repository is found

func ErrInstallNSM added in v0.5.0

func ErrInstallNSM(err error) error

ErrInstallNSM is the error for install mesh

func ErrMeshConfig added in v0.5.0

func ErrMeshConfig(err error) error

ErrMeshConfig is the error for mesh config

func ErrSampleApp added in v0.5.0

func ErrSampleApp(err error) error

ErrSampleApp is the error for streaming event

func New added in v0.5.0

New initializes treafik-mesh handler.

Types

type Mesh added in v0.5.0

type Mesh struct {
	adapter.Adapter // Type Embedded
}

Mesh represents the nsm-mesh adapter and embeds adapter.Adapter

func (*Mesh) ApplyOperation added in v0.5.0

func (mesh *Mesh) ApplyOperation(ctx context.Context, opReq adapter.OperationRequest) error

ApplyOperation applies the operation on nsm mesh

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL