config

package
v0.6.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Development = "development"
	Production  = "production"
	// OAM Metadata constants
	OAMAdapterNameMetadataKey       = "adapter.meshery.io/name"
	OAMComponentCategoryMetadataKey = "ui.meshery.io/category"
)
View Source
const (
	ErrGetLatestReleasesCode     = "1000"
	ErrGetLatestReleaseNamesCode = "1001"
	ErrEmptyConfigCode           = "1027"
)

Variables

View Source
var (
	KumaOperation = strings.ToLower(smp.ServiceMesh_KUMA.Enum().String())

	ServerConfig = map[string]string{
		"name":     smp.ServiceMesh_KUMA.Enum().String(),
		"type":     "adapter",
		"port":     "10007",
		"traceurl": status.None,
	}

	MeshSpec = map[string]string{
		"name":    smp.ServiceMesh_KUMA.Enum().String(),
		"status":  status.NotInstalled,
		"version": status.None,
	}

	Operations = getOperations(common.Operations)
)
View Source
var (
	ServerDefaults = map[string]string{
		"name":     smp.ServiceMesh_KUMA.Enum().String(),
		"type":     "adapter",
		"port":     "10007",
		"traceurl": "none",
	}

	MeshSpecDefaults = map[string]string{
		"name":    smp.ServiceMesh_KUMA.Enum().String(),
		"status":  status.NotInstalled,
		"version": "none",
	}

	ProviderConfigDefaults = map[string]string{
		configprovider.FilePath: configRootPath,
		configprovider.FileType: "yaml",
		configprovider.FileName: "kuma",
	}

	KubeConfigDefaults = map[string]string{
		configprovider.FilePath: configRootPath,
		configprovider.FileType: "yaml",
		configprovider.FileName: "kubeconfig",
	}

	OperationsDefaults = getOperations(common.Operations)
)
View Source
var (
	ErrEmptyConfig = errors.New(ErrEmptyConfigCode, errors.Alert, []string{"Config is empty"}, []string{}, []string{}, []string{})
)
View Source
var (
	ServiceName = "service_name"
)

Functions

func ErrGetLatestReleaseNames added in v0.3.8

func ErrGetLatestReleaseNames(err error) error

ErrGetLatestReleaseNames is the error for fetching linkerd releases

func ErrGetLatestReleases added in v0.3.8

func ErrGetLatestReleases(err error) error

ErrGetLatestReleases is the error for fetching linkerd releases

func New

func New(provider string) (h config.Handler, err error)

New creates a new config instance

func NewKubeconfigBuilder added in v0.3.8

func NewKubeconfigBuilder(provider string) (config.Handler, error)

func RootPath added in v0.3.8

func RootPath() string

RootPath returns the configRootPath

Types

type Asset added in v0.3.8

type Asset struct {
	Name        string `json:"name,omitempty"`
	State       string `json:"state,omitempty"`
	DownloadURL string `json:"browser_download_url,omitempty"`
}

Asset describes the github release asset object

type Release added in v0.3.8

type Release struct {
	ID      int             `json:"id,omitempty"`
	TagName string          `json:"tag_name,omitempty"`
	Name    adapter.Version `json:"name,omitempty"`
	Draft   bool            `json:"draft,omitempty"`
	Assets  []*Asset        `json:"assets,omitempty"`
}

Release is used to save the release informations

Jump to

Keyboard shortcuts

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