1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-12 08:23:58 +02:00
go-micro/plugins/client/grpc
2021-04-29 13:03:40 +01:00
..
codec.go update v3 plugins (#2105) 2021-01-20 21:01:10 +00:00
error.go optimize the process of switching grpc error to micro error (#2158) 2021-04-29 13:03:40 +01:00
go.mod update plugins version & remove replace (#2118) 2021-02-05 09:09:25 +00:00
go.sum update v3 plugins (#2105) 2021-01-20 21:01:10 +00:00
grpc_pool_test.go
grpc_pool.go
grpc_test.go update v3 plugins (#2105) 2021-01-20 21:01:10 +00:00
grpc.go update v3 plugins (#2105) 2021-01-20 21:01:10 +00:00
message.go update v3 plugins (#2105) 2021-01-20 21:01:10 +00:00
options.go update v3 plugins (#2105) 2021-01-20 21:01:10 +00:00
README.md
request_test.go
request.go update v3 plugins (#2105) 2021-01-20 21:01:10 +00:00
response.go update v3 plugins (#2105) 2021-01-20 21:01:10 +00:00
stream.go update v3 plugins (#2105) 2021-01-20 21:01:10 +00:00

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()),
	)
}