1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-03-17 20:28:06 +02:00
Niek den Breeje 77bf39f2cd
Fix client gRPC plugin (#2245)
The helloworld examples found in the `google.golang.org/grpc/examples`
package were imported multiple times as different versions, resulting in
package conflicts. By running `go mod tidy`, these conflicts are
resolved and the gRPC client plugin can now be imported again.
2021-09-03 14:16:56 +01:00
..
2021-01-20 21:01:10 +00:00
2021-09-03 14:16:56 +01:00
2021-09-03 14:16:56 +01:00
2020-12-29 15:49:26 +00:00
2020-12-29 15:49:26 +00:00
2021-06-29 13:40:54 +01:00
2021-01-20 21:01:10 +00:00
2021-01-20 21:01:10 +00:00
2021-01-20 21:01:10 +00:00
2020-12-29 15:49:26 +00:00
2020-12-29 15:49:26 +00:00
2021-01-20 21:01:10 +00:00
2021-01-20 21:01:10 +00:00
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()),
	)
}