Documentation
¶
Overview ¶
Package distributed handles distributed queries across multiple hosts
Index ¶
Constants ¶
View Source
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 QueryOption ¶
type QueryOption func(*QueryRunner)
QueryOption configures the query runner
func WithMaxConcurrent ¶
func WithMaxConcurrent(sem chan struct{}) QueryOption
WithMaxConcurrent sets a maximum number of concurrent running queries
type QueryRunner ¶
type QueryRunner struct {
// contains filtered or unexported fields
}
QueryRunner denotes a query runner / executor, wrapping a Querier interface instance with other fields required to perform a distributed query
func NewQueryRunner ¶
func NewQueryRunner(resolvers *hosts.ResolverMap, querier distributed.Querier, opts ...QueryOption) (qr *QueryRunner)
NewQueryRunner instantiates a new distributed query runner
Click to show internal directories.
Click to hide internal directories.