package agentproto12import (3"context"45empty "github.com/golang/protobuf/ptypes/empty"6)78// FuncScrapingServiceServer is an implementation of ScrapingServiceServer that9// uses function fields to implement the interface. Useful for tests.10type FuncScrapingServiceServer struct {11ReshardFunc func(context.Context, *ReshardRequest) (*empty.Empty, error)12}1314// Reshard implements ScrapingServiceServer.15func (f *FuncScrapingServiceServer) Reshard(ctx context.Context, req *ReshardRequest) (*empty.Empty, error) {16if f.ReshardFunc != nil {17return f.ReshardFunc(ctx, req)18}19panic("ReshardFunc is nil")20}212223