Skip to content
Branch: master
Find file History
bvwells Remove dead link to sidecar example
Remove dead link to sidecar example.
Latest commit 97e3a62 Mar 18, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
gateway update for proto changes Mar 24, 2018
greeter protoc-gen-micro was updated Apr 25, 2018


Contains examples for using go-grpc

New service

Check out the greeter example using go-grpc

Import go-grpc

import ""

Create micro.Service

service := grpc.NewService()

Pre-existing Service

What if you want to add grpc to a pre-existing service? Use the build pattern for plugins but swap out the client/server.

Create a plugin file

package main

import (
	cli ""
	srv ""

func init() {
	// set the default client
	client.DefaultClient = cli.NewClient()
	// set the default server
	server.DefaultServer = srv.NewServer()

Build the binary

// For local use
go build -i -o service ./main.go ./plugins.go


Because the default client/server have been replaced we can just run as usual

You can’t perform that action at this time.