Documentation
¶
Index ¶
- Constants
- Variables
- func GenerateMockGrpcClientWithOptionalGrpcConnectionErrors(connectionErr error, closeErr error, closeConnectionIsCalled bool) *mocks.GrpcClient
- func GenerateMockGrpcClientWithOptionalTcpConnectionErrors(connectionErr error, closeErr error, closeConnectionIsCalled bool) *mocks.GrpcClient
- type QueryClient
- type QueryServer
Constants ¶
View Source
const ( SocketPath = "/tmp/daemons.sock" UserReadWriteOnlyPermissions = os.FileMode(0600) DefaultPermissions = os.FileMode(0x180) )
Variables ¶
View Source
var ( Ctx = context.TODO() TcpConn = &grpc.ClientConn{} GrpcConn = (*grpc.ClientConn)(nil) )
View Source
var (
TcpEndpoint = "localhost:9090"
)
Functions ¶
func GenerateMockGrpcClientWithOptionalGrpcConnectionErrors ¶
func GenerateMockGrpcClientWithOptionalGrpcConnectionErrors( connectionErr error, closeErr error, closeConnectionIsCalled bool, ) *mocks.GrpcClient
GenerateMockGrpcClientWithOptionalGrpcConnectionErrors generates a mock gRPC client that mocks both Tcp and Grpc connections and optionally returns the specified errors on Grpc connections.
func GenerateMockGrpcClientWithOptionalTcpConnectionErrors ¶
func GenerateMockGrpcClientWithOptionalTcpConnectionErrors( connectionErr error, closeErr error, closeConnectionIsCalled bool, ) *mocks.GrpcClient
GenerateMockGrpcClientWithOptionalTcpConnectionErrors generates a mock gRPC client that mocks Tcp connections and optionally returns the given connection and close errors. This mock also mocks grpc connections if the tcp connection is expected to be closed.
Types ¶
type QueryClient ¶
type QueryClient interface { blocktimetypes.QueryClient satypes.QueryClient clobtypes.QueryClient perptypes.QueryClient pricetypes.QueryClient bridgetypes.BridgeServiceClient liquidationtypes.LiquidationServiceClient pricefeedtypes.PriceFeedServiceClient }
QueryClient combines all the query clients used in testing into a single mock interface for testing convenience.
type QueryServer ¶
type QueryServer interface { pricetypes.QueryServer }
Click to show internal directories.
Click to hide internal directories.