Documentation ¶
Index ¶
- func FetchKubernetesNodes(kubeconfig []byte, contextName string) ([]*models.K8SNode, error)
- func FetchKubernetesVersion(kubeconfig []byte, contextName string) (string, error)
- func FortioLoadTest(opts *models.LoadTestOptions) (map[string]interface{}, *periodic.RunnerResults, error)
- func ScanKubernetes(kubeconfig []byte, contextName string) (map[string]string, error)
- type AdaptersTracker
- type BadgerSessionPersister
- type FileSessionPersister
- type GrafanaClient
- func NewGrafanaClient(BaseURL, APIKey string, validateConfig bool) (*GrafanaClient, error)
- func NewGrafanaClientForPrometheusWithHTTPClient(promURL string, client *http.Client) *GrafanaClient
- func NewGrafanaClientWithHTTPClient(BaseURL, APIKey string, client *http.Client, validateConfig bool) (*GrafanaClient, error)
- func (g *GrafanaClient) Close()
- func (g *GrafanaClient) GetGrafanaBoards(dashboardSearch string) ([]*models.GrafanaBoard, error)
- func (g *GrafanaClient) GrafanaConfigValidator() (uint, error)
- func (g *GrafanaClient) GrafanaQuery(ctx context.Context, queryData *url.Values) ([]byte, error)
- func (g *GrafanaClient) GrafanaQueryRange(ctx context.Context, queryData *url.Values) ([]byte, error)
- func (g *GrafanaClient) ProcessBoard(board *sdk.Board, link *sdk.FoundBoard) (*models.GrafanaBoard, error)
- type MapSessionPersister
- 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) (*models.GrafanaBoard, error)
- func (p *PrometheusClient) GetNodesStaticBoard(ctx context.Context) (*models.GrafanaBoard, error)
- func (p *PrometheusClient) ImportGrafanaBoard(ctx context.Context, boardData []byte) (*models.GrafanaBoard, error)
- func (p *PrometheusClient) Query(ctx context.Context, queryData *url.Values) ([]byte, error)
- func (p *PrometheusClient) QueryRange(ctx context.Context, queryData *url.Values) ([]byte, error)
- func (p *PrometheusClient) QueryRangeUsingClient(ctx context.Context, query string, startTime, endTime time.Time, ...) (promModel.Value, error)
- type UUIDQueryTracker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchKubernetesNodes ¶ added in v0.1.6
FetchKubernetesNodes - function used to fetch nodes metadata
func FetchKubernetesVersion ¶ added in v0.1.6
FetchKubernetesVersion - function used to fetch kubernetes server version
func FortioLoadTest ¶
func FortioLoadTest(opts *models.LoadTestOptions) (map[string]interface{}, *periodic.RunnerResults, error)
FortioLoadTest is the actual code which invokes Fortio to run the load test
Types ¶
type AdaptersTracker ¶
type AdaptersTracker struct {
// contains filtered or unexported fields
}
AdaptersTracker is used to hold the list of known adapters
func NewAdaptersTracker ¶
func NewAdaptersTracker(adapterURLs []string) *AdaptersTracker
NewAdaptersTracker returns an instance of AdaptersTracker
func (*AdaptersTracker) AddAdapter ¶
func (a *AdaptersTracker) AddAdapter(ctx context.Context, adapterURL string)
AddAdapter is used to add new adapters to the collection
func (*AdaptersTracker) GetAdapters ¶
func (a *AdaptersTracker) GetAdapters(ctx context.Context) []string
GetAdapters returns the list of existing adapters
func (*AdaptersTracker) RemoveAdapter ¶
func (a *AdaptersTracker) RemoveAdapter(ctx context.Context, adapterURL string)
RemoveAdapter is used to remove existing adapters from the collection
type BadgerSessionPersister ¶
type BadgerSessionPersister struct {
// contains filtered or unexported fields
}
BadgerSessionPersister assists with persisting session in a badger store
func NewBadgerSessionPersister ¶
func NewBadgerSessionPersister(folderName string) (*BadgerSessionPersister, error)
NewBadgerSessionPersister creates a new BadgerSessionPersister instance
func (*BadgerSessionPersister) Close ¶
func (s *BadgerSessionPersister) Close()
Close closes the badger store
func (*BadgerSessionPersister) Delete ¶
func (s *BadgerSessionPersister) Delete(userID string) error
Delete removes the session for the user
type FileSessionPersister ¶
type FileSessionPersister struct {
// contains filtered or unexported fields
}
FileSessionPersister assists with persisting session in a file store
func NewFileSessionPersister ¶
func NewFileSessionPersister(folder string) *FileSessionPersister
NewFileSessionPersister returns a new instance of FileSessionPersister
func (*FileSessionPersister) Close ¶
func (s *FileSessionPersister) Close()
Close closes the persister
func (*FileSessionPersister) Delete ¶
func (s *FileSessionPersister) Delete(userID string) error
Delete removes the session for the user
type GrafanaClient ¶
type GrafanaClient struct { BaseURL string APIKey string OrgID uint // contains filtered or unexported fields }
GrafanaClient represents a client to Grafana in Meshery
func NewGrafanaClient ¶
func NewGrafanaClient(BaseURL, APIKey string, validateConfig bool) (*GrafanaClient, error)
NewGrafanaClient returns a new GrafanaClient
func NewGrafanaClientForPrometheusWithHTTPClient ¶ added in v0.2.0
func NewGrafanaClientForPrometheusWithHTTPClient(promURL string, client *http.Client) *GrafanaClient
NewGrafanaClientForPrometheusWithHTTPClient returns a limited GrafanaClient for use with Prometheus with the given HTTP client
func NewGrafanaClientWithHTTPClient ¶ added in v0.2.0
func NewGrafanaClientWithHTTPClient(BaseURL, APIKey string, client *http.Client, validateConfig bool) (*GrafanaClient, error)
NewGrafanaClientWithHTTPClient returns a new GrafanaClient with the given HTTP Client
func (*GrafanaClient) Close ¶ added in v0.2.0
func (g *GrafanaClient) Close()
Close - closes idle connections
func (*GrafanaClient) GetGrafanaBoards ¶
func (g *GrafanaClient) GetGrafanaBoards(dashboardSearch string) ([]*models.GrafanaBoard, error)
GetGrafanaBoards retrieves all the Grafana boards matching a search
func (*GrafanaClient) GrafanaConfigValidator ¶
func (g *GrafanaClient) GrafanaConfigValidator() (uint, error)
GrafanaConfigValidator validates connection to Grafana
func (*GrafanaClient) GrafanaQuery ¶
GrafanaQuery parses the provided query data and queries Grafana and streams response
func (*GrafanaClient) GrafanaQueryRange ¶
func (g *GrafanaClient) GrafanaQueryRange(ctx context.Context, queryData *url.Values) ([]byte, error)
GrafanaQueryRange parses the given params and performs Grafana range queries
func (*GrafanaClient) ProcessBoard ¶
func (g *GrafanaClient) ProcessBoard(board *sdk.Board, link *sdk.FoundBoard) (*models.GrafanaBoard, error)
ProcessBoard accepts raw Grafana board and returns a processed GrafanaBoard to be used in Meshery
type MapSessionPersister ¶ added in v0.2.0
type MapSessionPersister struct {
// contains filtered or unexported fields
}
MapSessionPersister assists with persisting session in a badger store
func NewMapSessionPersister ¶ added in v0.2.0
func NewMapSessionPersister() (*MapSessionPersister, error)
NewMapSessionPersister creates a new MapSessionPersister instance
func (*MapSessionPersister) Close ¶ added in v0.2.0
func (s *MapSessionPersister) Close()
Close closes the DB
func (*MapSessionPersister) Delete ¶ added in v0.2.0
func (s *MapSessionPersister) Delete(userID string) error
Delete removes the session for the user
type PrometheusClient ¶
type PrometheusClient struct {
// contains filtered or unexported fields
}
PrometheusClient represents a prometheus client in Meshery
func NewPrometheusClient ¶
func NewPrometheusClient(ctx context.Context, promURL string, validate bool) (*PrometheusClient, error)
NewPrometheusClient returns a PrometheusClient
func NewPrometheusClientWithHTTPClient ¶ added in v0.2.0
func NewPrometheusClientWithHTTPClient(ctx context.Context, promURL string, client *http.Client, validate bool) (*PrometheusClient, error)
NewPrometheusClientWithHTTPClient returns a PrometheusClient with a given http.Client
func (*PrometheusClient) Close ¶ added in v0.2.0
func (p *PrometheusClient) Close()
Close - closes idle connections
func (*PrometheusClient) ComputeStep ¶
ComputeStep computes the step size for a window
func (*PrometheusClient) GetClusterStaticBoard ¶ added in v0.1.5
func (p *PrometheusClient) GetClusterStaticBoard(ctx context.Context) (*models.GrafanaBoard, error)
GetClusterStaticBoard retrieves the cluster static board config
func (*PrometheusClient) GetNodesStaticBoard ¶ added in v0.1.5
func (p *PrometheusClient) GetNodesStaticBoard(ctx context.Context) (*models.GrafanaBoard, error)
GetNodesStaticBoard retrieves the per node static board config
func (*PrometheusClient) ImportGrafanaBoard ¶
func (p *PrometheusClient) ImportGrafanaBoard(ctx context.Context, boardData []byte) (*models.GrafanaBoard, error)
ImportGrafanaBoard takes raw Grafana board json and returns GrafanaBoard pointer for use in Meshery
func (*PrometheusClient) QueryRange ¶
QueryRange queries prometheus using the GrafanaClient
type UUIDQueryTracker ¶
type UUIDQueryTracker struct {
// contains filtered or unexported fields
}
UUIDQueryTracker tracks queries for a load test UUID
func NewUUIDQueryTracker ¶
func NewUUIDQueryTracker() *UUIDQueryTracker
NewUUIDQueryTracker creates a new instance of UUIDQueryTracker
func (*UUIDQueryTracker) AddOrFlagQuery ¶
func (a *UUIDQueryTracker) AddOrFlagQuery(ctx context.Context, uuid, query string, flag bool)
AddOrFlagQuery either adds a new query or flags an existing one
func (*UUIDQueryTracker) GetQueriesForUUID ¶
GetQueriesForUUID retrieves queries for UUID
func (*UUIDQueryTracker) RemoveUUID ¶
func (a *UUIDQueryTracker) RemoveUUID(ctx context.Context, uuid string)
RemoveUUID removes an existing UUID from the collection