grpc

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2021 License: Apache-2.0, MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
}

type Context

type Context struct {
	context.Context
	// contains filtered or unexported fields
}

Context

func (*Context) Next

func (c *Context) Next() (err error)

Next run the next handler func until out of range

func (*Context) Request

func (c *Context) Request() interface{}

Request gets read-only request

func (*Context) Response

func (c *Context) Response() interface{}

Response gets read-only response

func (*Context) SetResponse

func (c *Context) SetResponse(resp interface{})

SetResponse sets the response to context

type Handler

type Handler interface {
	ServeGRPC(ctx context.Context, request interface{}) (interface{}, error)
}

func CombineHandlers

func CombineHandlers(cfg Config, h ...HandlerFunc) Handler

CombineHandlers return a grpc Handler

type HandlerFunc

type HandlerFunc func(*Context) error

Jump to

Keyboard shortcuts

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