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
2020-12-29 15:49:26 +00:00
..
codec.go refactor all the things 2020-12-29 15:49:26 +00:00
error.go refactor all the things 2020-12-29 15:49:26 +00:00
go.mod refactor all the things 2020-12-29 15:49:26 +00:00
go.sum refactor all the things 2020-12-29 15:49:26 +00:00
grpc_pool_test.go refactor all the things 2020-12-29 15:49:26 +00:00
grpc_pool.go refactor all the things 2020-12-29 15:49:26 +00:00
grpc_test.go refactor all the things 2020-12-29 15:49:26 +00:00
grpc.go refactor all the things 2020-12-29 15:49:26 +00:00
message.go refactor all the things 2020-12-29 15:49:26 +00:00
options.go refactor all the things 2020-12-29 15:49:26 +00:00
README.md refactor all the things 2020-12-29 15:49:26 +00:00
request_test.go refactor all the things 2020-12-29 15:49:26 +00:00
request.go refactor all the things 2020-12-29 15:49:26 +00:00
response.go refactor all the things 2020-12-29 15:49:26 +00:00
stream.go refactor all the things 2020-12-29 15:49:26 +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()),
	)
}