runner

package
v0.56.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: BSD-2-Clause, BSD-3-Clause, PostgreSQL Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const LogDownloadInterval time.Duration = 30 * time.Second
View Source
const LogStreamingInterval time.Duration = 10 * time.Second

Variables

This section is empty.

Functions

func CollectActivityFromAllServers

func CollectActivityFromAllServers(ctx context.Context, servers []*state.Server, globalCollectionOpts state.CollectionOpts, logger *util.Logger) (allSuccessful bool)

CollectActivityFromAllServers - Collects activity from all servers and sends them to the pganalyze service

func CollectAllServers

func CollectAllServers(ctx context.Context, servers []*state.Server, globalCollectionOpts state.CollectionOpts, logger *util.Logger) (allSuccessful bool)

CollectAllServers - Collects statistics from all servers and sends them as full snapshots to the pganalyze service

func EmitTestExplain added in v0.45.0

func EmitTestExplain(ctx context.Context, server *state.Server, globalCollectionOpts state.CollectionOpts, logger *util.Logger) error

func EmitTestLogMsg added in v0.45.0

func EmitTestLogMsg(ctx context.Context, server *state.Server, globalCollectionOpts state.CollectionOpts, logger *util.Logger) error

func GatherQueryStatsFromAllServers

func GatherQueryStatsFromAllServers(ctx context.Context, servers []*state.Server, globalCollectionOpts state.CollectionOpts, logger *util.Logger)

func GenerateStatsHelperSql added in v0.56.0

func GenerateStatsHelperSql(ctx context.Context, server *state.Server, globalCollectionOpts state.CollectionOpts, logger *util.Logger) (string, error)

func RunRequestedReports

func RunRequestedReports(ctx context.Context, servers []*state.Server, globalCollectionOpts state.CollectionOpts, logger *util.Logger)

RunRequestedReports - Retrieves current report requests from the server, runs them and submits their data

func RunTestReport

func RunTestReport(ctx context.Context, servers []*state.Server, globalCollectionOpts state.CollectionOpts, logger *util.Logger)

RunTestReport - Runs globalCollectionOpts.TestReport for all servers and outputs the result to stdout

func SetupLogCollection added in v0.42.1

func SetupLogCollection(ctx context.Context, wg *sync.WaitGroup, servers []*state.Server, globalCollectionOpts state.CollectionOpts, logger *util.Logger, hasAnyHeroku bool, hasAnyGoogleCloudSQL bool, hasAnyAzureDatabase bool, hasAnyTembo bool)

SetupLogCollection - Starts streaming or scheduled downloads for logs of the specified servers

func TestLogsForAllServers

func TestLogsForAllServers(ctx context.Context, servers []*state.Server, globalCollectionOpts state.CollectionOpts, logger *util.Logger) (hasFailedServers bool, hasSuccessfulLocalServers bool)

TestLogsForAllServers - Test log download/tailing

Types

type RequestedReport

type RequestedReport struct {
	ReportType  string `json:"report_type"`
	ReportRunID string `json:"report_run_id"`
}

Jump to

Keyboard shortcuts

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