Plugins are scoped under each interface directory within this repository. To use a plugin, import it directly from the corresponding interface subpackage and pass it to your service via options.
For native gRPC compatibility (required for `grpcurl`, polyglot gRPC clients, etc.), use the gRPC server and client plugins. Note: This is different from the gRPC transport.
```go
import(
"go-micro.dev/v5"
grpcServer"go-micro.dev/v5/server/grpc"
grpcClient"go-micro.dev/v5/client/grpc"
)
funcmain(){
svc:=micro.NewService(
micro.Server(grpcServer.NewServer()),
micro.Client(grpcClient.NewClient()),
)
svc.Init()
svc.Run()
}
```
See [Native gRPC Compatibility](guides/grpc-compatibility.md) for a complete guide.
- Defaults: If you don’t set an implementation, Go Micro uses sensible in-memory or local defaults (e.g., mDNS for registry, HTTP transport, memory broker/store).
- Options: Each plugin exposes constructor options to configure addresses, credentials, TLS, etc.
- Imports: Only import the plugin you need; this keeps binaries small and dependencies explicit.