consul

package
v0.0.0-...-7d3168a Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: Apache-2.0 Imports: 19 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

func ErrApplyHelmChart(err error) error

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

func ErrApplyOperation

func ErrApplyOperation(err error) error

func ErrConsulCoreComponentFail

func ErrConsulCoreComponentFail(err error) error

ErrConsulCoreComponentFail is the error when core Consul component processing fails

func ErrMeshConfig

func ErrMeshConfig(err error) error

ErrMeshConfig is the error for mesh config

func ErrParseConsulCoreComponent

func ErrParseConsulCoreComponent(err error) error

ErrParseConsulCoreComponent is the error when Consul core component manifest parsing fails

func ErrProcessOAM

func ErrProcessOAM(err error) error

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

func New

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

Types

type CompHandler

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

CompHandler is the type for functions which can handle OAM components

type Consul

type Consul struct {
	adapter.Adapter
}

func (*Consul) ApplyOperation

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

func (*Consul) CreateKubeconfigs

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

CreateKubeconfigs creates and writes passed kubeconfig onto the filesystem

func (*Consul) HandleApplicationConfiguration

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

func (*Consul) HandleComponents

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