Documentation ¶
Index ¶
Constants ¶
View Source
const ( // OAM metadata constants OAMAdapterNameMetadataKey = "adapter.meshery.io/name" OAMComponentCategoryMetadataKey = "ui.meshery.io/category" )
View Source
const ( // ErrEmptyConfigCode represents the error when the configuration is either empty // or is invalid ErrEmptyConfigCode = "1029" // ErrGetLatestReleasesCode represents the error which occurs during the process of getting // latest releases ErrGetLatestReleasesCode = "1030" // ErrGetLatestReleaseNamesCode represents the error which occurs during the process of extracting // release names ErrGetLatestReleaseNamesCode = "1031" )
Variables ¶
View Source
var ( // TraefikMeshOperation is the default name for the install // and uninstall commands on the traefik mesh TraefikMeshOperation = strings.ToLower(smp.ServiceMesh_TRAEFIK_MESH.Enum().String()) // ServerConfig is the configuration for the gRPC server ServerConfig = map[string]string{ "name": smp.ServiceMesh_TRAEFIK_MESH.Enum().String(), "port": "10006", "type": "adapter", "traceurl": status.None, } // MeshSpec is the spec for the service mesh associated with this adapter MeshSpec = map[string]string{ "name": smp.ServiceMesh_TRAEFIK_MESH.Enum().String(), "status": status.None, "version": status.None, } // ProviderConfig is the config for the configuration provider ProviderConfig = map[string]string{ configprovider.FilePath: configRootPath, configprovider.FileType: "yaml", configprovider.FileName: "traefik-mesh", } // KubeConfig - Controlling the kubeconfig lifecycle with viper KubeConfig = map[string]string{ configprovider.FilePath: configRootPath, configprovider.FileType: "yaml", configprovider.FileName: "kubeconfig", } // Operations represents the set of valid operations that are available // to the adapter Operations = getOperations(common.Operations) )
View Source
var ( TraefikOperation = strings.ToLower(smp.ServiceMesh_TRAEFIK_MESH.Enum().String()) TraefikBookStoreOperation = "traefik_bookstore_app" ServiceName = "service_name" )
View Source
var ( // ErrEmptyConfig error is the error when config is invalid ErrEmptyConfig = errors.New(ErrEmptyConfigCode, errors.Alert, []string{"Config is empty"}, []string{}, []string{}, []string{}) )
Functions ¶
func ErrGetLatestReleaseNames ¶
ErrGetLatestReleaseNames is the error for fetching nsm-mesh releases
func ErrGetLatestReleases ¶
ErrGetLatestReleases is the error for fetching nsm-mesh releases
func NewKubeconfigBuilder ¶
NewKubeconfigBuilder returns a config handler based on the provider
Valid prividers are "viper" and "in-mem"
Types ¶
type Asset ¶
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 ¶
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
func GetLatestReleases ¶
GetLatestReleases fetches the latest releases from the traefik mesh repository
Click to show internal directories.
Click to hide internal directories.