mirror of
https://github.com/go-micro/go-micro.git
synced 2024-12-12 08:23:58 +02:00
f96b48dad9
2. try fixing grpc plugin failed to get issue use v4.0.0-v4.0.0-00010101000000-000000000000 instead of specific version 3. kafka panic on disconnect panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x18 pc=0x1266c50] goroutine 31 [running]: github.com/asim/go-micro/plugins/broker/kafka/v3.(*kBroker).Disconnect(0xc0002400c0) C:/Workshop/Go/pkg/mod/github.com/asim/go-micro/plugins/broker/kafka/v3@v3.7.0/kafka.go:130 +0xd0 github.com/asim/go-micro/plugins/server/grpc/v3.(*grpcServer).Start.func2() C:/Workshop/Go/pkg/mod/github.com/asim/go-micro/plugins/server/grpc/v3@v3.0.0-20210712061837-0532fd9de8ae/grpc.go:998 +0xc8d created by github.com/asim/go-micro/plugins/server/grpc/v3.(*grpcServer).Start C:/Workshop/Go/pkg/mod/github.com/asim/go-micro/plugins/server/grpc/v3@v3.0.0-20210712061837-0532fd9de8ae/grpc.go:917 +0xcaf exit status 2 |
||
---|---|---|
.. | ||
codec.go | ||
error.go | ||
go.mod | ||
go.sum | ||
grpc_pool_test.go | ||
grpc_pool.go | ||
grpc_test.go | ||
grpc.go | ||
message.go | ||
options.go | ||
README.md | ||
request_test.go | ||
request.go | ||
response.go | ||
stream.go |
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()),
)
}