Go micro

The Go micro transport implementation could be used to call go-micro services. Basic implementations are available inside the CLI. 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 go-micro documentation for more info

Last updated