github.com/grafana/pyroscope@v1.18.0/pkg/testhelper/pool.go (about)

     1  package testhelper
     2  
     3  import (
     4  	"context"
     5  	"errors"
     6  
     7  	"google.golang.org/grpc"
     8  	"google.golang.org/grpc/health/grpc_health_v1"
     9  )
    10  
    11  type FakePoolClient struct{}
    12  
    13  func (f FakePoolClient) Close() error {
    14  	return nil
    15  }
    16  
    17  func (f FakePoolClient) Check(ctx context.Context, in *grpc_health_v1.HealthCheckRequest, opts ...grpc.CallOption) (*grpc_health_v1.HealthCheckResponse, error) {
    18  	return &grpc_health_v1.HealthCheckResponse{
    19  		Status: grpc_health_v1.HealthCheckResponse_SERVING,
    20  	}, nil
    21  }
    22  
    23  func (f FakePoolClient) Watch(ctx context.Context, in *grpc_health_v1.HealthCheckRequest, opts ...grpc.CallOption) (grpc_health_v1.Health_WatchClient, error) {
    24  	return nil, errors.New("not implemented")
    25  }