mygrpc

package module
v0.0.0-...-7fc9753 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: MIT Imports: 9 Imported by: 0

README

mygrpc

Example grpc server using gokit

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeGRPCLastNameRequest

func DecodeGRPCLastNameRequest(ctx context.Context, r interface{}) (interface{}, error)

func DecodeGRPCLastNameResponse

func DecodeGRPCLastNameResponse(ctx context.Context, r interface{}) (interface{}, error)

func EncodeGRPCLastNameRequest

func EncodeGRPCLastNameRequest(ctx context.Context, r interface{}) (interface{}, error)

func EncodeGRPCLastNameResponse

func EncodeGRPCLastNameResponse(ctx context.Context, r interface{}) (interface{}, error)

func MakeGetLastNameEndpoint

func MakeGetLastNameEndpoint(s Service) endpoint.Endpoint

func NewGRPCServer

func NewGRPCServer(ctx context.Context, endpoints MyEndpoints) mygrpcpb.MyGrpcServer

NewGRPCServer ...

func NewHTTPServer

func NewHTTPServer(ctx context.Context, endpoints MyEndpoints) http.Handler

NewHTTPServer makes a new mygrpc HTTP service.

func NewSimpleLoggingMiddleware

func NewSimpleLoggingMiddleware() endpoint.Middleware

Types

type MyEndpoints

type MyEndpoints struct {
	GetLastNameEndpoint endpoint.Endpoint
}

func (MyEndpoints) GetLastName

func (e MyEndpoints) GetLastName(ctx context.Context, firstName string) (string, error)

type Service

type Service interface {
	GetLastName(ctx context.Context, firstName string) (string, error)
}

func NewService

func NewService() Service

Directories

Path Synopsis
client
cmd
cli
helper
pb

Jump to

Keyboard shortcuts

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