grpchelper

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2018 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialContext

func DialContext(ctx context.Context, target string, opts ...grpc.DialOption) (*grpc.ClientConn, error)

GrpcDialContext creates a client connection to the given target with custom message size

func Listen

func Listen(address string) (net.Listener, error)

Listen is equivalent to standard net.Listen, but taking gRPC URL as input.

func NewServer

func NewServer(opts ...grpc.ServerOption) *grpc.Server

NewGrpcServer creates new grpc.Server with custom message size

func SetMaxMessageSize

func SetMaxMessageSize(size int)

SetMaxMessageSize overrides default grpc max. message size to send/receive to/from clients

func ToGoGrpcAddress

func ToGoGrpcAddress(address string) (string, error)

ToGoGrpcAddress converts a standard gRPC target name to a one that is supported by grpc-go.

func ToNetListenerAddress

func ToNetListenerAddress(target string) (network, address string, err error)

ToNetListenerAddress converts a gRPC URL to a network+address consumable by net.Listen. For example:

ipv4://127.0.0.1:8080 -> (tcp4, 127.0.0.1:8080)

Types

This section is empty.

Jump to

Keyboard shortcuts

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