mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 09:18:59 +00:00
715d908613
Notable refactoring: - Use stdlib "context" in place of "golang.org/x/net/context" - Go-kit no longer wraps errors, so we remove the unwrap in transport_error.go - Use MakeHandler when setting up endpoint tests (fixes test bug caught during this refactoring) Closes #1411.
20 lines
630 B
Go
20 lines
630 B
Go
package kolide
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
// 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)
|
|
}
|