consul

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrApplyOperationCode           = "1000"
	ErrParseOAMComponentCode        = "1001"
	ErrParseOAMConfigCode           = "1002"
	ErrProcessOAMCode               = "1003"
	ErrApplyHelmChartCode           = "1004"
	ErrMeshConfigCode               = "1005"
	ErrConsulCoreComponentFailCode  = "1006"
	ErrParseConsulCoreComponentCode = "1007"

	// 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"})
)

Functions

func ErrApplyHelmChart added in v0.5.10

func ErrApplyHelmChart(err error) error

ErrApplyHelmChart is the error which occurs in the process of applying helm chart

func ErrApplyOperation added in v0.4.3

func ErrApplyOperation(err error) error

func ErrConsulCoreComponentFail added in v0.5.10

func ErrConsulCoreComponentFail(err error) error

ErrConsulCoreComponentFail is the error when core Consul component processing fails

func ErrMeshConfig added in v0.5.10

func ErrMeshConfig(err error) error

ErrMeshConfig is the error for mesh config

func ErrParseConsulCoreComponent added in v0.5.10

func ErrParseConsulCoreComponent(err error) error

ErrParseConsulCoreComponent is the error when Consul core component manifest parsing fails

func ErrProcessOAM added in v0.5.10

func ErrProcessOAM(err error) error

ErrProcessOAM is a generic error which is thrown when an OAM operations fails

func New added in v0.4.2

func New(config config.Handler, log logger.Handler, kubeConfig config.Handler, e *events.EventStreamer) adapter.Handler

Types

type CompHandler added in v0.5.10

type CompHandler func(*Consul, v1alpha1.Component, bool, []string) (string, error)

CompHandler is the type for functions which can handle OAM components

type Consul added in v0.4.3

type Consul struct {
	adapter.Adapter
}

func (*Consul) ApplyOperation added in v0.4.3

func (h *Consul) ApplyOperation(ctx context.Context, request adapter.OperationRequest) error

func (*Consul) CreateKubeconfigs added in v0.5.18

func (h *Consul) CreateKubeconfigs(kubeconfigs []string) error

CreateKubeconfigs creates and writes passed kubeconfig onto the filesystem

func (*Consul) HandleApplicationConfiguration added in v0.5.10

func (h *Consul) HandleApplicationConfiguration(config v1alpha1.Configuration, isDel bool, kubeconfigs []string) (string, error)

func (*Consul) HandleComponents added in v0.5.10

func (h *Consul) HandleComponents(comps []v1alpha1.Component, isDel bool, kubeconfigs []string) (string, error)

Jump to

Keyboard shortcuts

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