Documentation
¶
Index ¶
- Constants
- type DBInterfaceLister
- type QueryRunner
- func (qr *QueryRunner) Run(ctx context.Context, args *query.Args) (res *results.Result, err error)
- func (qr *QueryRunner) RunStatement(ctx context.Context, stmt *query.Statement, send sse.Sender) (res *results.Result, err error)
- func (qr *QueryRunner) RunStreaming(ctx context.Context, args *query.Args, send sse.Sender) (res *results.Result, err error)
- type RunnerOption
Constants ¶
const ( // DefaultSemTimeout is the default / fallback amount of time to wait for acquisition // of a semaphore when performing concurrent queries DefaultSemTimeout = time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBInterfaceLister ¶
type DBInterfaceLister struct {
// contains filtered or unexported fields
}
DBLister lists network interfaces from DB.
func NewDBInterfaceLister ¶
func NewDBInterfaceLister(dbPath string) *DBInterfaceLister
Constructor for DBInterfaceLister
func (DBInterfaceLister) ListInterfaces ¶
func (dbLister DBInterfaceLister) ListInterfaces() ([]string, error)
Implementation of the interface function that uses existing functionality.
type QueryRunner ¶
type QueryRunner struct {
// contains filtered or unexported fields
}
QueryRunner implements the Runner interface to execute queries against the goDB flow database
func NewQueryRunner ¶
func NewQueryRunner(dbPath string, opts ...RunnerOption) *QueryRunner
NewQueryRunner creates a new query runner
type RunnerOption ¶
type RunnerOption func(*QueryRunner)
RunnerOption allows to configure the query runner
func WithLiveData ¶
func WithLiveData(captureManager *capture.Manager) RunnerOption
WithLiveData adds a capture manager which allows to query live data in addition to the data fetched from the DB
func WithMaxConcurrent ¶
func WithMaxConcurrent(sem chan struct{}) RunnerOption
WithMaxConcurrent sets a maximum number of concurrent running queries
func WithStatsCallbacks ¶
func WithStatsCallbacks(callbacks ...workload.StatsFunc) RunnerOption
WithStatsCallbacks configures the DBWorkManager to emit feedback on query processing. They will be called in the order they are provided