🚀
Semaphore
  • Introduction
  • Getting started
    • Go API
    • CLI
    • Docker
    • Examples
  • Cookbook
    • Flows
      • References
      • Error handling
      • Conditional logic
      • Proxy forward
    • Schemas
      • Protobuffers
    • Transport
      • HTTP
      • Go micro
      • GraphQL
    • DevOps
  • Contributing
Powered by GitBook
On this page
  1. Cookbook
  2. Transport

Go micro

PreviousHTTPNextGraphQL

Last updated 4 years ago

The Go micro transport implementation could be used to call services. Basic implementations are available inside the . It is advised to implement your own custom implementation when wanting to have fine grained control over the go-micro options.

package main

import (
    "github.com/jexia/maestro"
    "github.com/jexia/maestro/codec/json"
    "github.com/jexia/maestro/protocol/micro"
    "github.com/micro/go-micro/service/grpc"
)

func main() {
    // gRPC service constructor
    service := grpc.NewService()

    client, err := maestro.New(
            maestro.WithCodec(json.NewConstructor()),
            maestro.WithCaller(micro.New("micro-grpc", service)),
    )
    
    err = client.Serve()
}

Check out the for more info

go-micro
CLI
go-micro documentation