2016-10-31 22:51:19 +00:00
|
|
|
package kolide
|
|
|
|
|
2017-03-15 15:55:30 +00:00
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
)
|
2016-10-31 22:51:19 +00:00
|
|
|
|
|
|
|
// QueryResultStore defines functions for sending and receiving distributed
|
|
|
|
// query results over a pub/sub system. It is implemented by structs in package
|
|
|
|
// pubsub.
|
|
|
|
type QueryResultStore interface {
|
|
|
|
// WriteResult writes a distributed query result submitted by an
|
|
|
|
// osqueryd client
|
|
|
|
WriteResult(result DistributedQueryResult) error
|
|
|
|
|
|
|
|
// ReadChannel returns a channel to be read for incoming distributed
|
|
|
|
// query results. Channel values should be either
|
|
|
|
// DistributedQueryResult or error
|
|
|
|
ReadChannel(ctx context.Context, query DistributedQueryCampaign) (<-chan interface{}, error)
|
2019-08-13 16:42:58 +00:00
|
|
|
|
|
|
|
// HealthCheck returns nil if the store is functioning properly, or an
|
|
|
|
// error describing the problem.
|
|
|
|
HealthCheck() error
|
2016-10-31 22:51:19 +00:00
|
|
|
}
|