mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-28 18:06:34 +02:00
* storage: add minimum record version hint * use response record version * fix record version in query response
25 lines
735 B
Go
25 lines
735 B
Go
package storage
|
|
|
|
import (
|
|
"context"
|
|
|
|
grpc "google.golang.org/grpc"
|
|
|
|
"github.com/pomerium/pomerium/pkg/grpc/databroker"
|
|
)
|
|
|
|
type clientQuerier struct {
|
|
client databroker.DataBrokerServiceClient
|
|
}
|
|
|
|
// NewQuerier creates a new Querier that implements the Querier interface by making calls to the databroker over gRPC.
|
|
func NewQuerier(client databroker.DataBrokerServiceClient) Querier {
|
|
return &clientQuerier{client: client}
|
|
}
|
|
|
|
func (q *clientQuerier) InvalidateCache(_ context.Context, _ *databroker.QueryRequest) {}
|
|
|
|
// Query queries for records.
|
|
func (q *clientQuerier) Query(ctx context.Context, in *databroker.QueryRequest, opts ...grpc.CallOption) (*databroker.QueryResponse, error) {
|
|
return q.client.Query(ctx, in, opts...)
|
|
}
|