mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 17:15:56 +00:00
Merge pull request #858 from niaow/deprecate-inspect
Add a deprecation warning to Inspect
This commit is contained in:
commit
16c5212e2d
1 changed files with 8 additions and 3 deletions
|
|
@ -37,9 +37,10 @@ import (
|
|||
|
||||
// GRPCHandler contains methods which handle the various gRPC requests.
|
||||
type GRPCHandler struct {
|
||||
api *pilosa.API
|
||||
logger logger.Logger
|
||||
stats stats.StatsClient
|
||||
api *pilosa.API
|
||||
logger logger.Logger
|
||||
stats stats.StatsClient
|
||||
inspectDeprecated sync.Once
|
||||
}
|
||||
|
||||
func NewGRPCHandler(api *pilosa.API) *GRPCHandler {
|
||||
|
|
@ -375,6 +376,10 @@ func ToRowserWrapper(result interface{}) (pb.ToRowser, error) {
|
|||
func (h *GRPCHandler) Inspect(req *pb.InspectRequest, stream pb.Pilosa_InspectServer) error {
|
||||
const defaultLimit = 100000
|
||||
|
||||
h.inspectDeprecated.Do(func() {
|
||||
h.logger.Printf("DEPRECATED: Inspect is deprecated, please use Extract() instead.")
|
||||
})
|
||||
|
||||
index, err := h.api.Index(stream.Context(), req.Index)
|
||||
if err != nil {
|
||||
return errToStatusError(err)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue