test

package
v2.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2018 License: MIT Imports: 3 Imported by: 0

README

Example Service: test

This example service is used for testing purposes.

Prerequisites

  • Install gRPC
    • Make sure protoc is in GOPATH/bin
    • Make sure google/protobuf is also in GOPATH/bin
  • Install grpc-gateway

Regenerate client/server from proto

  • Use go:generate to build client/server and swagger docs:
    • go generate

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct{}

Service contains the implementation for the gRPC service.

func NewService

func NewService() *Service

NewService creates a new instance of Service.

func (*Service) Echo

func (s *Service) Echo(ctx context.Context, in *pb.SendRequest) (*pb.EchoResponse, error)

Echo the value in the request back in the response.

func (*Service) Large

func (s *Service) Large(ctx context.Context, in *pb.LargeRequest) (*pb.EchoResponse, error)

Large will send a large response message.

func (*Service) Send

func (s *Service) Send(ctx context.Context, in *pb.SendRequest) (*pb.TestResponse, error)

Send the value in the request.

func (*Service) Stream

func (s *Service) Stream(stream pb.TestService_StreamServer) error

Stream a bunch of requests.

Directories

Path Synopsis
Package test is a generated protocol buffer package.
Package test is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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