Documentation ¶
Overview ¶
Package models - Error codes for Meshery models
Index ¶
- Constants
- Variables
- func ErrCopy(err error, obj string) error
- func ErrDBDelete(err error, user string) error
- func ErrDBLock(err error) error
- func ErrDBOpen(err error) error
- func ErrDBPut(err error) error
- func ErrDBRLock(err error) error
- func ErrDBRead(err error) error
- func ErrDataRead(err error, r string) error
- func ErrDecodeBase64(err error, obj string) error
- func ErrDelete(err error, obj string, statusCode int) error
- func ErrEncoding(err error, obj string) error
- func ErrEncodingPEM(err error) error
- func ErrFetch(err error, obj string, statusCode int) error
- func ErrFetchData(err error) error
- func ErrFolderStat(err error, dir string) error
- func ErrGenerateUUID(err error) error
- func ErrGetToken(err error) error
- func ErrGettingSeededComponents(err error, content string) error
- func ErrGrafanaBoards(err error) error
- func ErrGrafanaClient(err error) error
- func ErrGrafanaDashboard(err error, UID string) error
- func ErrGrafanaData(err error, apiEndpoint string) error
- func ErrGrafanaDataSource(err error, ds string) error
- func ErrGrafanaOrg(err error) error
- func ErrInvalidCapability(capability string, provider string) error
- func ErrJWKsKeys(err error) error
- func ErrMakeDir(err error, dir string) error
- func ErrMarshal(err error, obj string) error
- func ErrMarshalPKIX(err error) error
- func ErrPageNumber(err error) error
- func ErrPageSize(err error) error
- func ErrPerfID(err error) error
- func ErrPost(err error, obj string, statusCode int) error
- func ErrPraseUnverified(err error) error
- func ErrPrometheusGetNodes(err error) error
- func ErrPrometheusLabelSeries(err error) error
- func ErrPrometheusQueryRange(err error, query string, startTime, endTime time.Time, step time.Duration) error
- func ErrPrometheusStaticBoard(err error) error
- func ErrResultData() error
- func ErrSavingSeededComponents(err error, content string) error
- func ErrSessionCopy(err error) error
- func ErrTokenClientCheck(err error) error
- func ErrTokenDecode(err error) error
- func ErrTokenPrase(err error) error
- func ErrTokenRefresh(err error) error
- func ErrUnableToPersistsResult(err error) error
- func ErrUnmarshal(err error, obj string) error
- func GetApplicationName(stringifiedFile string) (string, error)
- func GetFilterName(stringifiedFile string) (string, error)
- func GetPatternName(stringifiedFile string) (string, error)
- func Paginate(page, pageSize uint) func(db *gorm.DB) *gorm.DB
- func SMPPerformanceTestConfigValidator(perfTest *SMP.PerformanceTestConfig) error
- func SafeClose(co io.Closer)
- func TarXZ(gzipStream io.Reader, destination string) error
- func TarXZF(srcURL, destination string) error
- type Adapter
- type AdaptersTrackerInterface
- type ApplicationsAPIResponse
- type BitCaskPreferencePersister
- func (s *BitCaskPreferencePersister) ClosePersister()
- func (s *BitCaskPreferencePersister) DeleteFromPersister(userID string) error
- func (s *BitCaskPreferencePersister) ReadFromPersister(userID string) (*Preference, error)
- func (s *BitCaskPreferencePersister) WriteToPersister(userID string, data *Preference) error
- type BitCaskSmiResultsPersister
- type BitCaskTestProfilesPersister
- func (s *BitCaskTestProfilesPersister) CloseTestConfigsPersister()
- func (s *BitCaskTestProfilesPersister) DeleteTestConfig(key uuid.UUID) error
- func (s *BitCaskTestProfilesPersister) GetTestConfig(key uuid.UUID) (*SMP.PerformanceTestConfig, error)
- func (s *BitCaskTestProfilesPersister) GetTestConfigs(page, pageSize uint64) ([]byte, error)
- func (s *BitCaskTestProfilesPersister) WriteTestConfig(key uuid.UUID, result []byte) error
- type Capabilities
- type Capability
- type DefaultLocalProvider
- func (l *DefaultLocalProvider) CleanupSeeded(seededUUIDs []uuid.UUID)
- func (l *DefaultLocalProvider) DeleteMesheryApplication(req *http.Request, applicationID string) ([]byte, error)
- func (l *DefaultLocalProvider) DeleteMesheryFilter(req *http.Request, filterID string) ([]byte, error)
- func (l *DefaultLocalProvider) DeleteMesheryPattern(req *http.Request, patternID string) ([]byte, error)
- func (l *DefaultLocalProvider) DeleteMesheryPatternResource(token, resourceID string) error
- func (l *DefaultLocalProvider) DeletePerformanceProfile(req *http.Request, performanceProfileID string) ([]byte, error)
- func (l *DefaultLocalProvider) DeleteSchedule(req *http.Request, scheduleID string) ([]byte, error)
- func (l *DefaultLocalProvider) Description() []string
- func (l *DefaultLocalProvider) ExtractToken(w http.ResponseWriter, r *http.Request)
- func (l *DefaultLocalProvider) FetchAllResults(tokenString string, page, pageSize, search, order, from, to string) ([]byte, error)
- func (l *DefaultLocalProvider) FetchResults(tokenVal, page, pageSize, search, order, profileID string) ([]byte, error)
- func (l *DefaultLocalProvider) FetchSmiResults(req *http.Request, page, pageSize, search, order string) ([]byte, error)
- func (l *DefaultLocalProvider) GetGenericPersister() *database.Handler
- func (l *DefaultLocalProvider) GetKubeClient() *mesherykube.Client
- func (l *DefaultLocalProvider) GetMesheryApplication(req *http.Request, applicationID string) ([]byte, error)
- func (l *DefaultLocalProvider) GetMesheryApplications(req *http.Request, page, pageSize, search, order string) ([]byte, error)
- func (l *DefaultLocalProvider) GetMesheryFilter(req *http.Request, filterID string) ([]byte, error)
- func (l *DefaultLocalProvider) GetMesheryFilterFile(req *http.Request, filterID string) ([]byte, error)
- func (l *DefaultLocalProvider) GetMesheryFilters(req *http.Request, page, pageSize, search, order string) ([]byte, error)
- func (l *DefaultLocalProvider) GetMesheryPattern(req *http.Request, patternID string) ([]byte, error)
- func (l *DefaultLocalProvider) GetMesheryPatternResource(token, resourceID string) (*PatternResource, error)
- func (l *DefaultLocalProvider) GetMesheryPatternResources(token, page, pageSize, search, order, name, namespace, typ, oamType string) (*PatternResourcePage, error)
- func (l *DefaultLocalProvider) GetMesheryPatterns(req *http.Request, page, pageSize, search, order string) ([]byte, error)
- func (l *DefaultLocalProvider) GetPerformanceProfile(req *http.Request, performanceProfileID string) ([]byte, error)
- func (l *DefaultLocalProvider) GetPerformanceProfiles(tokenString string, page, pageSize, search, order string) ([]byte, error)
- func (l *DefaultLocalProvider) GetProviderCapabilities(w http.ResponseWriter, r *http.Request)
- func (l *DefaultLocalProvider) GetProviderProperties() ProviderProperties
- func (l *DefaultLocalProvider) GetProviderToken(req *http.Request) (string, error)
- func (l *DefaultLocalProvider) GetProviderType() ProviderType
- func (l *DefaultLocalProvider) GetResult(tokenVal string, resultID uuid.UUID) (*MesheryResult, error)
- func (l *DefaultLocalProvider) GetSchedule(req *http.Request, scheduleID string) ([]byte, error)
- func (l *DefaultLocalProvider) GetSchedules(req *http.Request, page, pageSize, order string) ([]byte, error)
- func (l *DefaultLocalProvider) GetSession(req *http.Request) error
- func (l *DefaultLocalProvider) GetUserDetails(req *http.Request) (*User, error)
- func (l *DefaultLocalProvider) Initialize()
- func (l *DefaultLocalProvider) InitiateLogin(w http.ResponseWriter, r *http.Request, fromMiddleWare bool)
- func (l *DefaultLocalProvider) Logout(w http.ResponseWriter, req *http.Request)
- func (l *DefaultLocalProvider) Name() string
- func (l *DefaultLocalProvider) PackageLocation() string
- func (l *DefaultLocalProvider) PublishMetrics(_ string, result *MesheryResult) error
- func (l *DefaultLocalProvider) PublishResults(req *http.Request, result *MesheryResult, profileID string) (string, error)
- func (l *DefaultLocalProvider) PublishSmiResults(result *SmiResult) (string, error)
- func (l *DefaultLocalProvider) ReadMeshSyncData() ([]model.Object, error)
- func (l *DefaultLocalProvider) RecordMeshSyncData(obj model.Object) error
- func (l *DefaultLocalProvider) RecordPreferences(req *http.Request, userID string, data *Preference) error
- func (l *DefaultLocalProvider) RemoteApplicationFile(req *http.Request, resourceURL, path string, save bool) ([]byte, error)
- func (l *DefaultLocalProvider) RemoteFilterFile(req *http.Request, resourceURL, path string, save bool) ([]byte, error)
- func (l *DefaultLocalProvider) RemotePatternFile(req *http.Request, resourceURL, path string, save bool) ([]byte, error)
- func (l *DefaultLocalProvider) SMPTestConfigDelete(req *http.Request, testUUID string) error
- func (l *DefaultLocalProvider) SMPTestConfigFetch(req *http.Request, page, pageSize, search, order string) ([]byte, error)
- func (l *DefaultLocalProvider) SMPTestConfigGet(req *http.Request, testUUID string) (*SMP.PerformanceTestConfig, error)
- func (l *DefaultLocalProvider) SMPTestConfigStore(req *http.Request, perfConfig *SMP.PerformanceTestConfig) (string, error)
- func (l *DefaultLocalProvider) SaveMesheryApplication(tokenString string, application *MesheryApplication) ([]byte, error)
- func (l *DefaultLocalProvider) SaveMesheryFilter(tokenString string, filter *MesheryFilter) ([]byte, error)
- func (l *DefaultLocalProvider) SaveMesheryPattern(tokenString string, pattern *MesheryPattern) ([]byte, error)
- func (l *DefaultLocalProvider) SaveMesheryPatternResource(token string, resource *PatternResource) (*PatternResource, error)
- func (l *DefaultLocalProvider) SavePerformanceProfile(tokenString string, performanceProfile *PerformanceProfile) ([]byte, error)
- func (l *DefaultLocalProvider) SaveSchedule(tokenString string, schedule *Schedule) ([]byte, error)
- func (l *DefaultLocalProvider) SeedContent(log logger.Handler) []uuid.UUID
- func (l *DefaultLocalProvider) SetKubeClient(client *mesherykube.Client)
- func (l *DefaultLocalProvider) TokenHandler(w http.ResponseWriter, r *http.Request, fromMiddleWare bool)
- func (l *DefaultLocalProvider) UpdateToken(http.ResponseWriter, *http.Request) string
- type Detail
- type Environment
- type ExtensionInput
- type ExtensionOutput
- type Extensions
- type Feature
- type FiltersAPIResponse
- type Grafana
- type GrafanaBoard
- type GrafanaClient
- func (g *GrafanaClient) Close()
- func (g *GrafanaClient) GetGrafanaBoards(ctx context.Context, BaseURL, APIKey, dashboardSearch string) ([]*GrafanaBoard, error)
- func (g *GrafanaClient) GrafanaQuery(ctx context.Context, BaseURL, APIKey string, queryData *url.Values) ([]byte, error)
- func (g *GrafanaClient) GrafanaQueryRange(ctx context.Context, BaseURL, APIKey string, queryData *url.Values) ([]byte, error)
- func (g *GrafanaClient) ProcessBoard(ctx context.Context, c *sdk.Client, board *sdk.Board, link *sdk.FoundBoard) (*GrafanaBoard, error)
- func (g *GrafanaClient) Validate(ctx context.Context, BaseURL, APIKey string) error
- type GrafanaConfigParams
- type GrafanaDataSource
- type GrafanaPanel
- type GrafanaTemplateVars
- type GraphQLExtension
- type GraphQLExtensions
- type HandlerConfig
- type HandlerInterface
- type Href
- type IngressGateway
- type JWK
- type K8SConfig
- type K8SContext
- type K8SNode
- type LatenciesMs
- type LoadGenerator
- type LoadTestOptions
- type LoadTestPreferences
- type LoadTestResponse
- type LoadTestStatus
- type MapPreferencePersister
- type MeshClientConfig
- type MeshConfig
- type MeshControlPlane
- type MeshPolicy
- type MeshTelemetry
- type MesheryApplication
- type MesheryApplicationPage
- type MesheryApplicationPersister
- func (maap *MesheryApplicationPersister) DeleteMesheryApplication(id uuid.UUID) ([]byte, error)
- func (maap *MesheryApplicationPersister) GetMesheryApplication(id uuid.UUID) ([]byte, error)
- func (maap *MesheryApplicationPersister) GetMesheryApplications(search, order string, page, pageSize uint64) ([]byte, error)
- func (maap *MesheryApplicationPersister) SaveMesheryApplication(application *MesheryApplication) ([]byte, error)
- func (maap *MesheryApplicationPersister) SaveMesheryApplications(applications []MesheryApplication) ([]byte, error)
- type MesheryFilter
- type MesheryFilterPage
- type MesheryFilterPersister
- func (mfp *MesheryFilterPersister) DeleteMesheryFilter(id uuid.UUID) ([]byte, error)
- func (mfp *MesheryFilterPersister) GetMesheryFilter(id uuid.UUID) ([]byte, error)
- func (mfp *MesheryFilterPersister) GetMesheryFilterFile(id uuid.UUID) ([]byte, error)
- func (mfp *MesheryFilterPersister) GetMesheryFilters(search, order string, page, pageSize uint64) ([]byte, error)
- func (mfp *MesheryFilterPersister) SaveMesheryFilter(filter *MesheryFilter) ([]byte, error)
- func (mfp *MesheryFilterPersister) SaveMesheryFilters(filters []MesheryFilter) ([]byte, error)
- type MesheryPattern
- type MesheryPatternPage
- type MesheryPatternPersister
- func (mpp *MesheryPatternPersister) DeleteMesheryPattern(id uuid.UUID) ([]byte, error)
- func (mpp *MesheryPatternPersister) GetMesheryPattern(id uuid.UUID) ([]byte, error)
- func (mpp *MesheryPatternPersister) GetMesheryPatterns(search, order string, page, pageSize uint64) ([]byte, error)
- func (mpp *MesheryPatternPersister) SaveMesheryPattern(pattern *MesheryPattern) ([]byte, error)
- func (mpp *MesheryPatternPersister) SaveMesheryPatterns(patterns []MesheryPattern) ([]byte, error)
- type MesheryResult
- type MesheryResultPage
- type MesheryResultsPersister
- func (mrp *MesheryResultsPersister) GetAllResults(page, pageSize uint64) ([]byte, error)
- func (mrp *MesheryResultsPersister) GetResult(key uuid.UUID) (*MesheryResult, error)
- func (mrp *MesheryResultsPersister) GetResults(page, pageSize uint64, profileID string) ([]byte, error)
- func (mrp *MesheryResultsPersister) WriteResult(key uuid.UUID, result []byte) error
- type Metrics
- type NavigatorExtension
- type NavigatorExtensions
- type PatternResource
- type PatternResourcePage
- type PatternResourcePersister
- func (prp *PatternResourcePersister) DeletePatternResource(id uuid.UUID) error
- func (prp *PatternResourcePersister) Exists(name, namespace, typ, oamType string) bool
- func (prp *PatternResourcePersister) GetPatternResource(id uuid.UUID) (*PatternResource, error)
- func (prp *PatternResourcePersister) GetPatternResourceByAttributes(name, namespace, typ, oamType string) (*PatternResource, error)
- func (prp *PatternResourcePersister) GetPatternResources(search, order, name, namespace, typ, oamType string, page, pageSize uint64) (*PatternResourcePage, error)
- func (prp *PatternResourcePersister) SavePatternResource(pr *PatternResource) (*PatternResource, error)
- type PatternsAPIResponse
- type PerformanceProfile
- type PerformanceProfilePage
- type PerformanceProfileParameters
- type PerformanceProfilePersister
- func (ppp *PerformanceProfilePersister) DeletePerformanceProfile(id uuid.UUID) ([]byte, error)
- func (ppp *PerformanceProfilePersister) GetPerformanceProfile(id uuid.UUID) (*PerformanceProfile, error)
- func (ppp *PerformanceProfilePersister) GetPerformanceProfiles(userID, search, order string, page, pageSize uint64) ([]byte, error)
- func (ppp *PerformanceProfilePersister) SavePerformanceProfile(id uuid.UUID, profile *PerformanceProfile) error
- type PerformanceProfilesAPIResponse
- type PerformanceResult
- type PerformanceResultsAPIResponse
- type PerformanceSpec
- type PerformanceTestParameters
- type Preference
- type PreferenceParams
- type PreferencePersister
- type Prometheus
- type PrometheusClient
- func (p *PrometheusClient) Close()
- func (p *PrometheusClient) ComputeStep(ctx context.Context, start, end time.Time) time.Duration
- func (p *PrometheusClient) GetClusterStaticBoard(ctx context.Context, promURL string) (*GrafanaBoard, error)
- func (p *PrometheusClient) GetNodesStaticBoard(ctx context.Context, promURL string) (*GrafanaBoard, error)
- func (p *PrometheusClient) ImportGrafanaBoard(ctx context.Context, boardData []byte) (*GrafanaBoard, error)
- func (p *PrometheusClient) Query(ctx context.Context, promURL string, queryData *url.Values) ([]byte, error)
- func (p *PrometheusClient) QueryRange(ctx context.Context, promURL string, queryData *url.Values) ([]byte, error)
- func (p *PrometheusClient) QueryRangeUsingClient(ctx context.Context, promURL, query string, startTime, endTime time.Time, ...) (promModel.Value, error)
- func (p *PrometheusClient) Validate(ctx context.Context, promURL string) error
- type Provider
- type ProviderProperties
- type ProviderType
- type QueryTrackerInterface
- type RemoteProvider
- func (l *RemoteProvider) DecodeTokenData(tokenStringB64 string) (*oauth2.Token, error)
- func (l *RemoteProvider) DeleteMesheryApplication(req *http.Request, applicationID string) ([]byte, error)
- func (l *RemoteProvider) DeleteMesheryFilter(req *http.Request, filterID string) ([]byte, error)
- func (l *RemoteProvider) DeleteMesheryPattern(req *http.Request, patternID string) ([]byte, error)
- func (l *RemoteProvider) DeleteMesheryPatternResource(token, resourceID string) error
- func (l *RemoteProvider) DeletePerformanceProfile(req *http.Request, performanceProfileID string) ([]byte, error)
- func (l *RemoteProvider) DeleteSchedule(req *http.Request, scheduleID string) ([]byte, error)
- func (l *RemoteProvider) Description() []string
- func (l *RemoteProvider) DoRequest(req *http.Request, tokenString string) (*http.Response, error)
- func (l *RemoteProvider) ExtractToken(w http.ResponseWriter, r *http.Request)
- func (l *RemoteProvider) FetchAllResults(tokenString string, page, pageSize, search, order, from, to string) ([]byte, error)
- func (l *RemoteProvider) FetchResults(tokenVal string, page, pageSize, search, order, profileID string) ([]byte, error)
- func (l *RemoteProvider) FetchSmiResults(req *http.Request, page, pageSize, search, order string) ([]byte, error)
- func (l *RemoteProvider) GenerateKey(jwk JWK) (*rsa.PublicKey, error)
- func (l *RemoteProvider) GetGenericPersister() *database.Handler
- func (l *RemoteProvider) GetJWK(kid string) (JWK, error)
- func (l *RemoteProvider) GetKubeClient() *mesherykube.Client
- func (l *RemoteProvider) GetMesheryApplication(req *http.Request, applicationID string) ([]byte, error)
- func (l *RemoteProvider) GetMesheryApplications(req *http.Request, page, pageSize, search, order string) ([]byte, error)
- func (l *RemoteProvider) GetMesheryFilter(req *http.Request, filterID string) ([]byte, error)
- func (l *RemoteProvider) GetMesheryFilterFile(req *http.Request, filterID string) ([]byte, error)
- func (l *RemoteProvider) GetMesheryFilters(req *http.Request, page, pageSize, search, order string) ([]byte, error)
- func (l *RemoteProvider) GetMesheryPattern(req *http.Request, patternID string) ([]byte, error)
- func (l *RemoteProvider) GetMesheryPatternResource(token, resourceID string) (*PatternResource, error)
- func (l *RemoteProvider) GetMesheryPatternResources(token, page, pageSize, search, order, name, namespace, typ, oamType string) (*PatternResourcePage, error)
- func (l *RemoteProvider) GetMesheryPatterns(req *http.Request, page, pageSize, search, order string) ([]byte, error)
- func (l *RemoteProvider) GetPerformanceProfile(req *http.Request, performanceProfileID string) ([]byte, error)
- func (l *RemoteProvider) GetPerformanceProfiles(tokenString string, page, pageSize, search, order string) ([]byte, error)
- func (l *RemoteProvider) GetProviderCapabilities(w http.ResponseWriter, r *http.Request)
- func (l *RemoteProvider) GetProviderProperties() ProviderProperties
- func (l *RemoteProvider) GetProviderToken(req *http.Request) (string, error)
- func (l *RemoteProvider) GetProviderType() ProviderType
- func (l *RemoteProvider) GetResult(tokenVal string, resultID uuid.UUID) (*MesheryResult, error)
- func (l *RemoteProvider) GetSchedule(req *http.Request, scheduleID string) ([]byte, error)
- func (l *RemoteProvider) GetSchedules(req *http.Request, page, pageSize, order string) ([]byte, error)
- func (l *RemoteProvider) GetSession(req *http.Request) error
- func (l *RemoteProvider) GetToken(req *http.Request) (string, error)
- func (l *RemoteProvider) GetUserDetails(req *http.Request) (*User, error)
- func (l *RemoteProvider) Initialize()
- func (l *RemoteProvider) InitiateLogin(w http.ResponseWriter, r *http.Request, _ bool)
- func (l *RemoteProvider) Logout(w http.ResponseWriter, req *http.Request)
- func (l *RemoteProvider) Name() string
- func (l *RemoteProvider) PackageLocation() string
- func (l *RemoteProvider) PublishMetrics(tokenString string, result *MesheryResult) error
- func (l *RemoteProvider) PublishResults(req *http.Request, result *MesheryResult, profileID string) (string, error)
- func (l *RemoteProvider) PublishSmiResults(result *SmiResult) (string, error)
- func (l *RemoteProvider) ReadMeshSyncData() ([]model.Object, error)
- func (l *RemoteProvider) RecordMeshSyncData(obj model.Object) error
- func (l *RemoteProvider) RecordPreferences(req *http.Request, userID string, data *Preference) error
- func (l *RemoteProvider) RemoteApplicationFile(req *http.Request, resourceURL, path string, save bool) ([]byte, error)
- func (l *RemoteProvider) RemoteFilterFile(req *http.Request, resourceURL, path string, save bool) ([]byte, error)
- func (l *RemoteProvider) RemotePatternFile(req *http.Request, resourceURL, path string, save bool) ([]byte, error)
- func (l *RemoteProvider) SMPTestConfigDelete(req *http.Request, testUUID string) error
- func (l *RemoteProvider) SMPTestConfigFetch(req *http.Request, page, pageSize, search, order string) ([]byte, error)
- func (l *RemoteProvider) SMPTestConfigGet(req *http.Request, testUUID string) (*SMP.PerformanceTestConfig, error)
- func (l *RemoteProvider) SMPTestConfigStore(req *http.Request, perfConfig *SMP.PerformanceTestConfig) (string, error)
- func (l *RemoteProvider) SaveMesheryApplication(tokenString string, application *MesheryApplication) ([]byte, error)
- func (l *RemoteProvider) SaveMesheryFilter(tokenString string, filter *MesheryFilter) ([]byte, error)
- func (l *RemoteProvider) SaveMesheryPattern(tokenString string, pattern *MesheryPattern) ([]byte, error)
- func (l *RemoteProvider) SaveMesheryPatternResource(token string, resource *PatternResource) (*PatternResource, error)
- func (l *RemoteProvider) SavePerformanceProfile(tokenString string, pp *PerformanceProfile) ([]byte, error)
- func (l *RemoteProvider) SaveSchedule(tokenString string, s *Schedule) ([]byte, error)
- func (l *RemoteProvider) SetKubeClient(client *mesherykube.Client)
- func (l *RemoteProvider) StopSyncPreferences()
- func (l *RemoteProvider) SyncPreferences()
- func (l *RemoteProvider) TokenHandler(w http.ResponseWriter, r *http.Request, fromMiddleWare bool)
- func (l *RemoteProvider) UpdateJWKs() error
- func (l *RemoteProvider) UpdateToken(w http.ResponseWriter, r *http.Request) string
- func (l *RemoteProvider) VerifyToken(tokenString string) (*jwt.MapClaims, error)
- type Router
- type RunnerResults
- type Schedule
- type SchedulesAPIResponse
- type SelectedGrafanaConfig
- type Sidecars
- type SmiResult
- type SmiResultPage
- type SubmitMetricsConfig
- type SupportedLoadTestMethods
- type User
- type UserPref
- type UserPrefsExtension
- type UserPrefsExtensions
- type UserTestProfiles
- type Workload
Constants ¶
const ( ErrGrafanaClientCode = "2073" ErrPageSizeCode = "2074" ErrPageNumberCode = "2075" ErrResultIDCode = "2076" ErrPerfIDCode = "2077" ErrMarshalCode = "2078" ErrUnmarshalCode = "2079" ErrGenerateUUIDCode = "2080" ErrLocalProviderSupportCode = "2081" ErrGrafanaOrgCode = "2082" ErrGrafanaBoardsCode = "2083" ErrGrafanaDashboardCode = "2084" ErrGrafanaDataSourceCode = "2085" ErrNilQueryCode = "2086" ErrGrafanaDataCode = "2087" ErrApplicationFileNameCode = "2088" ErrFilterFileNameCode = "2089" ErrPatternFileNameCode = "2090" ErrMakeDirCode = "2091" ErrFolderStatCode = "2092" ErrUserIDCode = "2093" ErrDBConnectionCode = "2094" ErrNilConfigDataCode = "2095" ErrDBOpenCode = "2096" ErrDBRLockCode = "2097" ErrDBLockCode = "2098" ErrDBReadCode = "2099" ErrDBDeleteCode = "2100" ErrCopyCode = "2101" ErrDBPutCode = "2102" ErrPrometheusGetNodesCode = "2103" ErrPrometheusLabelSeriesCode = "2104" ErrPrometheusQueryRangeCode = "2105" ErrPrometheusStaticBoardCode = "2106" ErrTokenRefreshCode = "2107" ErrGetTokenCode = "2108" ErrDataReadCode = "2109" ErrTokenDecodeCode = "2110" ErrNilJWKsCode = "2111" ErrNilKeysCode = "2112" ErrTokenExpiredCode = "2113" ErrTokenClaimsCode = "2114" ErrTokenClientCheckCode = "2115" ErrTokenPraseCode = "2116" ErrJWKsKeysCode = "2117" ErrDecodeBase64Code = "2118" ErrMarshalPKIXCode = "2119" ErrEncodingPEMCode = "2120" ErrPraseUnverifiedCode = "2121" ErrEncodingCode = "2122" ErrFetchCode = "2123" ErrPostCode = "2124" ErrDeleteCode = "2125" ErrInvalidCapabilityCode = "2126" ErrResultDataCode = "2127" ErrUnableToPersistsResultCode = "2128" ErrValidURLCode = "2129" ErrTestEndpointCode = "2130" ErrLoadgeneratorCode = "2131" ErrProtocolCode = "2132" ErrTestClientCode = "2133" ErrParsingTestCode = "2134" ErrFieldCode = "2135" ErrFetchDataCode = "2147" ErrIndexOutOfRangeCode = "2148" ErrSessionCopyCode = "2149" ErrSavingSeededComponentsCode = "2152" ErrGettingSeededComponentsCode = "2153" )
const ( // LocalProviderType - represents local providers LocalProviderType ProviderType = "local" // RemoteProviderType - represents cloud providers RemoteProviderType ProviderType = "remote" // ProviderCtxKey is the context key for persisting provider to context ProviderCtxKey = "provider" // TokenCtxKey is the context key for persisting token to context TokenCtxKey = "token" // UserCtxKey is the context key for persisting user to context UserCtxKey = "user" // UserPrefsCtxKey is the context key for persisting user preferences to context PerfObjCtxKey = "perf_obj" )
Variables ¶
var ( ErrResultID = errors.New(ErrResultIDCode, errors.Alert, []string{"Given resultID is not valid"}, []string{"Given resultID is nil"}, []string{}, []string{}) ErrLocalProviderSupport = errors.New(ErrLocalProviderSupportCode, errors.Alert, []string{"Method not supported by local provider"}, []string{}, []string{}, []string{}) ErrNilQuery = errors.New(ErrNilQueryCode, errors.Alert, []string{"Query data passed is nil"}, []string{}, []string{}, []string{}) ErrApplicationFileName = errors.New(ErrApplicationFileNameCode, errors.Alert, []string{"Invalid Applicationfile"}, []string{"Name field is either not present or is not valid"}, []string{}, []string{}) ErrFilterFileName = errors.New(ErrFilterFileNameCode, errors.Alert, []string{"Invalid Filterfile"}, []string{"Name field is either not present or is not valid"}, []string{}, []string{}) ErrPatternFileName = errors.New(ErrPatternFileNameCode, errors.Alert, []string{"Invalid Patternfile"}, []string{"Name field is either not present or is not valid"}, []string{}, []string{}) ErrUserID = errors.New(ErrUserIDCode, errors.Alert, []string{"User ID is empty"}, []string{}, []string{}, []string{}) ErrDBConnection = errors.New(ErrDBConnectionCode, errors.Alert, []string{"Connection to DataBase does not exist"}, []string{}, []string{}, []string{}) ErrNilConfigData = errors.New(ErrNilConfigDataCode, errors.Alert, []string{"Given config data is nil"}, []string{}, []string{}, []string{}) ErrNilJWKs = errors.New(ErrNilJWKsCode, errors.Alert, []string{"Invalid JWks"}, []string{"Value of JWKs is nil"}, []string{}, []string{}) ErrNilKeys = errors.New(ErrNilKeysCode, errors.Alert, []string{"Key not found"}, []string{"JWK not found for the given KeyID"}, []string{}, []string{}) ErrTokenExpired = errors.New(ErrTokenExpiredCode, errors.Alert, []string{"Token has expired"}, []string{"Token is invalid, it has expired"}, []string{}, []string{}) ErrTokenClaims = errors.New(ErrTokenClaimsCode, errors.Alert, []string{"Error occurred while prasing claims"}, []string{}, []string{}, []string{}) ErrValidURL = errors.New(ErrValidURLCode, errors.Alert, []string{"Enter valid URLs"}, []string{}, []string{}, []string{}) ErrTestEndpoint = errors.New(ErrTestEndpointCode, errors.Alert, []string{"minimum one test endpoint needs to be specified"}, []string{}, []string{}, []string{}) ErrLoadgenerator = errors.New(ErrLoadgeneratorCode, errors.Alert, []string{"specify valid Loadgenerator"}, []string{}, []string{}, []string{}) ErrProtocol = errors.New(ErrProtocolCode, errors.Alert, []string{"specify the Protocol for all clients"}, []string{}, []string{}, []string{}) ErrTestClient = errors.New(ErrTestClientCode, errors.Alert, []string{"minimum one test client needs to be specified"}, []string{}, []string{}, []string{}) ErrParsingTest = errors.New(ErrParsingTestCode, errors.Alert, []string{"error parsing test duration, please refer to: https://docs.meshery.io/guides/mesheryctl#performance-management"}, []string{}, []string{}, []string{}) ErrField = errors.New(ErrFieldCode, errors.Alert, []string{"Error: name field is blank"}, []string{}, []string{}, []string{}) ErrIndexOutOfRange = errors.New(ErrIndexOutOfRangeCode, errors.Alert, []string{"Error: index out of range"}, []string{}, []string{}, []string{}) )
var (
GlobalTokenForAnonymousResults = "dev_token"
)
GlobalTokenForAnonymousResults - stores the global token for anonymous result publishing
Functions ¶
func ErrDBDelete ¶ added in v0.5.38
func ErrDBRLock ¶ added in v0.5.38
func ErrDataRead ¶ added in v0.5.38
func ErrDecodeBase64 ¶ added in v0.5.38
func ErrEncoding ¶ added in v0.5.38
func ErrEncodingPEM ¶ added in v0.5.38
func ErrFetchData ¶ added in v0.5.46
func ErrFolderStat ¶ added in v0.5.38
func ErrGenerateUUID ¶ added in v0.5.38
func ErrGetToken ¶ added in v0.5.38
func ErrGettingSeededComponents ¶ added in v0.5.58
func ErrGrafanaBoards ¶ added in v0.5.38
func ErrGrafanaClient ¶ added in v0.5.30
func ErrGrafanaDashboard ¶ added in v0.5.38
func ErrGrafanaData ¶ added in v0.5.38
func ErrGrafanaDataSource ¶ added in v0.5.38
func ErrGrafanaOrg ¶ added in v0.5.38
func ErrInvalidCapability ¶ added in v0.5.38
func ErrJWKsKeys ¶ added in v0.5.38
func ErrMakeDir ¶ added in v0.5.38
func ErrMarshal ¶ added in v0.5.38
func ErrMarshalPKIX ¶ added in v0.5.38
func ErrPageNumber ¶ added in v0.5.38
func ErrPageSize ¶ added in v0.5.38
func ErrPraseUnverified ¶ added in v0.5.38
func ErrPrometheusGetNodes ¶ added in v0.5.38
func ErrPrometheusLabelSeries ¶ added in v0.5.38
func ErrPrometheusQueryRange ¶ added in v0.5.38
func ErrPrometheusStaticBoard ¶ added in v0.5.38
func ErrResultData ¶ added in v0.5.38
func ErrResultData() error
func ErrSavingSeededComponents ¶ added in v0.5.58
func ErrSessionCopy ¶ added in v0.5.46
func ErrTokenClientCheck ¶ added in v0.5.38
func ErrTokenDecode ¶ added in v0.5.38
func ErrTokenPrase ¶ added in v0.5.38
func ErrTokenRefresh ¶ added in v0.5.38
func ErrUnableToPersistsResult ¶ added in v0.5.38
func ErrUnmarshal ¶ added in v0.5.38
func GetApplicationName ¶ added in v0.5.24
GetApplicationName takes in a stringified applicationfile and extracts the name from it
func GetFilterName ¶ added in v0.5.12
GetFilterName takes in a stringified filterfile and extracts the name from it
func GetPatternName ¶ added in v0.5.6
GetPatternName takes in a stringified patternfile and extracts the name from it
func SMPPerformanceTestConfigValidator ¶ added in v0.4.7
func SMPPerformanceTestConfigValidator(perfTest *SMP.PerformanceTestConfig) error
SMPPerformanceTestConfigValidator performs validations on the given PerformanceTestConfig object
Types ¶
type Adapter ¶ added in v0.0.6
type Adapter struct { Location string `json:"adapter_location"` Name string `json:"name"` Version string `json:"version"` GitCommitSHA string `json:"git_commit_sha"` Ops []*meshes.SupportedOperation `json:"ops"` }
Adapter represents an adapter in Meshery
type AdaptersTrackerInterface ¶ added in v0.0.6
type AdaptersTrackerInterface interface { AddAdapter(context.Context, Adapter) RemoveAdapter(context.Context, Adapter) GetAdapters(context.Context) []Adapter }
AdaptersTrackerInterface defines the methods a type should implement to be an adapter tracker
type ApplicationsAPIResponse ¶ added in v0.5.24
type ApplicationsAPIResponse struct { Page uint `json:"page"` PageSize uint `json:"page_size"` TotalCount uint `json:"total_count"` Applications []MesheryApplication `json:"applications"` }
ApplicationsAPIResponse response retruned by patternfile endpoint on meshery server
type BitCaskPreferencePersister ¶ added in v0.3.3
type BitCaskPreferencePersister struct {
// contains filtered or unexported fields
}
BitCaskPreferencePersister assists with persisting session in a Bitcask store
func NewBitCaskPreferencePersister ¶ added in v0.3.3
func NewBitCaskPreferencePersister(folderName string) (*BitCaskPreferencePersister, error)
NewBitCaskPreferencePersister creates a new BitCaskPreferencePersister instance
func (*BitCaskPreferencePersister) ClosePersister ¶ added in v0.3.3
func (s *BitCaskPreferencePersister) ClosePersister()
ClosePersister closes the badger store
func (*BitCaskPreferencePersister) DeleteFromPersister ¶ added in v0.3.3
func (s *BitCaskPreferencePersister) DeleteFromPersister(userID string) error
DeleteFromPersister removes the session for the user
func (*BitCaskPreferencePersister) ReadFromPersister ¶ added in v0.3.3
func (s *BitCaskPreferencePersister) ReadFromPersister(userID string) (*Preference, error)
ReadFromPersister - reads the session data for the given userID
func (*BitCaskPreferencePersister) WriteToPersister ¶ added in v0.3.3
func (s *BitCaskPreferencePersister) WriteToPersister(userID string, data *Preference) error
WriteToPersister persists session for the user
type BitCaskSmiResultsPersister ¶ added in v0.4.7
type BitCaskSmiResultsPersister struct {
// contains filtered or unexported fields
}
BitCaskSmiResultsPersister assists with persisting session in a Bitcask store
func NewBitCaskSmiResultsPersister ¶ added in v0.4.7
func NewBitCaskSmiResultsPersister(folderName string) (*BitCaskSmiResultsPersister, error)
NewBitCaskSmiResultsPersister creates a new BitCaskSmiResultsPersister instance
func (*BitCaskSmiResultsPersister) CloseResultPersister ¶ added in v0.4.7
func (s *BitCaskSmiResultsPersister) CloseResultPersister()
CloseSmiResultPersister closes the badger store
func (*BitCaskSmiResultsPersister) GetResults ¶ added in v0.4.7
func (s *BitCaskSmiResultsPersister) GetResults(page, pageSize uint64) ([]byte, error)
GetSmiResults - gets result for the page and pageSize
func (*BitCaskSmiResultsPersister) WriteResult ¶ added in v0.4.7
func (s *BitCaskSmiResultsPersister) WriteResult(key uuid.UUID, result []byte) error
WriteSmiResult persists the result
type BitCaskTestProfilesPersister ¶ added in v0.4.2
type BitCaskTestProfilesPersister struct {
// contains filtered or unexported fields
}
BitCaskTestProfilesPersister assists with persisting session in a Bitcask store
func NewBitCaskTestProfilesPersister ¶ added in v0.4.2
func NewBitCaskTestProfilesPersister(folderName string) (*BitCaskTestProfilesPersister, error)
NewBitCaskTestProfilesPersister creates a new BitCaskTestProfilesPersister instance
func (*BitCaskTestProfilesPersister) CloseTestConfigsPersister ¶ added in v0.4.2
func (s *BitCaskTestProfilesPersister) CloseTestConfigsPersister()
CloseTestConfigsPersister closes the badger store
func (*BitCaskTestProfilesPersister) DeleteTestConfig ¶ added in v0.4.2
func (s *BitCaskTestProfilesPersister) DeleteTestConfig(key uuid.UUID) error
DeleteTestConfig - delete result for a specific key
func (*BitCaskTestProfilesPersister) GetTestConfig ¶ added in v0.4.2
func (s *BitCaskTestProfilesPersister) GetTestConfig(key uuid.UUID) (*SMP.PerformanceTestConfig, error)
GetTestConfig - gets result for a specific key
func (*BitCaskTestProfilesPersister) GetTestConfigs ¶ added in v0.4.2
func (s *BitCaskTestProfilesPersister) GetTestConfigs(page, pageSize uint64) ([]byte, error)
GetTestConfigs - gets result for the page and pageSize
func (*BitCaskTestProfilesPersister) WriteTestConfig ¶ added in v0.4.2
func (s *BitCaskTestProfilesPersister) WriteTestConfig(key uuid.UUID, result []byte) error
WriteTestConfig persists the result
type Capabilities ¶ added in v0.5.1
type Capabilities []Capability
Capabilities is the collection of capability
func (Capabilities) GetEndpointForFeature ¶ added in v0.5.1
func (caps Capabilities) GetEndpointForFeature(feature Feature) (string, bool)
GetEndpointForFeature returns the endpoint for the given feature
Existence of a feature DOES NOT guarantee that the endpoint would be a not empty string as some of the features may not require an endpoint
func (Capabilities) IsSupported ¶ added in v0.5.1
func (caps Capabilities) IsSupported(feature Feature) bool
IsSupported returns true if the given feature is listed as one of the capabilities of the provider
type Capability ¶ added in v0.3.12
type Capability struct { Feature Feature `json:"feature,omitempty"` Endpoint string `json:"endpoint,omitempty"` }
Capability is a capability of Provider indicating whether a feature is present
type DefaultLocalProvider ¶ added in v0.3.10
type DefaultLocalProvider struct { *MapPreferencePersister ProviderProperties ProviderBaseURL string ResultPersister *MesheryResultsPersister SmiResultPersister *BitCaskSmiResultsPersister TestProfilesPersister *BitCaskTestProfilesPersister PerformanceProfilesPersister *PerformanceProfilePersister MesheryPatternPersister *MesheryPatternPersister MesheryPatternResourcePersister *PatternResourcePersister MesheryApplicationPersister *MesheryApplicationPersister MesheryFilterPersister *MesheryFilterPersister GenericPersister database.Handler KubeClient *mesherykube.Client }
DefaultLocalProvider - represents a local provider
func (*DefaultLocalProvider) CleanupSeeded ¶ added in v0.5.58
func (l *DefaultLocalProvider) CleanupSeeded(seededUUIDs []uuid.UUID)
func (*DefaultLocalProvider) DeleteMesheryApplication ¶ added in v0.5.26
func (l *DefaultLocalProvider) DeleteMesheryApplication(req *http.Request, applicationID string) ([]byte, error)
DeleteMesheryApplication deletes a meshery application with the given id
func (*DefaultLocalProvider) DeleteMesheryFilter ¶ added in v0.5.4
func (l *DefaultLocalProvider) DeleteMesheryFilter(req *http.Request, filterID string) ([]byte, error)
DeleteMesheryFilter deletes a meshery filter with the given id
func (*DefaultLocalProvider) DeleteMesheryPattern ¶ added in v0.5.1
func (l *DefaultLocalProvider) DeleteMesheryPattern(req *http.Request, patternID string) ([]byte, error)
DeleteMesheryPattern deletes a meshery pattern with the given id
func (*DefaultLocalProvider) DeleteMesheryPatternResource ¶ added in v0.5.46
func (l *DefaultLocalProvider) DeleteMesheryPatternResource(token, resourceID string) error
func (*DefaultLocalProvider) DeletePerformanceProfile ¶ added in v0.5.2
func (l *DefaultLocalProvider) DeletePerformanceProfile(req *http.Request, performanceProfileID string) ([]byte, error)
DeletePerformanceProfile deletes a meshery performance profile with the given id
func (*DefaultLocalProvider) DeleteSchedule ¶ added in v0.5.2
DeleteSchedule deletes a schedule with the given id
func (*DefaultLocalProvider) Description ¶ added in v0.3.10
func (l *DefaultLocalProvider) Description() []string
Description - returns a short description of the provider for display in the Provider UI
func (*DefaultLocalProvider) ExtractToken ¶ added in v0.3.15
func (l *DefaultLocalProvider) ExtractToken(w http.ResponseWriter, r *http.Request)
ExtractToken - Returns the auth token and the provider type
func (*DefaultLocalProvider) FetchAllResults ¶ added in v0.5.2
func (l *DefaultLocalProvider) FetchAllResults(tokenString string, page, pageSize, search, order, from, to string) ([]byte, error)
FetchResults - fetches results from provider backend
func (*DefaultLocalProvider) FetchResults ¶ added in v0.3.10
func (l *DefaultLocalProvider) FetchResults(tokenVal, page, pageSize, search, order, profileID string) ([]byte, error)
FetchResults - fetches results from provider backend
func (*DefaultLocalProvider) FetchSmiResults ¶ added in v0.4.7
func (l *DefaultLocalProvider) FetchSmiResults(req *http.Request, page, pageSize, search, order string) ([]byte, error)
FetchSmiResults - fetches results from provider backend
func (*DefaultLocalProvider) GetGenericPersister ¶ added in v0.5.1
func (l *DefaultLocalProvider) GetGenericPersister() *database.Handler
GetGenericPersister - to return persister
func (*DefaultLocalProvider) GetKubeClient ¶ added in v0.5.2
func (l *DefaultLocalProvider) GetKubeClient() *mesherykube.Client
GetKubeClient - to get meshery kubernetes client
func (*DefaultLocalProvider) GetMesheryApplication ¶ added in v0.5.26
func (l *DefaultLocalProvider) GetMesheryApplication(req *http.Request, applicationID string) ([]byte, error)
GetMesheryApplication gets application for the given applicationID
func (*DefaultLocalProvider) GetMesheryApplications ¶ added in v0.5.26
func (l *DefaultLocalProvider) GetMesheryApplications(req *http.Request, page, pageSize, search, order string) ([]byte, error)
GetMesheryApplications gives the applications stored with the provider
func (*DefaultLocalProvider) GetMesheryFilter ¶ added in v0.5.4
GetMesheryFilter gets filter for the given filterID
func (*DefaultLocalProvider) GetMesheryFilterFile ¶ added in v0.5.37
func (l *DefaultLocalProvider) GetMesheryFilterFile(req *http.Request, filterID string) ([]byte, error)
GetMesheryFilterFile gets filter for the given filterID without the metadata
func (*DefaultLocalProvider) GetMesheryFilters ¶ added in v0.5.4
func (l *DefaultLocalProvider) GetMesheryFilters(req *http.Request, page, pageSize, search, order string) ([]byte, error)
GetMesheryFilters gives the filters stored with the provider
func (*DefaultLocalProvider) GetMesheryPattern ¶ added in v0.5.1
func (l *DefaultLocalProvider) GetMesheryPattern(req *http.Request, patternID string) ([]byte, error)
GetMesheryPattern gets pattern for the given patternID
func (*DefaultLocalProvider) GetMesheryPatternResource ¶ added in v0.5.30
func (l *DefaultLocalProvider) GetMesheryPatternResource(token, resourceID string) (*PatternResource, error)
func (*DefaultLocalProvider) GetMesheryPatternResources ¶ added in v0.5.30
func (l *DefaultLocalProvider) GetMesheryPatternResources( token, page, pageSize, search, order, name, namespace, typ, oamType string, ) (*PatternResourcePage, error)
func (*DefaultLocalProvider) GetMesheryPatterns ¶ added in v0.5.1
func (l *DefaultLocalProvider) GetMesheryPatterns(req *http.Request, page, pageSize, search, order string) ([]byte, error)
GetMesheryPatterns gives the patterns stored with the provider
func (*DefaultLocalProvider) GetPerformanceProfile ¶ added in v0.5.2
func (l *DefaultLocalProvider) GetPerformanceProfile(req *http.Request, performanceProfileID string) ([]byte, error)
GetPerformanceProfile gets performance profile for the given performance profileID
func (*DefaultLocalProvider) GetPerformanceProfiles ¶ added in v0.5.2
func (l *DefaultLocalProvider) GetPerformanceProfiles(tokenString string, page, pageSize, search, order string) ([]byte, error)
GetPerformanceProfiles gives the performance profiles stored with the provider
func (*DefaultLocalProvider) GetProviderCapabilities ¶ added in v0.5.1
func (l *DefaultLocalProvider) GetProviderCapabilities(w http.ResponseWriter, r *http.Request)
GetProviderCapabilities returns all of the provider properties
func (*DefaultLocalProvider) GetProviderProperties ¶ added in v0.3.12
func (l *DefaultLocalProvider) GetProviderProperties() ProviderProperties
GetProviderProperties - Returns all the provider properties required
func (*DefaultLocalProvider) GetProviderToken ¶ added in v0.3.10
func (l *DefaultLocalProvider) GetProviderToken(req *http.Request) (string, error)
GetProviderToken - returns provider token
func (*DefaultLocalProvider) GetProviderType ¶ added in v0.3.10
func (l *DefaultLocalProvider) GetProviderType() ProviderType
GetProviderType - Returns ProviderType
func (*DefaultLocalProvider) GetResult ¶ added in v0.3.10
func (l *DefaultLocalProvider) GetResult(tokenVal string, resultID uuid.UUID) (*MesheryResult, error)
GetResult - fetches result from provider backend for the given result id
func (*DefaultLocalProvider) GetSchedule ¶ added in v0.5.2
GetSchedule gets a schedule with the given id
func (*DefaultLocalProvider) GetSchedules ¶ added in v0.5.2
func (l *DefaultLocalProvider) GetSchedules(req *http.Request, page, pageSize, order string) ([]byte, error)
GetSchedules gets the schedules stored by the current user
func (*DefaultLocalProvider) GetSession ¶ added in v0.3.10
func (l *DefaultLocalProvider) GetSession(req *http.Request) error
GetSession - returns the session
func (*DefaultLocalProvider) GetUserDetails ¶ added in v0.3.10
func (l *DefaultLocalProvider) GetUserDetails(req *http.Request) (*User, error)
GetUserDetails - returns the user details
func (*DefaultLocalProvider) Initialize ¶ added in v0.5.1
func (l *DefaultLocalProvider) Initialize()
Initialize will initialize the local provider
func (*DefaultLocalProvider) InitiateLogin ¶ added in v0.3.10
func (l *DefaultLocalProvider) InitiateLogin(w http.ResponseWriter, r *http.Request, fromMiddleWare bool)
InitiateLogin - initiates login flow and returns a true to indicate the handler to "return" or false to continue
func (*DefaultLocalProvider) Logout ¶ added in v0.3.10
func (l *DefaultLocalProvider) Logout(w http.ResponseWriter, req *http.Request)
Logout - logout from provider backend
func (*DefaultLocalProvider) Name ¶ added in v0.3.10
func (l *DefaultLocalProvider) Name() string
Name - Returns Provider's friendly name
func (*DefaultLocalProvider) PackageLocation ¶ added in v0.5.1
func (l *DefaultLocalProvider) PackageLocation() string
PackageLocation returns an empty string as there is no extension package for the local provider
func (*DefaultLocalProvider) PublishMetrics ¶ added in v0.3.10
func (l *DefaultLocalProvider) PublishMetrics(_ string, result *MesheryResult) error
PublishMetrics - publishes metrics to the provider backend asyncronously
func (*DefaultLocalProvider) PublishResults ¶ added in v0.3.10
func (l *DefaultLocalProvider) PublishResults(req *http.Request, result *MesheryResult, profileID string) (string, error)
PublishResults - publishes results to the provider backend synchronously
func (*DefaultLocalProvider) PublishSmiResults ¶ added in v0.4.7
func (l *DefaultLocalProvider) PublishSmiResults(result *SmiResult) (string, error)
PublishSmiResults - publishes results to the provider backend synchronously
func (*DefaultLocalProvider) ReadMeshSyncData ¶ added in v0.5.1
func (l *DefaultLocalProvider) ReadMeshSyncData() ([]model.Object, error)
ReadMeshSyncData reads the mesh sync data
func (*DefaultLocalProvider) RecordMeshSyncData ¶ added in v0.5.1
func (l *DefaultLocalProvider) RecordMeshSyncData(obj model.Object) error
RecordMeshSyncData records the mesh sync data
func (*DefaultLocalProvider) RecordPreferences ¶ added in v0.3.10
func (l *DefaultLocalProvider) RecordPreferences(req *http.Request, userID string, data *Preference) error
RecordPreferences - records the user preference
func (*DefaultLocalProvider) RemoteApplicationFile ¶ added in v0.5.26
func (l *DefaultLocalProvider) RemoteApplicationFile(req *http.Request, resourceURL, path string, save bool) ([]byte, error)
RemoteApplicationFile takes in the
func (*DefaultLocalProvider) RemoteFilterFile ¶ added in v0.5.12
func (l *DefaultLocalProvider) RemoteFilterFile(req *http.Request, resourceURL, path string, save bool) ([]byte, error)
RemoteFilterFile takes in the
func (*DefaultLocalProvider) RemotePatternFile ¶ added in v0.5.6
func (l *DefaultLocalProvider) RemotePatternFile(req *http.Request, resourceURL, path string, save bool) ([]byte, error)
RemotePatternFile takes in the
func (*DefaultLocalProvider) SMPTestConfigDelete ¶ added in v0.4.7
func (l *DefaultLocalProvider) SMPTestConfigDelete(req *http.Request, testUUID string) error
SMPTestConfigDelete deletes the given PerformanceTestConfig from the local datastore
func (*DefaultLocalProvider) SMPTestConfigFetch ¶ added in v0.4.7
func (l *DefaultLocalProvider) SMPTestConfigFetch(req *http.Request, page, pageSize, search, order string) ([]byte, error)
SMPTestConfigFetch gets all the PerformanceTestConfigs from the local datastore
func (*DefaultLocalProvider) SMPTestConfigGet ¶ added in v0.4.7
func (l *DefaultLocalProvider) SMPTestConfigGet(req *http.Request, testUUID string) (*SMP.PerformanceTestConfig, error)
SMPTestConfigGet gets the given PerformanceTestConfig from the local datastore
func (*DefaultLocalProvider) SMPTestConfigStore ¶ added in v0.4.7
func (l *DefaultLocalProvider) SMPTestConfigStore(req *http.Request, perfConfig *SMP.PerformanceTestConfig) (string, error)
SMPTestConfigStore Stores the given PerformanceTestConfig into local datastore
func (*DefaultLocalProvider) SaveMesheryApplication ¶ added in v0.5.26
func (l *DefaultLocalProvider) SaveMesheryApplication(tokenString string, application *MesheryApplication) ([]byte, error)
SaveMesheryApplication saves given application with the provider
func (*DefaultLocalProvider) SaveMesheryFilter ¶ added in v0.5.4
func (l *DefaultLocalProvider) SaveMesheryFilter(tokenString string, filter *MesheryFilter) ([]byte, error)
SaveMesheryFilter saves given filter with the provider
func (*DefaultLocalProvider) SaveMesheryPattern ¶ added in v0.5.1
func (l *DefaultLocalProvider) SaveMesheryPattern(tokenString string, pattern *MesheryPattern) ([]byte, error)
SaveMesheryPattern saves given pattern with the provider
func (*DefaultLocalProvider) SaveMesheryPatternResource ¶ added in v0.5.30
func (l *DefaultLocalProvider) SaveMesheryPatternResource(token string, resource *PatternResource) (*PatternResource, error)
func (*DefaultLocalProvider) SavePerformanceProfile ¶ added in v0.5.2
func (l *DefaultLocalProvider) SavePerformanceProfile(tokenString string, performanceProfile *PerformanceProfile) ([]byte, error)
SavePerformanceProfile saves given performance profile with the provider
func (*DefaultLocalProvider) SaveSchedule ¶ added in v0.5.2
func (l *DefaultLocalProvider) SaveSchedule(tokenString string, schedule *Schedule) ([]byte, error)
SaveSchedule saves a schedule
func (*DefaultLocalProvider) SeedContent ¶ added in v0.5.58
func (l *DefaultLocalProvider) SeedContent(log logger.Handler) []uuid.UUID
func (*DefaultLocalProvider) SetKubeClient ¶ added in v0.5.2
func (l *DefaultLocalProvider) SetKubeClient(client *mesherykube.Client)
SetKubeClient - to set meshery kubernetes client
func (*DefaultLocalProvider) TokenHandler ¶ added in v0.3.15
func (l *DefaultLocalProvider) TokenHandler(w http.ResponseWriter, r *http.Request, fromMiddleWare bool)
TokenHandler - specific to remote auth
func (*DefaultLocalProvider) UpdateToken ¶ added in v0.3.15
func (l *DefaultLocalProvider) UpdateToken(http.ResponseWriter, *http.Request) string
UpdateToken - specific to remote auth
type Detail ¶ added in v0.4.7
type Detail struct { SmiSpecification string `json:"smi_specification,omitempty"` SmiVersion string `json:"smi_version,omitempty"` Time string `json:"time,omitempty"` Assertions string `json:"assertions,omitempty"` Result string `json:"result,omitempty"` Reason string `json:"reason,omitempty"` Capability string `json:"capability,omitempty"` Status string `json:"status,omitempty"` }
type Environment ¶ added in v0.3.10
type Environment struct { Kubernetes string `yaml:"kubernetes,omitempty"` NodeCount int `yaml:"node_count,omitempty"` }
Environment - represents a kubernetes environment
type ExtensionInput ¶ added in v0.5.1
type ExtensionInput struct { DBHandler *database.Handler MeshSyncChannel chan struct{} Logger logger.Handler BrokerConn broker.Handler }
ExtensionInput - input for a plugin
type ExtensionOutput ¶ added in v0.5.1
type ExtensionOutput struct {
Router *Router
}
ExtensionOutput - output for a plugin
type Extensions ¶ added in v0.5.1
type Extensions struct { UserPrefs UserPrefsExtensions `json:"user_prefs,omitempty"` GraphQL GraphQLExtensions `json:"graphql,omitempty"` }
Extensions defines the UI extension points
type Feature ¶ added in v0.5.1
type Feature string
Feature is a type to store the features of the provider
const ( // SyncPrefs indicates the Preference Synchronization feature SyncPrefs Feature = "sync-prefs" // /user/preferences PersistResults Feature = "persist-results" // /results PersistResult Feature = "persist-result" // /result PersistSMIResults Feature = "persist-smi-results" // /smi/results PersistSMIResult Feature = "persist-smi-result" // /smi/result PersistMetrics Feature = "persist-metrics" // /result/metrics PersistSMPTestProfile Feature = "persist-smp-test-profile" // /user/test-config PersistMesheryPatterns Feature = "persist-meshery-patterns" // /patterns PersistMesheryPatternResources Feature = "persist-meshery-pattern-resources" // /patterns/resources PersistMesheryFilters Feature = "persist-meshery-filters" // /filter PersistMesheryApplications Feature = "persist-meshery-applications" // /applications PersistPerformanceProfiles Feature = "persist-performance-profiles" // /user/performance/profile PersistSchedules Feature = "persist-schedules" // /user/schedules )
type FiltersAPIResponse ¶ added in v0.5.12
type FiltersAPIResponse struct { Page uint `json:"page"` PageSize uint `json:"page_size"` TotalCount uint `json:"total_count"` Filters []MesheryFilter `json:"filters"` }
FiltersAPIResponse response retruned by filterfile endpoint on meshery server
type Grafana ¶ added in v0.0.6
type Grafana struct { GrafanaURL string `json:"grafanaURL,omitempty"` GrafanaAPIKey string `json:"grafanaAPIKey,omitempty"` // GrafanaBoardSearch string `json:"grafanaBoardSearch,omitempty"` GrafanaBoards []*SelectedGrafanaConfig `json:"selectedBoardsConfigs,omitempty"` }
Grafana represents the Grafana session config
type GrafanaBoard ¶ added in v0.0.6
type GrafanaBoard struct { URI string `json:"uri,omitempty"` Title string `json:"title,omitempty"` Slug string `json:"slug,omitempty"` UID string `json:"uid,omitempty"` OrgID uint `json:"org_id,omitempty"` Panels []*sdk.Panel `json:"panels,omitempty"` TemplateVars []*GrafanaTemplateVars `json:"template_vars,omitempty"` }
GrafanaBoard represents a Grafana board
type GrafanaClient ¶ added in v0.2.4
type GrafanaClient struct {
// contains filtered or unexported fields
}
GrafanaClient represents a client to Grafana in Meshery
func NewGrafanaClient ¶ added in v0.2.4
func NewGrafanaClient() *GrafanaClient
NewGrafanaClient returns a new GrafanaClient
func NewGrafanaClientForPrometheusWithHTTPClient ¶ added in v0.2.4
func NewGrafanaClientForPrometheusWithHTTPClient(client *http.Client) *GrafanaClient
NewGrafanaClientForPrometheusWithHTTPClient returns a limited GrafanaClient for use with Prometheus with the given HTTP client
func NewGrafanaClientWithHTTPClient ¶ added in v0.2.4
func NewGrafanaClientWithHTTPClient(client *http.Client) *GrafanaClient
NewGrafanaClientWithHTTPClient returns a new GrafanaClient with the given HTTP Client
func (*GrafanaClient) Close ¶ added in v0.2.4
func (g *GrafanaClient) Close()
Close - closes idle connections
func (*GrafanaClient) GetGrafanaBoards ¶ added in v0.2.4
func (g *GrafanaClient) GetGrafanaBoards(ctx context.Context, BaseURL, APIKey, dashboardSearch string) ([]*GrafanaBoard, error)
GetGrafanaBoards retrieves all the Grafana boards matching a search
func (*GrafanaClient) GrafanaQuery ¶ added in v0.2.4
func (g *GrafanaClient) GrafanaQuery(ctx context.Context, BaseURL, APIKey string, queryData *url.Values) ([]byte, error)
GrafanaQuery parses the provided query data and queries Grafana and streams response
func (*GrafanaClient) GrafanaQueryRange ¶ added in v0.2.4
func (g *GrafanaClient) GrafanaQueryRange(ctx context.Context, BaseURL, APIKey string, queryData *url.Values) ([]byte, error)
GrafanaQueryRange parses the given params and performs Grafana range queries
func (*GrafanaClient) ProcessBoard ¶ added in v0.2.4
func (g *GrafanaClient) ProcessBoard(ctx context.Context, c *sdk.Client, board *sdk.Board, link *sdk.FoundBoard) (*GrafanaBoard, error)
ProcessBoard accepts raw Grafana board and returns a processed GrafanaBoard to be used in Meshery
type GrafanaConfigParams ¶ added in v0.5.27
type GrafanaConfigParams struct { GrafanaURL string `json:"grafanaURL,omitempty"` GrafanaAPIKey string `json:"grafanaAPIKey,omitempty"` }
Parameters to save Grafana configuration
type GrafanaDataSource ¶ added in v0.0.6
GrafanaDataSource represents a Grafana datasource like Prometheus
type GrafanaPanel ¶ added in v0.0.6
type GrafanaPanel struct { PType string `json:"type,omitempty"` ID uint `json:"id,omitempty"` Title string `json:"title,omitempty"` }
GrafanaPanel represents Grafana panel
type GrafanaTemplateVars ¶ added in v0.0.6
type GrafanaTemplateVars struct { Name string `json:"name,omitempty"` Query string `json:"query,omitempty"` Datasource *GrafanaDataSource `json:"datasource,omitempty"` Hide uint8 `json:"hide,omitempty"` Value interface{} `json:"value,omitempty"` }
GrafanaTemplateVars represents template variables in a bboard
type GraphQLExtension ¶ added in v0.5.1
type GraphQLExtension struct { Component string `json:"component,omitempty"` Path string `json:"path,omitempty"` }
GraphQLExtension describes the graphql server extension point in the backend
type GraphQLExtensions ¶ added in v0.5.1
type GraphQLExtensions []GraphQLExtension
GraphQLExtensions is a collection of GraphQLExtension endpoints
type HandlerConfig ¶
type HandlerConfig struct { AdapterTracker AdaptersTrackerInterface QueryTracker QueryTrackerInterface Queue taskq.Queue KubeConfigFolder string KubeClient *mesherykube.Client GrafanaClient *GrafanaClient GrafanaClientForQuery *GrafanaClient PrometheusClient *PrometheusClient PrometheusClientForQuery *PrometheusClient Providers map[string]Provider ProviderCookieName string ProviderCookieDuration time.Duration }
HandlerConfig holds all the config pieces needed by handler methods
type HandlerInterface ¶
type HandlerInterface interface { ServerVersionHandler(w http.ResponseWriter, r *http.Request) ProviderMiddleware(http.Handler) http.Handler AuthMiddleware(http.Handler) http.Handler SessionInjectorMiddleware(func(http.ResponseWriter, *http.Request, *Preference, *User, Provider)) http.Handler GraphqlMiddleware(http.Handler) func(http.ResponseWriter, *http.Request, *Preference, *User, Provider) ProviderHandler(w http.ResponseWriter, r *http.Request) ProvidersHandler(w http.ResponseWriter, r *http.Request) ProviderUIHandler(w http.ResponseWriter, r *http.Request) ProviderCapabilityHandler(w http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider) ProviderComponentsHandler(w http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider) TokenHandler(w http.ResponseWriter, r *http.Request, provider Provider, fromMiddleWare bool) LoginHandler(w http.ResponseWriter, r *http.Request, provider Provider, fromMiddleWare bool) LogoutHandler(w http.ResponseWriter, req *http.Request, provider Provider) UserHandler(w http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider) K8SConfigHandler(w http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider) GetContextsFromK8SConfig(w http.ResponseWriter, req *http.Request) KubernetesPingHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) LoadTestHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) LoadTestUsingSMPHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) CollectStaticMetrics(config *SubmitMetricsConfig) error FetchResultsHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) FetchAllResultsHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) GetResultHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) GetSMPServiceMeshes(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) FetchSmiResultsHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) MeshAdapterConfigHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) MeshOpsHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) AdaptersHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) EventStreamHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) AdapterPingHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) GrafanaConfigHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) GrafanaBoardsHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) GrafanaQueryHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) GrafanaQueryRangeHandler(w http.ResponseWriter, req *http.Request) GrafanaPingHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) SaveSelectedGrafanaBoardsHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) ScanPromGrafanaHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) ScanPrometheusHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) ScanGrafanaHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) PrometheusConfigHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) GrafanaBoardImportForPrometheusHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) PrometheusQueryHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) PrometheusQueryRangeHandler(w http.ResponseWriter, req *http.Request) PrometheusPingHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) PrometheusStaticBoardHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) SaveSelectedPrometheusBoardsHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) UserPrefsHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) UserTestPreferenceHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) UserTestPreferenceStore(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) UserTestPreferenceGet(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) UserTestPreferenceDelete(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) SavePerformanceProfileHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) GetPerformanceProfilesHandler(w http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider) GetPerformanceProfileHandler(w http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider) DeletePerformanceProfileHandler(w http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider) SessionSyncHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) PatternFileHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider) OAMRegisterHandler(rw http.ResponseWriter, r *http.Request) OAMComponentDetailsHandler(rw http.ResponseWriter, r *http.Request) OAMComponentDetailByIDHandler(rw http.ResponseWriter, r *http.Request) PatternFileRequestHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider) DeleteMesheryPatternHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider) GetMesheryPatternHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider) FilterFileHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider) GetMesheryFilterFileHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider) FilterFileRequestHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider) GetMesheryFilterHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider) DeleteMesheryFilterHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider) ApplicationFileHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider) ApplicationFileRequestHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider) GetMesheryApplicationHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider) DeleteMesheryApplicationHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider) ExtensionsEndpointHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) LoadExtensionFromPackage(w http.ResponseWriter, req *http.Request, provider Provider) error ExtensionsVersionHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) SaveScheduleHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider) GetSchedulesHandler(w http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider) GetScheduleHandler(w http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider) DeleteScheduleHandler(w http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider) }
HandlerInterface defines the methods a Handler should define
type IngressGateway ¶ added in v0.3.10
type IngressGateway struct { Count int `yaml:"count,omitempty"` CPUMCores float64 `yaml:"cpu_mCores,omitempty"` MemMb float64 `yaml:"mem_mb,omitempty"` Rps float64 `yaml:"rps,omitempty"` Bps float64 `yaml:"bps,omitempty"` }
IngressGateway - holds ingress gateway info
type K8SConfig ¶ added in v0.0.6
type K8SConfig struct { InClusterConfig bool `json:"inClusterConfig,omitempty"` K8Sfile string `json:"k8sfile,omitempty"` Config []byte `json:"config,omitempty"` Server string `json:"configuredServer,omitempty"` ContextName string `json:"contextName,omitempty"` ClusterConfigured bool `json:"clusterConfigured,omitempty"` Contexts []K8SContext `json:"contexts,omitempty"` ServerVersion string `json:"server_version,omitempty"` Nodes []*K8SNode `json:"nodes,omitempty"` }
K8SConfig represents all the k8s session config
type K8SContext ¶ added in v0.0.6
type K8SContext struct { ContextName string `json:"contextName"` ClusterName string `json:"clusterName"` // ContextDisplayName string `json:"context-display-name"` IsCurrentContext bool `json:"currentContext"` }
K8SContext is just used to send contexts to the UI
type K8SNode ¶ added in v0.1.6
type K8SNode struct { InternalIP string `json:"internal_ip,omitempty"` HostName string `json:"hostname,omitempty"` AllocatableCPU string `json:"allocatable_cpu,omitempty"` AllocatableMemory string `json:"allocatable_memory,omitempty"` CapacityCPU string `json:"capacity_cpu,omitempty"` CapacityMemory string `json:"capacity_memory,omitempty"` OSImage string `json:"os_image,omitempty"` OperatingSystem string `json:"operating_system,omitempty"` KubeletVersion string `json:"kubelet_version,omitempty"` KubeProxyVersion string `json:"kubeproxy_version,omitempty"` ContainerRuntimeVersion string `json:"container_runtime_version,omitempty"` Architecture string `json:"architecture,omitempty"` }
K8SNode - represents a kubernetes node
type LatenciesMs ¶ added in v0.3.10
type LatenciesMs struct { Min float64 `yaml:"min,omitempty"` Average float64 `yaml:"average,omitempty"` P50 float64 `yaml:"p50,omitempty"` P90 float64 `yaml:"p90,omitempty"` P99 float64 `yaml:"p99,omitempty"` Max float64 `yaml:"max,omitempty"` }
LatenciesMs - represents a collection of important latencies
type LoadGenerator ¶ added in v0.3.1
type LoadGenerator string
LoadGenerator - represents the load generator type
const ( // FortioLG - represents the Fortio load generator FortioLG LoadGenerator = "fortio" // Wrk2LG - represents the wrk2 load generator Wrk2LG LoadGenerator = "wrk2" // NighthawkLG - represents the nighthawk load generator NighthawkLG LoadGenerator = "nighthawk" )
func (LoadGenerator) Name ¶ added in v0.3.7
func (l LoadGenerator) Name() string
Name - retrieves a string value for the generator
type LoadTestOptions ¶ added in v0.0.6
type LoadTestOptions struct { Name string Location string URL string HTTPQPS float64 HTTPNumThreads int Headers *map[string]string Cookies *map[string]string Body []byte ContentType string IsInsecure bool Duration time.Duration LoadGenerator LoadGenerator SupportedLoadTestMethods SupportedLoadTestMethods Cert, Key, CACert string AllowInitialErrors bool // Values required for fortio gRPC health & ping test GRPCStreamsCount int GRPCDoHealth bool GRPCHealthSvc string GRPCDoPing bool GRPCPingDelay time.Duration }
LoadTestOptions represents the load test options
type LoadTestPreferences ¶ added in v0.3.7
type LoadTestPreferences struct { ConcurrentRequests int `json:"c,omitempty"` QueriesPerSecond int `json:"qps,omitempty"` Duration string `json:"t,omitempty"` LoadGenerator string `json:"gen,omitempty"` }
LoadTestPreferences represents the load test preferences
type LoadTestResponse ¶ added in v0.2.0
type LoadTestResponse struct { Status LoadTestStatus `json:"status,omitempty"` Message string `json:"message,omitempty"` Result *MesheryResult `json:"result,omitempty"` }
LoadTestResponse - used to bundle the response with status to the client
type LoadTestStatus ¶ added in v0.2.0
type LoadTestStatus string
LoadTestStatus - used for representing load test status
const ( // LoadTestError - respresents an error status LoadTestError LoadTestStatus = "error" // LoadTestInfo - represents a info status LoadTestInfo LoadTestStatus = "info" // LoadTestSuccess - represents a success status LoadTestSuccess LoadTestStatus = "success" )
type MapPreferencePersister ¶ added in v0.3.3
type MapPreferencePersister struct {
// contains filtered or unexported fields
}
MapPreferencePersister assists with persisting session in a badger store
func NewMapPreferencePersister ¶ added in v0.3.3
func NewMapPreferencePersister() (*MapPreferencePersister, error)
NewMapPreferencePersister creates a new MapPreferencePersister instance
func (*MapPreferencePersister) ClosePersister ¶ added in v0.3.3
func (s *MapPreferencePersister) ClosePersister()
ClosePersister closes the DB
func (*MapPreferencePersister) DeleteFromPersister ¶ added in v0.3.3
func (s *MapPreferencePersister) DeleteFromPersister(userID string) error
DeleteFromPersister removes the session for the user
func (*MapPreferencePersister) ReadFromPersister ¶ added in v0.3.3
func (s *MapPreferencePersister) ReadFromPersister(userID string) (*Preference, error)
ReadFromPersister reads the session data for the given userID
func (*MapPreferencePersister) WriteToPersister ¶ added in v0.3.3
func (s *MapPreferencePersister) WriteToPersister(userID string, data *Preference) error
WriteToPersister persists session for the user
type MeshClientConfig ¶ added in v0.3.10
type MeshClientConfig struct { Internal bool `yaml:"internal,omitempty"` Protocol string `yaml:"protocol,omitempty"` Connections int `yaml:"connections,omitempty"` Rps float64 `yaml:"rps,omitempty"` LatenciesMs *LatenciesMs `yaml:"latencies_ms,omitempty"` }
MeshClientConfig - represents a load test client config
type MeshConfig ¶ added in v0.3.10
type MeshConfig struct { MeshPolicyEnabled bool `yaml:"mesh_policy_enabled,omitempty"` MeshTelemetryEnabled bool `yaml:"mesh_telemetry_enabled,omitempty"` MtlsEnabled bool `yaml:"mtls_enabled,omitempty"` ProxyConcurrency int `yaml:"proxy_concurrency,omitempty"` }
MeshConfig - represents a service mesh config
type MeshControlPlane ¶ added in v0.3.10
type MeshControlPlane struct { Count int `yaml:"count,omitempty"` CPUMCores float64 `yaml:"cpu_mCores,omitempty"` MemMb float64 `yaml:"mem_mb,omitempty"` Endpoints int `yaml:"endpoints,omitempty"` Services int `yaml:"services,omitempty"` Sidecars int `yaml:"sidecars,omitempty"` VirtualServices int `yaml:"virtual_services,omitempty"` DestinationRules int `yaml:"destination_rules,omitempty"` LdsLatencyMs float64 `yaml:"lds_latency_ms,omitempty"` CdsLatencyMs float64 `yaml:"cds_latency_ms,omitempty"` }
MeshControlPlane - holds control plan info
type MeshPolicy ¶ added in v0.3.10
type MeshPolicy struct { Count int `yaml:"count,omitempty"` CPUMCores float64 `yaml:"cpu_mCores,omitempty"` MemMb float64 `yaml:"mem_mb,omitempty"` Rps float64 `yaml:"rps,omitempty"` CacheHitRate float64 `yaml:"cache_hit_rate,omitempty"` }
MeshPolicy - holds MeshPolicy info
type MeshTelemetry ¶ added in v0.3.10
type MeshTelemetry struct { Count int `yaml:"count,omitempty"` CPUMCores float64 `yaml:"cpu_mCores,omitempty"` MemMb float64 `yaml:"mem_mb,omitempty"` Rps float64 `yaml:"rps,omitempty"` }
MeshTelemetry - holds overall Mesh info
type MesheryApplication ¶ added in v0.5.24
type MesheryApplication struct { ID *uuid.UUID `json:"id,omitempty"` Name string `json:"name,omitempty"` ApplicationFile string `json:"application_file"` // Meshery doesn't have the user id fields // but the remote provider is allowed to provide one UserID *string `json:"user_id" gorm:"-"` Location sql.Map `json:"location"` UpdatedAt *time.Time `json:"updated_at,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` }
MesheryApplication represents the applications that needs to be saved
type MesheryApplicationPage ¶ added in v0.5.26
type MesheryApplicationPage struct { Page uint64 `json:"page"` PageSize uint64 `json:"page_size"` TotalCount int `json:"total_count"` Applications []*MesheryApplication `json:"applications"` }
MesheryApplicationPage represents a page of applications
type MesheryApplicationPersister ¶ added in v0.5.26
MesheryApplicationPersister is the persister for persisting applications on the database
func (*MesheryApplicationPersister) DeleteMesheryApplication ¶ added in v0.5.26
func (maap *MesheryApplicationPersister) DeleteMesheryApplication(id uuid.UUID) ([]byte, error)
DeleteMesheryApplication takes in an application id and delete it if it already exists
func (*MesheryApplicationPersister) GetMesheryApplication ¶ added in v0.5.26
func (maap *MesheryApplicationPersister) GetMesheryApplication(id uuid.UUID) ([]byte, error)
func (*MesheryApplicationPersister) GetMesheryApplications ¶ added in v0.5.26
func (maap *MesheryApplicationPersister) GetMesheryApplications(search, order string, page, pageSize uint64) ([]byte, error)
GetMesheryApplications returns all of the applications
func (*MesheryApplicationPersister) SaveMesheryApplication ¶ added in v0.5.26
func (maap *MesheryApplicationPersister) SaveMesheryApplication(application *MesheryApplication) ([]byte, error)
func (*MesheryApplicationPersister) SaveMesheryApplications ¶ added in v0.5.26
func (maap *MesheryApplicationPersister) SaveMesheryApplications(applications []MesheryApplication) ([]byte, error)
SaveMesheryApplications batch inserts the given applications
type MesheryFilter ¶ added in v0.5.4
type MesheryFilter struct { ID *uuid.UUID `json:"id,omitempty"` Name string `json:"name,omitempty"` FilterFile string `json:"filter_file"` // Meshery doesn't have the user id fields // but the remote provider is allowed to provide one UserID *string `json:"user_id" gorm:"-"` Location sql.Map `json:"location"` UpdatedAt *time.Time `json:"updated_at,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` }
MesheryFilter represents the filters that needs to be saved
type MesheryFilterPage ¶ added in v0.5.4
type MesheryFilterPage struct { Page uint64 `json:"page"` PageSize uint64 `json:"page_size"` TotalCount int `json:"total_count"` Filters []*MesheryFilter `json:"filters"` }
MesheryFilterPage represents a page of filters
type MesheryFilterPersister ¶ added in v0.5.4
MesheryFilterPersister is the persister for persisting wasm filters on the database
func (*MesheryFilterPersister) DeleteMesheryFilter ¶ added in v0.5.4
func (mfp *MesheryFilterPersister) DeleteMesheryFilter(id uuid.UUID) ([]byte, error)
DeleteMesheryFilter takes in a profile id and delete it if it already exists
func (*MesheryFilterPersister) GetMesheryFilter ¶ added in v0.5.12
func (mfp *MesheryFilterPersister) GetMesheryFilter(id uuid.UUID) ([]byte, error)
func (*MesheryFilterPersister) GetMesheryFilterFile ¶ added in v0.5.37
func (mfp *MesheryFilterPersister) GetMesheryFilterFile(id uuid.UUID) ([]byte, error)
func (*MesheryFilterPersister) GetMesheryFilters ¶ added in v0.5.4
func (mfp *MesheryFilterPersister) GetMesheryFilters(search, order string, page, pageSize uint64) ([]byte, error)
GetMesheryFilters returns all of the filters
func (*MesheryFilterPersister) SaveMesheryFilter ¶ added in v0.5.4
func (mfp *MesheryFilterPersister) SaveMesheryFilter(filter *MesheryFilter) ([]byte, error)
func (*MesheryFilterPersister) SaveMesheryFilters ¶ added in v0.5.12
func (mfp *MesheryFilterPersister) SaveMesheryFilters(filters []MesheryFilter) ([]byte, error)
SaveMesheryFilters batch inserts the given filters
type MesheryPattern ¶ added in v0.5.1
type MesheryPattern struct { ID *uuid.UUID `json:"id,omitempty"` Name string `json:"name,omitempty"` PatternFile string `json:"pattern_file"` // Meshery doesn't have the user id fields // but the remote provider is allowed to provide one UserID *string `json:"user_id" gorm:"-"` Location sql.Map `json:"location"` UpdatedAt *time.Time `json:"updated_at,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` }
MesheryPattern represents the patterns that needs to be saved
type MesheryPatternPage ¶ added in v0.5.2
type MesheryPatternPage struct { Page uint64 `json:"page"` PageSize uint64 `json:"page_size"` TotalCount int `json:"total_count"` Patterns []*MesheryPattern `json:"patterns"` }
MesheryPatternPage represents a page of performance profiles
type MesheryPatternPersister ¶ added in v0.5.2
MesheryPatternPersister is the persister for persisting performance profiles on the database
func (*MesheryPatternPersister) DeleteMesheryPattern ¶ added in v0.5.2
func (mpp *MesheryPatternPersister) DeleteMesheryPattern(id uuid.UUID) ([]byte, error)
DeleteMesheryPattern takes in a profile id and delete it if it already exists
func (*MesheryPatternPersister) GetMesheryPattern ¶ added in v0.5.2
func (mpp *MesheryPatternPersister) GetMesheryPattern(id uuid.UUID) ([]byte, error)
func (*MesheryPatternPersister) GetMesheryPatterns ¶ added in v0.5.2
func (mpp *MesheryPatternPersister) GetMesheryPatterns(search, order string, page, pageSize uint64) ([]byte, error)
GetMesheryPatterns returns all of the performance profiles
func (*MesheryPatternPersister) SaveMesheryPattern ¶ added in v0.5.2
func (mpp *MesheryPatternPersister) SaveMesheryPattern(pattern *MesheryPattern) ([]byte, error)
func (*MesheryPatternPersister) SaveMesheryPatterns ¶ added in v0.5.6
func (mpp *MesheryPatternPersister) SaveMesheryPatterns(patterns []MesheryPattern) ([]byte, error)
SaveMesheryPatterns batch inserts the given patterns
type MesheryResult ¶ added in v0.0.6
type MesheryResult struct { ID uuid.UUID `json:"meshery_id,omitempty"` Name string `json:"name,omitempty"` Mesh string `json:"mesh,omitempty"` PerformanceProfile *uuid.UUID `json:"performance_profile,omitempty"` TestID string `json:"test_id"` Result map[string]interface{} `json:"runner_results,omitempty" gorm:"type:JSONB"` ServerMetrics interface{} `json:"server_metrics,omitempty" gorm:"type:JSONB"` ServerBoardConfig interface{} `json:"server_board_config,omitempty" gorm:"type:JSONB"` TestStartTime *time.Time `json:"test_start_time,omitempty"` PerformanceProfileInfo PerformanceProfile `json:"-,omitempty" gorm:"constraint:OnDelete:SET NULL;foreignKey:PerformanceProfile"` UpdatedAt string `json:"updated_at,omitempty"` CreatedAt string `json:"created_at,omitempty"` UserID string `json:"user_id,omitempty"` }
MesheryResult - represents the results from Meshery test run to be shipped
func (*MesheryResult) ConvertToSpec ¶ added in v0.3.10
func (m *MesheryResult) ConvertToSpec() (*PerformanceSpec, error)
ConvertToSpec - converts meshery result to SMP
type MesheryResultPage ¶ added in v0.3.3
type MesheryResultPage struct { Page uint64 `json:"page"` PageSize uint64 `json:"page_size"` TotalCount int `json:"total_count"` Results []*MesheryResult `json:"results"` }
MesheryResultPage - represents a page of meshery results
type MesheryResultsPersister ¶ added in v0.5.2
func (*MesheryResultsPersister) GetAllResults ¶ added in v0.5.2
func (mrp *MesheryResultsPersister) GetAllResults(page, pageSize uint64) ([]byte, error)
func (*MesheryResultsPersister) GetResult ¶ added in v0.5.2
func (mrp *MesheryResultsPersister) GetResult(key uuid.UUID) (*MesheryResult, error)
func (*MesheryResultsPersister) GetResults ¶ added in v0.5.2
func (mrp *MesheryResultsPersister) GetResults(page, pageSize uint64, profileID string) ([]byte, error)
func (*MesheryResultsPersister) WriteResult ¶ added in v0.5.2
func (mrp *MesheryResultsPersister) WriteResult(key uuid.UUID, result []byte) error
type Metrics ¶ added in v0.3.10
type Metrics struct { IngressGateway *IngressGateway `yaml:"ingress_gateway,omitempty"` Sidecars *Sidecars `yaml:"sidecars,omitempty"` MeshTelemetry *MeshTelemetry `yaml:"mesh_telemetry,omitempty"` MeshPolicy *MeshPolicy `yaml:"mesh_policy,omitempty"` MeshControlPlane *MeshControlPlane `yaml:"mesh_control_plane,omitempty"` IndividualWorkload *Workload `yaml:"individual_workload_1,omitempty"` }
Metrics - holds overall metrics info
type NavigatorExtension ¶ added in v0.5.1
type NavigatorExtension struct {}
NavigatorExtension describes the Navigator extension point in the UI
type NavigatorExtensions ¶ added in v0.5.1
type NavigatorExtensions []NavigatorExtension
NavigatorExtensions is a collection of NavigatorExtension
type PatternResource ¶ added in v0.5.30
type PatternResource struct { ID *uuid.UUID `json:"id,omitempty"` UserID *uuid.UUID `json:"user_id,omitempty"` Name string `json:"name,omitempty"` Namespace string `json:"namespace,omitempty"` Type string `json:"type,omitempty"` OAMType string `json:"oam_type,omitempty"` Deleted bool `json:"deleted,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` }
PatternResource represents a pattern resource that is provisioned by meshery
type PatternResourcePage ¶ added in v0.5.30
type PatternResourcePage struct { Page uint64 `json:"page,omitempty"` PageSize uint64 `json:"page_size,omitempty"` TotalCount int `json:"total_count,omitempty"` Resources []*PatternResource `json:"resources,omitempty"` }
type PatternResourcePersister ¶ added in v0.5.30
func (*PatternResourcePersister) DeletePatternResource ¶ added in v0.5.30
func (prp *PatternResourcePersister) DeletePatternResource(id uuid.UUID) error
func (*PatternResourcePersister) Exists ¶ added in v0.5.30
func (prp *PatternResourcePersister) Exists(name, namespace, typ, oamType string) bool
func (*PatternResourcePersister) GetPatternResource ¶ added in v0.5.30
func (prp *PatternResourcePersister) GetPatternResource(id uuid.UUID) (*PatternResource, error)
func (*PatternResourcePersister) GetPatternResourceByAttributes ¶ added in v0.5.30
func (prp *PatternResourcePersister) GetPatternResourceByAttributes(name, namespace, typ, oamType string) (*PatternResource, error)
func (*PatternResourcePersister) GetPatternResources ¶ added in v0.5.30
func (prp *PatternResourcePersister) GetPatternResources(search, order, name, namespace, typ, oamType string, page, pageSize uint64) (*PatternResourcePage, error)
func (*PatternResourcePersister) SavePatternResource ¶ added in v0.5.30
func (prp *PatternResourcePersister) SavePatternResource(pr *PatternResource) (*PatternResource, error)
type PatternsAPIResponse ¶ added in v0.5.11
type PatternsAPIResponse struct { Page uint `json:"page"` PageSize uint `json:"page_size"` TotalCount uint `json:"total_count"` Patterns []MesheryPattern `json:"patterns"` }
PatternsAPIResponse response retruned by patternfile endpoint on meshery server
type PerformanceProfile ¶ added in v0.5.2
type PerformanceProfile struct { ID *uuid.UUID `json:"id,omitempty"` Name string `json:"name,omitempty"` LastRun *sql.Time `json:"last_run,omitempty" gorm:"type:datetime"` Schedule *uuid.UUID `json:"schedule,omitempty"` LoadGenerators pq.StringArray `json:"load_generators,omitempty" gorm:"type:text[]"` Endpoints pq.StringArray `json:"endpoints,omitempty" gorm:"type:text[]"` ServiceMesh string `json:"service_mesh,omitempty"` ConcurrentRequest int `json:"concurrent_request,omitempty"` QPS int `json:"qps,omitempty"` Duration string `json:"duration,omitempty"` TotalResults int `json:"total_results,omitempty"` RequestHeaders string `json:"request_headers,omitempty"` RequestCookies string `json:"request_cookies,omitempty"` RequestBody string `json:"request_body,omitempty"` ContentType string `json:"content_type,omitempty"` UpdatedAt *sql.Time `json:"updated_at,omitempty"` CreatedAt *sql.Time `json:"created_at,omitempty"` }
PerformanceProfile represents the performance profile that needs to be saved
type PerformanceProfilePage ¶ added in v0.5.2
type PerformanceProfilePage struct { Page uint64 `json:"page"` PageSize uint64 `json:"page_size"` TotalCount int `json:"total_count"` Profiles []*PerformanceProfile `json:"profiles"` }
PerformanceProfilePage represents a page of performance profiles
type PerformanceProfileParameters ¶ added in v0.5.27
type PerformanceProfileParameters struct { // name of performance profile Name string `json:"name,omitempty"` // array of load generators LoadGenerators []string `json:"load_generators,omitempty" gorm:"type:text[]"` // array of urls of performance results Endpoints []string `json:"endpoints,omitempty" gorm:"type:text[]"` // service mesh for performance tests ServiceMesh string `json:"service_mesh,omitempty"` // number of concurrent requests ConcurrentRequest int `json:"concurrent_request,omitempty"` // qps in integer QPS int `json:"qps,omitempty"` // duration of tests e.g. 30s Duration string `json:"duration,omitempty"` }
PerformanceProfileParameters structs contains parameters to save a performance profile
type PerformanceProfilePersister ¶ added in v0.5.2
PerformanceProfilePersister is the persister for persisting performance profiles on the database
func (*PerformanceProfilePersister) DeletePerformanceProfile ¶ added in v0.5.2
func (ppp *PerformanceProfilePersister) DeletePerformanceProfile(id uuid.UUID) ([]byte, error)
DeletePerformanceProfile takes in a profile id and delete it if it already exists
func (*PerformanceProfilePersister) GetPerformanceProfile ¶ added in v0.5.2
func (ppp *PerformanceProfilePersister) GetPerformanceProfile(id uuid.UUID) (*PerformanceProfile, error)
func (*PerformanceProfilePersister) GetPerformanceProfiles ¶ added in v0.5.2
func (ppp *PerformanceProfilePersister) GetPerformanceProfiles(userID, search, order string, page, pageSize uint64) ([]byte, error)
GetPerformanceProfiles returns all of the performance profiles
func (*PerformanceProfilePersister) SavePerformanceProfile ¶ added in v0.5.2
func (ppp *PerformanceProfilePersister) SavePerformanceProfile(id uuid.UUID, profile *PerformanceProfile) error
type PerformanceProfilesAPIResponse ¶ added in v0.5.18
type PerformanceProfilesAPIResponse struct { Page uint `json:"page"` PageSize uint `json:"page_size"` TotalCount uint `json:"total_count"` Profiles []PerformanceProfile `json:"profiles,omitempty"` }
PerformanceProfilesAPIResponse response retruned by performance endpoint on meshery server
type PerformanceResult ¶ added in v0.5.18
type PerformanceResult struct { MesheryID *uuid.UUID `json:"meshery_id,omitempty"` Name string `json:"name,omitempty"` Mesh string `json:"mesh,omitempty"` PerformanceProfile *uuid.UUID `json:"performance_profile,omitempty"` UserID *uuid.UUID `json:"user_id"` RunnerResults RunnerResults `json:"runner_results"` ServerMatrics interface{} `json:"server_metrics"` ServerBoardConfig interface{} `json:"server_board_config,omitempty"` TestStartTime *time.Time `json:"test_start_time,omitempty"` }
PerformanceResult represents the result of a performance test
type PerformanceResultsAPIResponse ¶ added in v0.5.18
type PerformanceResultsAPIResponse struct { Page uint `json:"page"` PageSize uint `json:"page_size"` TotalCount uint `json:"total_count"` Results []PerformanceResult `json:"results,omitempty"` }
PerformanceResultsAPIResponse response retruned by performance endpoint on meshery server
type PerformanceSpec ¶ added in v0.3.15
type PerformanceSpec struct { SMPVersion string `yaml:"smp_version,omitempty"` StartTime time.Time `yaml:"start_time,omitempty"` EndTime time.Time `yaml:"end_time,omitempty"` Latencies *LatenciesMs `yaml:"latencies_ms,omitempty"` ActualQPS float64 `yaml:"actual_qps,omitempty"` DetailsURI string `yaml:"details_uri,omitempty"` TestID string `yaml:"test_id,omitempty"` MeshConfigID string `yaml:"mesh_config_id,omitempty"` EnvID string `yaml:"env_id,omitempty"` // contains filtered or unexported fields }
PerformanceSpec - represents SMP, see here https://github.com/layer5io/service-mesh-performance-specification
type PerformanceTestParameters ¶ added in v0.5.27
type PerformanceTestParameters struct { // test-id of pre-existing test TestID strfmt.UUID `json:"uuid,omitempty"` // name of performance test Name string `json:"name"` // load generator for performance test LoadGenerator string `json:"loadGenerator"` // url for test URL string `json:"url"` // service mesh for performance test ServiceMesh string `json:"mesh"` // concurrent request in number ConcurrentRequest int `json:"c"` // qps in number QPS int `json:"qps"` // time in integer e.g. 30 Time int `json:"t"` // duration e.g. s for second Duration string `json:"dur"` }
PerformanceTestParameters contains parameters to run a performance test
type Preference ¶ added in v0.3.3
type Preference struct { K8SConfig *K8SConfig `json:"k8sConfig,omitempty"` MeshAdapters []*Adapter `json:"meshAdapters,omitempty"` Grafana *Grafana `json:"grafana,omitempty"` Prometheus *Prometheus `json:"prometheus,omitempty"` LoadTestPreferences *LoadTestPreferences `json:"loadTestPrefs,omitempty"` AnonymousUsageStats bool `json:"anonymousUsageStats"` AnonymousPerfResults bool `json:"anonymousPerfResults"` UpdatedAt time.Time `json:"updated_at,omitempty"` }
Preference represents the data stored in session / local DB
type PreferenceParams ¶ added in v0.5.30
type PreferenceParams struct { AnonymousUsageStats bool `json:"anonymousUsageStats"` AnonymousPerfResults bool `json:"anonymousPerfResults"` }
Parameters to updates Anonymous stats
type PreferencePersister ¶ added in v0.3.3
type PreferencePersister interface { ReadFromPersister(userID string) (*Preference, error) WriteToPersister(userID string, data *Preference) error DeleteFromPersister(userID string) error // Lock(userID string) // Unlock(userID string) ClosePersister() }
PreferencePersister defines methods for a session persister
type Prometheus ¶ added in v0.0.6
type Prometheus struct { PrometheusURL string `json:"prometheusURL,omitempty"` SelectedPrometheusBoardsConfigs []*SelectedGrafanaConfig `json:"selectedPrometheusBoardsConfigs,omitempty"` }
Prometheus represents the prometheus session config
type PrometheusClient ¶ added in v0.2.4
type PrometheusClient struct {
// contains filtered or unexported fields
}
PrometheusClient represents a prometheus client in Meshery
func NewPrometheusClient ¶ added in v0.2.4
func NewPrometheusClient() *PrometheusClient
NewPrometheusClient returns a PrometheusClient
func NewPrometheusClientWithHTTPClient ¶ added in v0.2.4
func NewPrometheusClientWithHTTPClient(client *http.Client) *PrometheusClient
NewPrometheusClientWithHTTPClient returns a PrometheusClient with a given http.Client
func (*PrometheusClient) Close ¶ added in v0.2.4
func (p *PrometheusClient) Close()
Close - closes idle connections
func (*PrometheusClient) ComputeStep ¶ added in v0.2.4
ComputeStep computes the step size for a window
func (*PrometheusClient) GetClusterStaticBoard ¶ added in v0.2.4
func (p *PrometheusClient) GetClusterStaticBoard(ctx context.Context, promURL string) (*GrafanaBoard, error)
GetClusterStaticBoard retrieves the cluster static board config
func (*PrometheusClient) GetNodesStaticBoard ¶ added in v0.2.4
func (p *PrometheusClient) GetNodesStaticBoard(ctx context.Context, promURL string) (*GrafanaBoard, error)
GetNodesStaticBoard retrieves the per node static board config
func (*PrometheusClient) ImportGrafanaBoard ¶ added in v0.2.4
func (p *PrometheusClient) ImportGrafanaBoard(ctx context.Context, boardData []byte) (*GrafanaBoard, error)
ImportGrafanaBoard takes raw Grafana board json and returns GrafanaBoard pointer for use in Meshery
func (*PrometheusClient) Query ¶ added in v0.2.4
func (p *PrometheusClient) Query(ctx context.Context, promURL string, queryData *url.Values) ([]byte, error)
Query queries prometheus using the GrafanaClient
func (*PrometheusClient) QueryRange ¶ added in v0.2.4
func (p *PrometheusClient) QueryRange(ctx context.Context, promURL string, queryData *url.Values) ([]byte, error)
QueryRange parses the given params and performs Prometheus range queries
type Provider ¶ added in v0.3.3
type Provider interface { PreferencePersister // Initialize will initialize a provider instance // by loading its capabilities and other metadata in the memory Initialize() Name() string // Returns ProviderType GetProviderType() ProviderType PackageLocation() string GetProviderCapabilities(http.ResponseWriter, *http.Request) GetProviderProperties() ProviderProperties // InitiateLogin - does the needed check, returns a true to indicate "return" or false to continue InitiateLogin(http.ResponseWriter, *http.Request, bool) TokenHandler(http.ResponseWriter, *http.Request, bool) ExtractToken(http.ResponseWriter, *http.Request) GetSession(req *http.Request) error GetUserDetails(*http.Request) (*User, error) GetProviderToken(req *http.Request) (string, error) UpdateToken(http.ResponseWriter, *http.Request) string Logout(http.ResponseWriter, *http.Request) FetchResults(tokenVal string, page, pageSize, search, order, profileID string) ([]byte, error) FetchAllResults(tokenVal string, page, pageSize, search, order, from, to string) ([]byte, error) PublishResults(req *http.Request, result *MesheryResult, profileID string) (string, error) FetchSmiResults(req *http.Request, page, pageSize, search, order string) ([]byte, error) PublishSmiResults(result *SmiResult) (string, error) PublishMetrics(tokenVal string, data *MesheryResult) error GetResult(tokenVal string, resultID uuid.UUID) (*MesheryResult, error) RecordPreferences(req *http.Request, userID string, data *Preference) error SMPTestConfigStore(req *http.Request, perfConfig *SMP.PerformanceTestConfig) (string, error) SMPTestConfigGet(req *http.Request, testUUID string) (*SMP.PerformanceTestConfig, error) SMPTestConfigFetch(req *http.Request, page, pageSize, search, order string) ([]byte, error) SMPTestConfigDelete(req *http.Request, testUUID string) error RecordMeshSyncData(model.Object) error ReadMeshSyncData() ([]model.Object, error) GetGenericPersister() *database.Handler SetKubeClient(client *mesherykube.Client) GetKubeClient() *mesherykube.Client SaveMesheryPattern(tokenString string, pattern *MesheryPattern) ([]byte, error) GetMesheryPatterns(req *http.Request, page, pageSize, search, order string) ([]byte, error) DeleteMesheryPattern(req *http.Request, patternID string) ([]byte, error) GetMesheryPattern(req *http.Request, patternID string) ([]byte, error) RemotePatternFile(req *http.Request, resourceURL, path string, save bool) ([]byte, error) SaveMesheryPatternResource(token string, resource *PatternResource) (*PatternResource, error) GetMesheryPatternResource(token, resourceID string) (*PatternResource, error) GetMesheryPatternResources(token, page, pageSize, search, order, name, namespace, typ, oamType string) (*PatternResourcePage, error) DeleteMesheryPatternResource(token, resourceID string) error SaveMesheryFilter(tokenString string, filter *MesheryFilter) ([]byte, error) GetMesheryFilters(req *http.Request, page, pageSize, search, order string) ([]byte, error) DeleteMesheryFilter(req *http.Request, filterID string) ([]byte, error) GetMesheryFilter(req *http.Request, filterID string) ([]byte, error) GetMesheryFilterFile(req *http.Request, filterID string) ([]byte, error) RemoteFilterFile(req *http.Request, resourceURL, path string, save bool) ([]byte, error) SaveMesheryApplication(tokenString string, application *MesheryApplication) ([]byte, error) GetMesheryApplications(req *http.Request, page, pageSize, search, order string) ([]byte, error) DeleteMesheryApplication(req *http.Request, applicationID string) ([]byte, error) GetMesheryApplication(req *http.Request, applicationID string) ([]byte, error) RemoteApplicationFile(req *http.Request, resourceURL, path string, save bool) ([]byte, error) SavePerformanceProfile(tokenString string, performanceProfile *PerformanceProfile) ([]byte, error) GetPerformanceProfiles(tokenString string, page, pageSize, search, order string) ([]byte, error) GetPerformanceProfile(req *http.Request, performanceProfileID string) ([]byte, error) DeletePerformanceProfile(req *http.Request, performanceProfileID string) ([]byte, error) SaveSchedule(tokenString string, s *Schedule) ([]byte, error) GetSchedules(req *http.Request, page, pageSize, order string) ([]byte, error) GetSchedule(req *http.Request, scheduleID string) ([]byte, error) DeleteSchedule(req *http.Request, scheduleID string) ([]byte, error) }
Provider - interface for providers
type ProviderProperties ¶ added in v0.3.12
type ProviderProperties struct { ProviderType ProviderType `json:"provider_type,omitempty"` PackageVersion string `json:"package_version,omitempty"` PackageURL string `json:"package_url,omitempty"` ProviderName string `json:"provider_name,omitempty"` ProviderDescription []string `json:"provider_description,omitempty"` ProviderURL string `json:"provider_url,omitempty"` Extensions Extensions `json:"extensions,omitempty"` Capabilities Capabilities `json:"capabilities,omitempty"` }
ProviderProperties represents the structure of properties that a provider has
type ProviderType ¶ added in v0.3.3
type ProviderType string
ProviderType - for representing provider types
type QueryTrackerInterface ¶ added in v0.0.6
type QueryTrackerInterface interface { AddOrFlagQuery(ctx context.Context, uuid, query string, flag bool) RemoveUUID(ctx context.Context, uuid string) GetQueriesForUUID(ctx context.Context, uuid string) map[string]bool }
QueryTrackerInterface defines the methods for working with query UUIDs
type RemoteProvider ¶ added in v0.5.1
type RemoteProvider struct { ProviderProperties *BitCaskPreferencePersister SaaSTokenName string RemoteProviderURL string SessionName string RefCookieName string TokenStore map[string]string TokenStoreMut sync.Mutex Keys []map[string]string LoginCookieDuration time.Duration ProviderVersion string SmiResultPersister *BitCaskSmiResultsPersister GenericPersister database.Handler KubeClient *mesherykube.Client // contains filtered or unexported fields }
RemoteProvider - represents a local provider
func (*RemoteProvider) DecodeTokenData ¶ added in v0.5.1
func (l *RemoteProvider) DecodeTokenData(tokenStringB64 string) (*oauth2.Token, error)
DecodeTokenData - Decodes a tokenString to a token
func (*RemoteProvider) DeleteMesheryApplication ¶ added in v0.5.26
func (l *RemoteProvider) DeleteMesheryApplication(req *http.Request, applicationID string) ([]byte, error)
DeleteMesheryApplication deletes a meshery application with the given id
func (*RemoteProvider) DeleteMesheryFilter ¶ added in v0.5.4
DeleteMesheryFilter deletes a meshery filter with the given id
func (*RemoteProvider) DeleteMesheryPattern ¶ added in v0.5.1
DeleteMesheryPattern deletes a meshery pattern with the given id
func (*RemoteProvider) DeleteMesheryPatternResource ¶ added in v0.5.46
func (l *RemoteProvider) DeleteMesheryPatternResource(token, resourceID string) error
func (*RemoteProvider) DeletePerformanceProfile ¶ added in v0.5.2
func (l *RemoteProvider) DeletePerformanceProfile(req *http.Request, performanceProfileID string) ([]byte, error)
DeletePerformanceProfile deletes a performance profile with the given performanceProfileID
func (*RemoteProvider) DeleteSchedule ¶ added in v0.5.2
DeleteSchedule deletes a schedule with the given scheduleID
func (*RemoteProvider) Description ¶ added in v0.5.1
func (l *RemoteProvider) Description() []string
Description - returns a short description of the provider for display in the Provider UI
func (*RemoteProvider) DoRequest ¶ added in v0.5.1
DoRequest - executes a request and does refreshing automatically
func (*RemoteProvider) ExtractToken ¶ added in v0.5.1
func (l *RemoteProvider) ExtractToken(w http.ResponseWriter, r *http.Request)
ExtractToken - Returns the auth token and the provider type
func (*RemoteProvider) FetchAllResults ¶ added in v0.5.2
func (l *RemoteProvider) FetchAllResults(tokenString string, page, pageSize, search, order, from, to string) ([]byte, error)
FetchAllResults - fetches results from provider backend
func (*RemoteProvider) FetchResults ¶ added in v0.5.1
func (l *RemoteProvider) FetchResults(tokenVal string, page, pageSize, search, order, profileID string) ([]byte, error)
FetchResults - fetches results for profile id from provider backend
func (*RemoteProvider) FetchSmiResults ¶ added in v0.5.1
func (l *RemoteProvider) FetchSmiResults(req *http.Request, page, pageSize, search, order string) ([]byte, error)
FetchSmiResults - fetches results from provider backend
func (*RemoteProvider) GenerateKey ¶ added in v0.5.1
func (l *RemoteProvider) GenerateKey(jwk JWK) (*rsa.PublicKey, error)
GenerateKey - generate the actual key from the JWK
func (*RemoteProvider) GetGenericPersister ¶ added in v0.5.1
func (l *RemoteProvider) GetGenericPersister() *database.Handler
GetGenericPersister - to return persister
func (*RemoteProvider) GetJWK ¶ added in v0.5.1
func (l *RemoteProvider) GetJWK(kid string) (JWK, error)
GetJWK - Takes a keyId and returns the JWK
func (*RemoteProvider) GetKubeClient ¶ added in v0.5.2
func (l *RemoteProvider) GetKubeClient() *mesherykube.Client
GetKubeClient - to get meshery kubernetes client
func (*RemoteProvider) GetMesheryApplication ¶ added in v0.5.26
func (l *RemoteProvider) GetMesheryApplication(req *http.Request, applicationID string) ([]byte, error)
GetMesheryApplication gets application for the given applicationID
func (*RemoteProvider) GetMesheryApplications ¶ added in v0.5.26
func (l *RemoteProvider) GetMesheryApplications(req *http.Request, page, pageSize, search, order string) ([]byte, error)
GetMesheryApplications gives the applications stored with the provider
func (*RemoteProvider) GetMesheryFilter ¶ added in v0.5.4
GetMesheryFilter gets filter for the given filterID
func (*RemoteProvider) GetMesheryFilterFile ¶ added in v0.5.37
GetMesheryFilterFile gets filter for the given filterID without the metadata
func (*RemoteProvider) GetMesheryFilters ¶ added in v0.5.4
func (l *RemoteProvider) GetMesheryFilters(req *http.Request, page, pageSize, search, order string) ([]byte, error)
GetMesheryFilters gives the filters stored with the provider
func (*RemoteProvider) GetMesheryPattern ¶ added in v0.5.1
GetMesheryPattern gets pattern for the given patternID
func (*RemoteProvider) GetMesheryPatternResource ¶ added in v0.5.30
func (l *RemoteProvider) GetMesheryPatternResource(token, resourceID string) (*PatternResource, error)
func (*RemoteProvider) GetMesheryPatternResources ¶ added in v0.5.30
func (l *RemoteProvider) GetMesheryPatternResources( token, page, pageSize, search, order, name, namespace, typ, oamType string, ) (*PatternResourcePage, error)
func (*RemoteProvider) GetMesheryPatterns ¶ added in v0.5.1
func (l *RemoteProvider) GetMesheryPatterns(req *http.Request, page, pageSize, search, order string) ([]byte, error)
GetMesheryPatterns gives the patterns stored with the provider
func (*RemoteProvider) GetPerformanceProfile ¶ added in v0.5.2
func (l *RemoteProvider) GetPerformanceProfile(req *http.Request, performanceProfileID string) ([]byte, error)
GetPerformanceProfile gets performance profile for the given the performanceProfileID
func (*RemoteProvider) GetPerformanceProfiles ¶ added in v0.5.2
func (l *RemoteProvider) GetPerformanceProfiles(tokenString string, page, pageSize, search, order string) ([]byte, error)
GetPerformanceProfiles gives the performance profiles stored with the provider
func (*RemoteProvider) GetProviderCapabilities ¶ added in v0.5.1
func (l *RemoteProvider) GetProviderCapabilities(w http.ResponseWriter, r *http.Request)
GetProviderCapabilities returns all of the provider properties
func (*RemoteProvider) GetProviderProperties ¶ added in v0.5.1
func (l *RemoteProvider) GetProviderProperties() ProviderProperties
GetProviderProperties - Returns all the provider properties required
func (*RemoteProvider) GetProviderToken ¶ added in v0.5.1
func (l *RemoteProvider) GetProviderToken(req *http.Request) (string, error)
GetProviderToken - returns provider token
func (*RemoteProvider) GetProviderType ¶ added in v0.5.1
func (l *RemoteProvider) GetProviderType() ProviderType
GetProviderType - Returns ProviderType
func (*RemoteProvider) GetResult ¶ added in v0.5.1
func (l *RemoteProvider) GetResult(tokenVal string, resultID uuid.UUID) (*MesheryResult, error)
GetResult - fetches result from provider backend for the given result id
func (*RemoteProvider) GetSchedule ¶ added in v0.5.2
GetSchedule gets schedule for the given the scheduleID
func (*RemoteProvider) GetSchedules ¶ added in v0.5.2
func (l *RemoteProvider) GetSchedules(req *http.Request, page, pageSize, order string) ([]byte, error)
GetSchedules gives the schedules stored with the provider
func (*RemoteProvider) GetSession ¶ added in v0.5.1
func (l *RemoteProvider) GetSession(req *http.Request) error
GetSession - validates the current request, attempts for a refresh of token, and then return its validity
It is assumed that each remote provider will support this feature
func (*RemoteProvider) GetToken ¶ added in v0.5.1
func (l *RemoteProvider) GetToken(req *http.Request) (string, error)
GetToken - extracts token form a request
func (*RemoteProvider) GetUserDetails ¶ added in v0.5.1
func (l *RemoteProvider) GetUserDetails(req *http.Request) (*User, error)
GetUserDetails - returns the user details
It is assumed that every remote provider will support this feature
func (*RemoteProvider) Initialize ¶ added in v0.5.1
func (l *RemoteProvider) Initialize()
Initialize function will initialize the RemoteProvider instance with the metadata fetched from the remote providers capabilities endpoint
func (*RemoteProvider) InitiateLogin ¶ added in v0.5.1
func (l *RemoteProvider) InitiateLogin(w http.ResponseWriter, r *http.Request, _ bool)
InitiateLogin - initiates login flow and returns a true to indicate the handler to "return" or false to continue
It is assumed that every remote provider will offer this feature
func (*RemoteProvider) Logout ¶ added in v0.5.1
func (l *RemoteProvider) Logout(w http.ResponseWriter, req *http.Request)
Logout - logout from provider backend
It is assumed that every remote provider will support this feature
func (*RemoteProvider) Name ¶ added in v0.5.1
func (l *RemoteProvider) Name() string
Name - Returns Provider's friendly name
func (*RemoteProvider) PackageLocation ¶ added in v0.5.1
func (l *RemoteProvider) PackageLocation() string
PackageLocation returns the location of where the package for the current provider is located
func (*RemoteProvider) PublishMetrics ¶ added in v0.5.1
func (l *RemoteProvider) PublishMetrics(tokenString string, result *MesheryResult) error
PublishMetrics - publishes metrics to the provider backend asyncronously
func (*RemoteProvider) PublishResults ¶ added in v0.5.1
func (l *RemoteProvider) PublishResults(req *http.Request, result *MesheryResult, profileID string) (string, error)
PublishResults - publishes results to the provider backend synchronously
func (*RemoteProvider) PublishSmiResults ¶ added in v0.5.1
func (l *RemoteProvider) PublishSmiResults(result *SmiResult) (string, error)
PublishSmiResults - publishes results to the provider backend synchronously
func (*RemoteProvider) ReadMeshSyncData ¶ added in v0.5.1
func (l *RemoteProvider) ReadMeshSyncData() ([]model.Object, error)
ReadMeshSyncData records the mesh sync data
func (*RemoteProvider) RecordMeshSyncData ¶ added in v0.5.1
func (l *RemoteProvider) RecordMeshSyncData(obj model.Object) error
RecordMeshSyncData records the mesh sync data
func (*RemoteProvider) RecordPreferences ¶ added in v0.5.1
func (l *RemoteProvider) RecordPreferences(req *http.Request, userID string, data *Preference) error
RecordPreferences - records the user preference
func (*RemoteProvider) RemoteApplicationFile ¶ added in v0.5.26
func (*RemoteProvider) RemoteFilterFile ¶ added in v0.5.12
func (*RemoteProvider) RemotePatternFile ¶ added in v0.5.6
func (*RemoteProvider) SMPTestConfigDelete ¶ added in v0.5.1
func (l *RemoteProvider) SMPTestConfigDelete(req *http.Request, testUUID string) error
SMPTestConfigDelete - tombstone a given test profile
func (*RemoteProvider) SMPTestConfigFetch ¶ added in v0.5.1
func (l *RemoteProvider) SMPTestConfigFetch(req *http.Request, page, pageSize, search, order string) ([]byte, error)
SMPTestConfigFetch - retrieve list of test profiles
func (*RemoteProvider) SMPTestConfigGet ¶ added in v0.5.1
func (l *RemoteProvider) SMPTestConfigGet(req *http.Request, testUUID string) (*SMP.PerformanceTestConfig, error)
SMPTestConfigGet - retrieve a single test profile details
func (*RemoteProvider) SMPTestConfigStore ¶ added in v0.5.1
func (l *RemoteProvider) SMPTestConfigStore(req *http.Request, perfConfig *SMP.PerformanceTestConfig) (string, error)
SMPTestConfigStore - persist test profile details to provider
func (*RemoteProvider) SaveMesheryApplication ¶ added in v0.5.26
func (l *RemoteProvider) SaveMesheryApplication(tokenString string, application *MesheryApplication) ([]byte, error)
SaveMesheryApplication saves given application with the provider
func (*RemoteProvider) SaveMesheryFilter ¶ added in v0.5.4
func (l *RemoteProvider) SaveMesheryFilter(tokenString string, filter *MesheryFilter) ([]byte, error)
SaveMesheryFilter saves given filter with the provider
func (*RemoteProvider) SaveMesheryPattern ¶ added in v0.5.1
func (l *RemoteProvider) SaveMesheryPattern(tokenString string, pattern *MesheryPattern) ([]byte, error)
SaveMesheryPattern saves given pattern with the provider
func (*RemoteProvider) SaveMesheryPatternResource ¶ added in v0.5.30
func (l *RemoteProvider) SaveMesheryPatternResource(token string, resource *PatternResource) (*PatternResource, error)
func (*RemoteProvider) SavePerformanceProfile ¶ added in v0.5.2
func (l *RemoteProvider) SavePerformanceProfile(tokenString string, pp *PerformanceProfile) ([]byte, error)
SavePerformanceProfile saves a performance profile into the remote provider
func (*RemoteProvider) SaveSchedule ¶ added in v0.5.2
func (l *RemoteProvider) SaveSchedule(tokenString string, s *Schedule) ([]byte, error)
SaveSchedule saves a SaveSchedule into the remote provider
func (*RemoteProvider) SetKubeClient ¶ added in v0.5.2
func (l *RemoteProvider) SetKubeClient(client *mesherykube.Client)
SetKubeClient - to set meshery kubernetes client
func (*RemoteProvider) StopSyncPreferences ¶ added in v0.5.1
func (l *RemoteProvider) StopSyncPreferences()
StopSyncPreferences - used to stop sync preferences
func (*RemoteProvider) SyncPreferences ¶ added in v0.5.1
func (l *RemoteProvider) SyncPreferences()
SyncPreferences - used to sync preferences with the remote provider
func (*RemoteProvider) TokenHandler ¶ added in v0.5.1
func (l *RemoteProvider) TokenHandler(w http.ResponseWriter, r *http.Request, fromMiddleWare bool)
TokenHandler - specific to remote auth
func (*RemoteProvider) UpdateJWKs ¶ added in v0.5.1
func (l *RemoteProvider) UpdateJWKs() error
UpdateJWKs - Updates Keys to the JWKS
func (*RemoteProvider) UpdateToken ¶ added in v0.5.1
func (l *RemoteProvider) UpdateToken(w http.ResponseWriter, r *http.Request) string
UpdateToken - in case the token was refreshed, this routine updates the response with the new token
func (*RemoteProvider) VerifyToken ¶ added in v0.5.1
func (l *RemoteProvider) VerifyToken(tokenString string) (*jwt.MapClaims, error)
VerifyToken - verifies the validity of a tokenstring
type RunnerResults ¶ added in v0.5.18
type RunnerResults struct { URL string `json:"URL"` LoadGenerator string `json:"load-generator"` ActualDuration uint64 `json:"ActualDuration"` RequestedDuration string `json:"RequestedDuration"` QPS float64 `json:"ActualQPS"` StartTime *time.Time `json:"StartTime"` DurationHistogram struct { Average float64 `json:"Avg,omitempty"` Max float64 `json:"Max,omitempty"` Min float64 `json:"Min,omitempty"` Percentiles []struct { Percentile float64 `json:"Percentile,omitempty"` Value float64 `json:"Value,omitempty"` } `json:"Percentiles,omitempty"` } `json:"DurationHistogram,omitempty"` }
type Schedule ¶ added in v0.5.2
type Schedule struct { ID uuid.UUID `json:"id,omitempty"` // CronExpression is the UNIX cron expression (quartz expression) // // Example: // 0 15 5 ? * WED,SUN * CronExpression string `json:"cron_expression,omitempty"` }
Schedule is the struct for representing schedules
type SchedulesAPIResponse ¶ added in v0.5.34
type SchedulesAPIResponse struct { Page uint `json:"page"` PageSize uint `json:"page_size"` TotalCount uint `json:"total_count"` Schedules []Schedule `json:"schedules,omitempty"` }
API response model for SchedulesAPI
type SelectedGrafanaConfig ¶ added in v0.0.6
type SelectedGrafanaConfig struct { GrafanaBoard *GrafanaBoard `json:"board,omitempty"` GrafanaPanels []*sdk.Panel `json:"panels,omitempty"` SelectedTemplateVars []string `json:"templateVars,omitempty"` }
SelectedGrafanaConfig represents the selected boards, panels, and template variables
type Sidecars ¶ added in v0.3.10
type Sidecars struct { Count int `yaml:"count,omitempty"` CPUMCores float64 `yaml:"cpu_mCores,omitempty"` MemMb float64 `yaml:"mem_mb,omitempty"` Rps float64 `yaml:"rps,omitempty"` Bps float64 `yaml:"bps,omitempty"` }
Sidecars - holds sidecars info
type SmiResult ¶ added in v0.4.7
type SmiResult struct { ID uuid.UUID `json:"id,omitempty"` Date string `json:"date,omitempty"` MeshName string `json:"mesh_name,omitempty"` MeshVersion string `json:"mesh_version,omitempty"` CasesPassed string `json:"cases_passed,omitempty"` PassingPercentage string `json:"passing_percentage,omitempty"` Status string `json:"status,omitempty"` MoreDetails []*Detail `json:"more_details,omitempty"` }
type SmiResultPage ¶ added in v0.4.7
type SmiResultPage struct { Page uint64 `json:"page"` PageSize uint64 `json:"page_size"` TotalCount int `json:"total_count"` Results []*SmiResult `json:"results"` }
SmiResultPage - represents a page of meshery results
type SubmitMetricsConfig ¶ added in v0.0.6
type SubmitMetricsConfig struct {
TestUUID, ResultID, PromURL string
StartTime, EndTime time.Time
// TokenKey,
TokenVal string
Provider Provider
}
SubmitMetricsConfig is used to store config used for submitting metrics
type SupportedLoadTestMethods ¶ added in v0.3.18
type SupportedLoadTestMethods int
SupportedLoadTestMethods - represents the load test method type
const ( // HTTP Load Test HTTP SupportedLoadTestMethods = 1 // TCP Load Test TCP SupportedLoadTestMethods = 3 )
type User ¶
type User struct { UserID string `json:"user_id,omitempty"` FirstName string `json:"first_name,omitempty"` LastName string `json:"last_name,omitempty"` AvatarURL string `json:"avatar_url,omitempty"` }
User - represents a user in Meshery
type UserPref ¶ added in v0.3.3
type UserPref struct { User Preferences *Preference `json:"preferences,omitempty"` }
UserPref - is just use to separate out the user info from preference
type UserPrefsExtension ¶ added in v0.5.1
type UserPrefsExtension struct {
Component string `json:"component,omitempty"`
}
UserPrefsExtension describes the user preference extension point in the UI
type UserPrefsExtensions ¶ added in v0.5.1
type UserPrefsExtensions []UserPrefsExtension
UserPrefsExtensions is a collection of UserPrefsExtension
type UserTestProfiles ¶ added in v0.4.2
type UserTestProfiles struct { Page uint64 `json:"page"` PageSize uint64 `json:"page_size"` TotalCount int `json:"total_count"` TestConfigs []*SMP.PerformanceTestConfig `json:"test_configs"` }
UserTestProfiles - represents a page of user test configs
Source Files ¶
- adapter.go
- bitcask_smiresults_persister.go
- bitcask_test_profiles_persister.go
- default_local_provider.go
- error.go
- grafana.go
- grafana_helper.go
- handlers.go
- load-test.go
- meshery_application.go
- meshery_application_persister.go
- meshery_applications_api_response.go
- meshery_filter.go
- meshery_filter_api_response.go
- meshery_filter_persister.go
- meshery_pattern.go
- meshery_pattern_persister.go
- meshery_patterns_api_response.go
- meshery_performance_api_response.go
- meshery_results_persister.go
- pattern_resource.go
- pattern_resource_persister.go
- performance_profile_persister.go
- performance_profiles.go
- performance_spec.go
- persister_utils.go
- preference.go
- preference_bitcask_persister.go
- preference_map_persister.go
- prometheus_cluster_config.go
- prometheus_helper.go
- prometheus_per_node_config.go
- providers.go
- query_tracker.go
- remote_auth.go
- remote_provider.go
- schedule.go
- smi-test.go
- sql-utils.go
- user.go
- validators.go