grpc_util

package
v0.0.0-...-d9af017 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BizAuthfunc

func BizAuthfunc(ctx context.Context) (context.Context, error)

func BizStreamRecoveryHandler

func BizStreamRecoveryHandler(stream grpc.ServerStream, p interface{}) (err error)

func BizUnaryRecoveryHandler

func BizUnaryRecoveryHandler(ctx context.Context, p interface{}) (err error)

func RpcErrorFromMD

func RpcErrorFromMD(md metadata.MD) (rpcErr *mtproto.TLRpcError)

Server To Client

func RpcErrorToMD

func RpcErrorToMD(md *mtproto.TLRpcError) (metadata.MD, error)

func RpcMetadatToOutgoing

func RpcMetadatToOutgoing(ctx context.Context, md *zproto.RpcMetadata) (context.Context, error)

func RpcMetadataFromIncoming

func RpcMetadataFromIncoming(ctx context.Context) *zproto.RpcMetadata

func RpcMetadataFromMD

func RpcMetadataFromMD(md metadata.MD) (*zproto.RpcMetadata, error)

Types

type RPCClient

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

func NewRPCClient

func NewRPCClient(target string) (c *RPCClient, err error)

func (*RPCClient) Invoke

func (c *RPCClient) Invoke(rpcMetaData *zproto.RpcMetadata, object mtproto.TLObject) (mtproto.TLObject, error)

通用grpc转发器

Directories

Path Synopsis
middleware
recovery2
base recovery, RecoveryHandlerFunc spit UnaryRecoveryHandlerFunc and StreamRecoveryHandlerFunc
base recovery, RecoveryHandlerFunc spit UnaryRecoveryHandlerFunc and StreamRecoveryHandlerFunc

Jump to

Keyboard shortcuts

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