client

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildGrpcMethodFunc

func BuildGrpcMethodFunc(grpccli testpb.TestClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc

BuildGrpcMethodFunc builds the remote method to invoke for "test" service "grpc_method" endpoint.

func BuildGrpcMethodPayload

func BuildGrpcMethodPayload(testGrpcMethodMessage string) (*test.Fields, error)

BuildGrpcMethodPayload builds the payload for the test grpc_method endpoint from CLI flags.

func BuildGrpcStreamFunc

func BuildGrpcStreamFunc(grpccli testpb.TestClient, cliopts ...grpc.CallOption) goagrpc.RemoteFunc

BuildGrpcStreamFunc builds the remote method to invoke for "test" service "grpc_stream" endpoint.

func DecodeGrpcMethodResponse

func DecodeGrpcMethodResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error)

DecodeGrpcMethodResponse decodes responses from the test grpc_method endpoint.

func DecodeGrpcStreamResponse

func DecodeGrpcStreamResponse(ctx context.Context, v interface{}, hdr, trlr metadata.MD) (interface{}, error)

DecodeGrpcStreamResponse decodes responses from the test grpc_stream endpoint.

func EncodeGrpcMethodRequest

func EncodeGrpcMethodRequest(ctx context.Context, v interface{}, md *metadata.MD) (interface{}, error)

EncodeGrpcMethodRequest encodes requests sent to test grpc_method endpoint.

func NewFields

func NewFields(v *testpb.GrpcStreamResponse) *test.Fields

func NewGrpcMethodResult

func NewGrpcMethodResult(message *testpb.GrpcMethodResponse) *test.Fields

NewGrpcMethodResult builds the result type of the "grpc_method" endpoint of the "test" service from the gRPC response type.

func NewProtoGrpcMethodRequest added in v0.10.0

func NewProtoGrpcMethodRequest(payload *test.Fields) *testpb.GrpcMethodRequest

NewProtoGrpcMethodRequest builds the gRPC request type from the payload of the "grpc_method" endpoint of the "test" service.

func NewProtoGrpcStreamStreamingRequest added in v0.10.0

func NewProtoGrpcStreamStreamingRequest(spayload *test.Fields) *testpb.GrpcStreamStreamingRequest

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client lists the service endpoint gRPC clients.

func NewClient

func NewClient(cc *grpc.ClientConn, opts ...grpc.CallOption) *Client

NewClient instantiates gRPC client for all the test service servers.

func (*Client) GrpcMethod

func (c *Client) GrpcMethod() goa.Endpoint

GrpcMethod calls the "GrpcMethod" function in testpb.TestClient interface.

func (*Client) GrpcStream

func (c *Client) GrpcStream() goa.Endpoint

GrpcStream calls the "GrpcStream" function in testpb.TestClient interface.

type GrpcStreamClientStream

type GrpcStreamClientStream struct {
	// contains filtered or unexported fields
}

GrpcStreamClientStream implements the test.GrpcStreamClientStream interface.

func (*GrpcStreamClientStream) Close

func (s *GrpcStreamClientStream) Close() error

func (*GrpcStreamClientStream) Recv

func (s *GrpcStreamClientStream) Recv() (*test.Fields, error)

Recv reads instances of "testpb.GrpcStreamResponse" from the "grpc_stream" endpoint gRPC stream.

func (*GrpcStreamClientStream) Send

func (s *GrpcStreamClientStream) Send(res *test.Fields) error

Send streams instances of "testpb.GrpcStreamStreamingRequest" to the "grpc_stream" endpoint gRPC stream.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL