srpc

package module
v0.0.0-...-29ec7e5 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalRoutedInterceptor = NewRoutedInterceptor()

Functions

This section is empty.

Types

type RoutedInterceptor

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

func NewRoutedInterceptor

func NewRoutedInterceptor() *RoutedInterceptor

func (*RoutedInterceptor) Add

Add integrates new routed or catch-all interceptors.

func (*RoutedInterceptor) AddMultiple

func (ci *RoutedInterceptor) AddMultiple(ds []UnaryInterceptInfo) error

func (*RoutedInterceptor) InvokeStream

func (ci *RoutedInterceptor) InvokeStream(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) (err error)

func (*RoutedInterceptor) InvokeUnary

func (ci *RoutedInterceptor) InvokeUnary(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)

type ServerModule

type ServerModule interface {
	RegisterServer(*grpc.Server)
	InterceptMethods() []UnaryInterceptInfo
}

type UnaryInterceptInfo

type UnaryInterceptInfo struct {
	// Methods that trigger this interception handler.
	FullMethod []string
	// If there are multiple interceptors for the regarded method string,
	// a handler is passed along a chaing of interceptors until one party
	// consumes it. In this case, interception ends here.
	// Last, it will stop at the end of the chain.
	Consume bool
	// The function to execute on an unary request.
	// If nil, the default handler is executed for a routed entry. Catch-all
	// entries must implement a handler function.
	UnaryFunc grpc.UnaryServerInterceptor
	// The function to execute for a stream.
	StreamFunc grpc.StreamServerInterceptor
}

Directories

Path Synopsis
Package helloworld is a generated protocol buffer package.
Package helloworld is a generated protocol buffer package.
proto
Package auth is a generated protocol buffer package.
Package auth is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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