grpc

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

README

GRPC Client

The grpc client is a micro.Client compatible client.

Overview

The client makes use of the google.golang.org/grpc framework for the underlying communication mechanism.

Usage

Specify the client to your micro service

import (
	"github.com/micro/go-micro"
	"github.com/micro/go-plugins/client/grpc"
)

func main() {
	service := micro.NewService(
		micro.Name("greeter"),
		micro.Client(grpc.NewClient()),
	)
}

Documentation

Overview

Package grpc provides a gRPC client Deprecated: use `github.com/micro/go-micro/client/grpc` instead

Package grpc provides a gRPC options

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultMaxRecvMsgSize maximum message that client can receive
	// (4 MB).
	// Deprecated: use `github.com/micro/go-micro/client/grpc` instead
	DefaultMaxRecvMsgSize = 1024 * 1024 * 4

	// DefaultMaxSendMsgSize maximum message that client can send
	// (4 MB).
	// Deprecated: use `github.com/micro/go-micro/client/grpc` instead
	DefaultMaxSendMsgSize = 1024 * 1024 * 4
)

Functions

func AuthTLS added in v0.7.0

func AuthTLS(t *tls.Config) client.Option

AuthTLS should be used to setup a secure authentication using TLS Deprecated: use `github.com/micro/go-micro/client/grpc` instead

func Codec added in v0.6.0

func Codec(contentType string, c encoding.Codec) client.Option

gRPC Codec to be used to encode/decode requests for a given content type Deprecated: use `github.com/micro/go-micro/client/grpc` instead

func MaxRecvMsgSize deprecated added in v0.16.2

func MaxRecvMsgSize(s int) client.Option

MaxRecvMsgSize set the maximum size of message that client can receive.

Deprecated: use `github.com/micro/go-micro/client/grpc` instead

func MaxSendMsgSize deprecated added in v0.20.0

func MaxSendMsgSize(s int) client.Option

MaxSendMsgSize set the maximum size of message that client can send.

Deprecated: use `github.com/micro/go-micro/client/grpc` instead

func NewClient deprecated

func NewClient(opts ...client.Option) client.Client

Deprecated: use `github.com/micro/go-micro/client/grpc` instead

Types

This section is empty.

Jump to

Keyboard shortcuts

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