Documentation ¶
Index ¶
- Constants
- Variables
- func NewGrpcMethodEndpoint(s Service) goa.Endpoint
- func NewGrpcStreamEndpoint(s Service) goa.Endpoint
- func NewHTTPMethodEndpoint(s Service) goa.Endpoint
- type Client
- type Endpoints
- type Fields
- type GrpcStreamClientStream
- type GrpcStreamEndpointInput
- type GrpcStreamServerStream
- type Service
Constants ¶
const ServiceName = "test"
ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.
Variables ¶
var MethodNames = [3]string{"http_method", "grpc_method", "grpc_stream"}
MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.
Functions ¶
func NewGrpcMethodEndpoint ¶
NewGrpcMethodEndpoint returns an endpoint function that calls the method "grpc_method" of service "test".
func NewGrpcStreamEndpoint ¶
NewGrpcStreamEndpoint returns an endpoint function that calls the method "grpc_stream" of service "test".
func NewHTTPMethodEndpoint ¶
NewHTTPMethodEndpoint returns an endpoint function that calls the method "http_method" of service "test".
Types ¶
type Client ¶
type Client struct { HTTPMethodEndpoint goa.Endpoint GrpcMethodEndpoint goa.Endpoint GrpcStreamEndpoint goa.Endpoint }
Client is the "test" service client.
func (*Client) GrpcMethod ¶
GrpcMethod calls the "grpc_method" endpoint of the "test" service.
func (*Client) GrpcStream ¶
func (c *Client) GrpcStream(ctx context.Context) (res GrpcStreamClientStream, err error)
GrpcStream calls the "grpc_stream" endpoint of the "test" service.
type Endpoints ¶
Endpoints wraps the "test" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "test" service with endpoints.
type GrpcStreamClientStream ¶
type GrpcStreamClientStream interface { // Send streams instances of "Fields". Send(*Fields) error // Recv reads instances of "Fields" from the stream. Recv() (*Fields, error) // Close closes the stream. Close() error }
GrpcStreamClientStream is the interface a "grpc_stream" endpoint client stream must satisfy.
type GrpcStreamEndpointInput ¶
type GrpcStreamEndpointInput struct { // Stream is the server stream used by the "grpc_stream" method to send data. Stream GrpcStreamServerStream }
GrpcStreamEndpointInput holds both the payload and the server stream of the "grpc_stream" method.
type GrpcStreamServerStream ¶
type GrpcStreamServerStream interface { // Send streams instances of "Fields". Send(*Fields) error // Recv reads instances of "Fields" from the stream. Recv() (*Fields, error) // Close closes the stream. Close() error }
GrpcStreamServerStream is the interface a "grpc_stream" endpoint server stream must satisfy.
type Service ¶
type Service interface { // HTTPMethod implements http_method. HTTPMethod(context.Context, *Fields) (res *Fields, err error) // GrpcMethod implements grpc_method. GrpcMethod(context.Context, *Fields) (res *Fields, err error) // GrpcStream implements grpc_stream. GrpcStream(context.Context, GrpcStreamServerStream) (err error) }
Service is the test service interface.