Micro is a platform for cloud native development

Overview

Micro License Go Report Card

Overview

Micro addresses the key requirements for building services in the cloud. It leverages the microservices architecture pattern and provides a set of services which act as the building blocks of a platform. Micro deals with the complexity of distributed systems and provides simpler programmable abstractions to build on.

Contents

  • Introduction - A high level introduction to Micro
  • Getting Started - The helloworld quickstart guide
  • Upgrade Guide - Update your go-micro project to use micro v3.
  • Architecture - Describes the architecture, design and tradeoffs
  • Reference - In-depth reference for Micro CLI and services
  • Resources - External resources and contributions
  • Roadmap - Stuff on our agenda over the long haul
  • Users - Developers and companies using Micro in production
  • FAQ - Frequently asked questions
  • Blog - For the latest from us

Features

Below are the core components that make up Micro.

Server

Micro is built as a microservices architecture and abstracts away the complexity of the underlying infrastructure. We compose this as a single logical server to the user but decompose that into the various building block primitives that can be plugged into any underlying system.

The server is composed of the following services.

  • API - HTTP Gateway which dynamically maps http/json requests to RPC using path based resolution
  • Auth - Authentication and authorization out of the box using jwt tokens and rule based access control.
  • Broker - Ephemeral pubsub messaging for asynchronous communication and distributing notifications
  • Config - Dynamic configuration and secrets management for service level config without the need to restart
  • Events - Event streaming with ordered messaging, replay from offsets and persistent storage
  • Network - Inter-service networking, isolation and routing plane for all internal request traffic
  • Proxy - An identity aware proxy used for remote access and any external grpc request traffic
  • Runtime - Service lifecycle and process management with support for source to running auto build
  • Registry - Centralised service discovery and API endpoint explorer with feature rich metadata
  • Store - Key-Value storage with TTL expiry and persistent crud to keep microservices stateless

Framework

Micro additionally now contains the incredibly popular Go Micro framework built in for service development. The Go framework makes it drop dead simple to write your services without having to piece together lines and lines of boilerplate. Auto configured and initialised by default, just import and get started quickly.

Command Line

Micro brings not only a rich architectural model but a command line experience tailored for that need. The command line interface includes dynamic command mapping for all services running on the platform. Turns any service instantly into a CLI command along with flag parsing for inputs. Includes support for multiple environments and namespaces, automatic refreshing of auth credentials, creating and running services, status info and log streaming, plus much, much more.

Environments

Finally Micro bakes in the concept of Environments and multi-tenancy through Namespaces. Run your server locally for development and in the cloud for staging and production, seamlessly switch between them using the CLI commands micro env set [environment] and micro user set [namespace].

Install

From Source

go get github.com/micro/micro/v3

Using Docker

# install
docker pull micro/micro

# run it
docker run -p 8080-8081:8080-8081/tcp micro/micro server

Helm Chart

helm repo add micro https://micro.github.io/helm
helm install micro micro/micro

Release binaries

# MacOS
curl -fsSL https://raw.githubusercontent.com/micro/micro/master/scripts/install.sh | /bin/bash

# Linux
wget -q  https://raw.githubusercontent.com/micro/micro/master/scripts/install.sh -O - | /bin/bash

# Windows
powershell -Command "iwr -useb https://raw.githubusercontent.com/micro/micro/master/scripts/install.ps1 | iex"

Getting Started

Run the server locally

micro server

Set the environment to local (127.0.0.1:8081)

micro env set local

Login to the server

# user: admin pass: micro
micro login

Create a service

# generate a service (follow instructions in output)
micro new helloworld

# run the service
micro run helloworld

# check the status
micro status

# list running services
micro services

# call the service
micro helloworld --name=Alice

# curl via the api
curl -d '{"name": "Alice"}' http://localhost:8080/helloworld

Example Service

Micro includes a Go framework for writing services wrapping gRPC for the core IDL and transport.

Define services in proto:

syntax = "proto3";

package helloworld;

service Helloworld {
	rpc Call(Request) returns (Response) {}
}

message Request {
	string name = 1;
}

message Response {
	string msg = 1;
}

Write them using Go:

package main

import (
	"context"
  
	"github.com/micro/micro/v3/service"
	"github.com/micro/micro/v3/service/logger"
	pb "github.com/micro/services/helloworld/proto"
)

type Helloworld struct{}

// Call is a single request handler called via client.Call or the generated client code
func (h *Helloworld) Call(ctx context.Context, req *pb.Request, rsp *pb.Response) error {
	logger.Info("Received Helloworld.Call request")
	rsp.Msg = "Hello " + req.Name
	return nil
}

func main() {
	// Create service
	srv := service.New(
		service.Name("helloworld"),
	)

	// Register Handler
	srv.Handle(new(Helloworld))

	// Run the service
	if err := srv.Run(); err != nil {
		logger.Fatal(err)
	}
}

Call with the client:

import (
	"context"
  
	"github.com/micro/micro/v3/service/client"
	pb "github.com/micro/services/helloworld/proto"
)

// create a new helloworld service client
helloworld := pb.NewHelloworldService("helloworld", client.DefaultClient) 

// call the endpoint Helloworld.Call
rsp, err := helloworld.Call(context.Background(), &pb.Request{Name: "Alice"})

Curl it via the API

curl http://localhost:8080/helloworld?name=Alice

Usage

See the docs for detailed information on the architecture, installation and use of the platform.

License

See LICENSE which makes use of Polyform Shield.

Hosting

For the hosted Micro Platform aka M3O see m3o.com.

Community

Join us in GitHub Discussions or Slack.

Issues
  • [Discuss] micro dashboard

    [Discuss] micro dashboard

    is different from micro web. micro dashboard works for internal enviroment. micro web works for the open side which include services, network, ...

    micro dashboard cares below features:

    • config management
    • microservice management
    • microservice call
    • gateway management
    • monitor metrics
    • bot management
    • ...
    • pluggable, people can integrate everything like Ops tools into it.
    opened by printfcoder 28
  • Runtime class name not being passed on update (v3.1.0)

    Runtime class name not being passed on update (v3.1.0)

    micro version used: v3.1.0

    1. I create a new service called user on my local machine using: micro new user
    2. I cd into the new service root folder: cd user
    3. I deployed it to a remote Kubernetes cluster on GCP using: micro run .
    4. I made some changes to my handlers
    5. I tried to redeploy the service using: micro update .

    The last step fails and the service never gets updated on Kubernetes.

    The logs from the runtime (micro logs -f runtime) shows this:

    2021-02-28 19:41:49  file=handler/handler.go:474 level=info service=runtime Updating service user version latest source source://user:latest
    2021-02-28 19:41:49  file=manager/util.go:51 level=info service=runtime Preparing to build user:latest
    2021-02-28 19:41:49  file=manager/util.go:100 level=info service=runtime Build starting user:latest
    2021-02-28 19:42:23  file=manager/util.go:105 level=info service=runtime Build finished user:latest <nil>
    2021-02-28 19:42:23  file=manager/util.go:115 level=info service=runtime Uploading build user:latest
    2021-02-28 19:42:24  file=kubernetes/kubernetes.go:383 level=error service=runtime Runtime failed to update deployment: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"user-latest\" is invalid: spec.template.spec.runtimeClassName: Invalid value: \"\": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')","reason":"Invalid","details":{"name":"user-latest","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueInvalid","message":"Invalid value: \"\": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')","field":"spec.template.spec.runtimeClassName"}]},"code":422}
    

    Looks like an empty runtimeClassName on update.

    opened by SebScoFr 27
  • Can't login to server

    Can't login to server

    When I run micro login I get the following -

    Enter username: admin
    Enter password: 
    Account not found with this ID
    

    Using admin / micro (server up and running fine)

    opened by gridworkz 18
  • Not authorized to perform this request On Win10

    Not authorized to perform this request On Win10

    Describe the bug On windows 10,I follow the https://micro.mu/getting-started

    To Reproduce Steps to reproduce the behavior:

    1. Install micro
    go get github.com/micro/micro/v3
    go get github.com/golang/protobuf/protoc-gen-go
    go get github.com/micro/micro/v3/cmd/protoc-gen-micro
    
    1. Start server by micro server
    2. Login by micro login --username admin --password micro and success
    3. Call micro service got Not authorized to perform this request

    Screenshots image

    Desktop (please complete the following information):

    • OS: Windows 10 Professional Edition(19042.867)
    • Browser N/A
    • Version N/A

    Additional context There are some guys with the same problem. #1590 #1603

    opened by yangyanqing 15
  • How to create Custom API Gateway in Micro V3?

    How to create Custom API Gateway in Micro V3?

    Discussed in https://github.com/micro/micro/discussions/1924

    Originally posted by agus7fauzi March 21, 2022 Please help me, I'm having trouble creating a custom api gateway using a plugin based on that article https://developpaper.com/go-micro-service-go-micro-16-custom-micro-api-gateway-middleware-micro-plug-in-learning/ as I expected for my application, but the problem is the code really doesn't work on my Micro V3, does anyone know how to use a plugin in Micro V3 especially for API Gateway?

    opened by agus7fauzi 13
  • While Running A micro Server

    While Running A micro Server

    Describe the bug Trying to bring up micro server using getting started.

    Expected behavior Micro server to start

    Screenshots Screenshot 2021-03-12 at 8 58 53 PM

    image

    Desktop (please complete the following information):

    • OS: mac OS
    • Version micro version v3.1.1
    opened by themukeshbansal 13
  • Service

    Service "auth" not found

    Describe the bug After running micro server and entering any subsequent command (for example, micro services), the Service "auth" not found message is printed.

    micro login returns the following message. The same JSON is returned by the HTTP API interface:

    Error authorizing request: {"Id":"go.micro.client","Code":500,"Detail":
    "{\"Id\":\"go.micro.client\",\"Code\":500,\"Detail\":\"service auth: route not found\",\"Status\":\"Internal Server Error\"}","Status":"Internal Server Error"}
    

    To Reproduce Steps to reproduce the behavior:

    1. I have been following the tutorial.
    2. Start Micro by micro server
    3. Enter micro services, or try to login by micro login
    4. See the respective errors.

    Expected behavior

    • As per docs, micro login should print Successfully logged in., provided the credentials are correct.
    • micro services should list the running services.

    Screenshots The result of micro server: image The results of micro services: image

    Desktop (please complete the following information):

    • OS: Windows 10
    • Version: 10.0.19042 Build 19042
    • Micro version: v3.0.4

    Additional context I'm pretty sure it's an issue with mDNS. I have updated Windows to this version (10.0.19042), which supposedly have native mDNS support, tried setting EnableMulticast in Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient, installing Bonjour, etc. However, I'm totally new to Go, microservices and Micro and not that experienced in the low level networking stuff... I would be happy to use my Mac, but Go doesn't work with the M1 processors yet, as far as I know. So I'm stuck.

    opened by markszenteTB 13
  • micro server log error

    micro server log error

    just

    go get github.com/micro/micro/v3
    

    and micro server

    C:\Users\Administrator>micro --version
    micro version v3.0.0-beta
    
    C:\Users\Administrator>micro server
    2020-09-12 10:26:00  file=server/server.go:111 level=info Starting server
    2020-09-12 10:26:00  file=server/server.go:122 level=info Registering network
    2020-09-12 10:26:00  file=server/server.go:122 level=info Registering runtime
    2020-09-12 10:26:00  file=server/server.go:122 level=info Registering registry
    2020-09-12 10:26:00  file=server/server.go:122 level=info Registering config
    2020-09-12 10:26:00  file=server/server.go:122 level=info Registering store
    2020-09-12 10:26:00  file=server/server.go:122 level=info Registering broker
    2020-09-12 10:26:00  file=local/service.go:240 level=error Service runtime terminated with error exit status 2
    2020-09-12 10:26:00  file=server/server.go:122 level=info Registering events
    2020-09-12 10:26:00  file=server/server.go:122 level=info Registering auth
    2020-09-12 10:26:00  file=server/server.go:122 level=info Registering proxy
    2020-09-12 10:26:00  file=server/server.go:122 level=info Registering api
    2020-09-12 10:26:00  file=server/server.go:187 level=info Starting server runtime
    2020-09-12 10:26:00  file=service/service.go:195 level=info Starting [service] server
    2020-09-12 10:26:00  file=grpc/grpc.go:898 level=info Server [grpc] Listening on [::]:10001
    2020-09-12 10:26:00  file=grpc/grpc.go:728 level=info Registry [mdns] Registering node: server-34b235a3-f095-4477-96b9-e2ac34031fcb
    2020-09-12 10:26:05  file=local/service.go:240 level=error Service runtime terminated with error exit status 2
    2020-09-12 10:26:10  file=local/service.go:240 level=error Service runtime terminated with error exit status 2
    2020-09-12 10:26:15  file=local/service.go:240 level=error Service runtime terminated with error exit status 2
    

    Service runtime terminated with error exit status 2

    opened by taadis 13
  • Go micro dashboard does not register my service when running inside docker-compose

    Go micro dashboard does not register my service when running inside docker-compose

    Posted this on Stackoverflow but no luck there so far.

    I'm new to go-micro, tried to have micro server running as another service in my docker-compose setup however my first micro-service is not getting show in Micro Web (the Go Micro dashboard). If I run micro server outside docker-compose I can see several go-micro-related micro-services in the dashboard, but inside docker-compose none is displayed.

    I have put together an example code that reproduces what I experience, I generated the service using micro new and changed nothing in it, the docker-compose.yml reflects how I have it setup in my project where I began experiencing this:

    https://github.com/shackra/go-micro-docker-compose-bug

    got this output:

    ➜ docker-compose up
    Starting go-micro-docker-compose-bug_example_1 ... done
    Starting go-micro-docker-compose-bug_micro_1   ... done
    Attaching to go-micro-docker-compose-bug_example_1, go-micro-docker-compose-bug_micro_1
    example_1  | 2020-07-02 03:35:06  [email protected]/service.go:200 level=info Starting [service] go.micro.service.example
    example_1  | 2020-07-02 03:35:06  file=grpc/grpc.go:864 level=info Server [grpc] Listening on [::]:46619
    example_1  | 2020-07-02 03:35:06  file=grpc/grpc.go:881 level=info Broker [http] Connected to 127.0.0.1:33619
    example_1  | 2020-07-02 03:35:06  file=grpc/grpc.go:697 level=info Registry [mdns] Registering node: go.micro.service.example-46f35090-fd8a-459b-abf1-5b3035066121
    example_1  | 2020-07-02 03:35:06  file=grpc/grpc.go:730 level=info Subscribing to topic: go.micro.service.example
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:125 level=info service=micro Loading core services
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.config
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.auth
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.network
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.runtime
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.registry
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.broker
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.store
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.router
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.debug
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.proxy
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.api
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.web
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.bot
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.init
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:186 level=info service=micro Starting service runtime
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:194 level=info service=micro Service runtime started
    micro_1    | 2020-07-02 03:35:07  [email protected]/service.go:200 level=info service=micro Starting [service] go.micro.server
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info service=micro Server [grpc] Listening on [::]:10001
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info service=micro Registry [mdns] Registering node: go.micro.server-48ff8f13-cc11-4389-b79d-5410113ab532
    micro_1    | 2020-07-02 03:35:07  [email protected]/service.go:200 level=info service=runtime Starting [service] go.micro.runtime
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info service=runtime Server [grpc] Listening on [::]:8088
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info service=runtime Registry [mdns] Registering node: go.micro.runtime-7ab4bdaa-8eef-47e4-9b18-092fae28acb2
    micro_1    | 2020-07-02 03:35:07  [email protected]/service.go:200 level=info service=registry Starting [service] go.micro.registry
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info service=registry Server [grpc] Listening on [::]:8000
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info service=registry Registry [mdns] Registering node: go.micro.registry-3fb6dd36-3457-449c-8c40-9340a98c86f3
    micro_1    | 2020-07-02 03:35:07  file=store/store.go:62 level=info service=store Initialising the [file] store with opts: {Nodes:[] Database:micro Table:store Context:<nil> Client:grpc}
    micro_1    | 2020-07-02 03:35:07  [email protected]/service.go:200 level=info service=store Starting [service] go.micro.store
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info service=store Server [grpc] Listening on [::]:35527
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info service=store Registry [mdns] Registering node: go.micro.store-c32d97a8-81bb-4505-a69b-6b67f3fe691a
    micro_1    | 2020-07-02 03:35:07  [email protected]/service.go:200 level=info service=auth Starting [service] go.micro.auth
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info service=auth Server [grpc] Listening on [::]:8010
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info service=auth Registry [mdns] Registering node: go.micro.auth-a8363f42-0e99-4211-88bb-69e94b557ebc
    micro_1    | 2020-07-02 03:35:07  [email protected]/service.go:200 level=info Starting [service] go.micro.config
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info Server [grpc] Listening on [::]:45667
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:887 level=info Broker [http] Connected to 127.0.0.1:32807
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info Registry [mdns] Registering node: go.micro.config-133079f3-8c2f-4c4d-8d77-b1f70a3c6f9b
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:734 level=info Subscribing to topic: go.micro.config.events
    micro_1    | 2020-07-02 03:35:07  [email protected]/service.go:200 level=info service=broker Starting [service] go.micro.broker
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info service=broker Server [grpc] Listening on [::]:8001
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info service=broker Registry [mdns] Registering node: go.micro.broker-d02dd0f7-ab33-4e37-9783-103312619e4b
    micro_1    | 2020-07-02 03:35:07  file=platform/platform.go:137 level=info service=init Starting service runtime
    micro_1    | 2020-07-02 03:35:07  file=platform/platform.go:144 level=info service=init Service runtime started
    micro_1    | 2020-07-02 03:35:07  file=bot/bot.go:219 level=info service=bot starting
    micro_1    | 2020-07-02 03:35:07  [email protected]/service.go:200 level=info service=bot Starting [service] go.micro.bot
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info service=bot Server [grpc] Listening on [::]:32911
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info service=bot Registry [mdns] Registering node: go.micro.bot-cc3a5499-2db9-4bde-b065-764be2078a92
    micro_1    | 2020-07-02 03:35:07  file=api/api.go:285 level=info service=api Registering API Default Handler at /
    micro_1    | 2020-07-02 03:35:07  file=http/http.go:90 level=info service=api HTTP API Listening on [::]:8080
    micro_1    | 2020-07-02 03:35:07  [email protected]/service.go:200 level=info service=api Starting [service] go.micro.api
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info service=api Server [grpc] Listening on [::]:37935
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info service=api Registry [mdns] Registering node: go.micro.api-29529723-9ca6-40a7-8f6c-14a48efee146
    micro_1    | 2020-07-02 03:35:07  file=proxy/proxy.go:215 level=info service=proxy Proxy [mucp] serving protocol: grpc
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info service=proxy Server [grpc] Listening on [::]:8081
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info service=proxy Registry [memory] Registering node: go.micro.server-3fc6e321-2bae-4a33-b0dc-7b3bff48775a
    micro_1    | 2020-07-02 03:35:07  [email protected]/service.go:200 level=info service=proxy Starting [service] go.micro.proxy
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info service=proxy Server [grpc] Listening on [::]:37097
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info service=proxy Registry [mdns] Registering node: go.micro.proxy-3fc6e321-2bae-4a33-b0dc-7b3bff48775a
    micro_1    | 2020-07-02 03:35:07  file=http/http.go:90 level=info service=web HTTP API Listening on [::]:8082
    micro_1    | 2020-07-02 03:35:07  [email protected]/service.go:200 level=info service=web Starting [service] go.micro.web
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info service=web Server [grpc] Listening on [::]:46627
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info service=web Registry [mdns] Registering node: go.micro.web-1986a07a-fb2f-4070-8592-6734e10f0672
    micro_1    | 2020-07-02 03:35:07  file=router/router.go:225 level=info service=router starting to advertise
    micro_1    | 2020-07-02 03:35:07  [email protected]/service.go:200 level=info service=router Starting [service] go.micro.router
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info service=router Server [grpc] Listening on [::]:8084
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:887 level=info service=router Broker [http] Connected to 127.0.0.1:36919
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info service=router Registry [mdns] Registering node: go.micro.router-5fc78527-1fe6-48ac-a56d-48eacdb46f2f
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:734 level=info service=router Subscribing to topic: go.micro.router.adverts
    micro_1    | 2020-07-02 03:35:08  [email protected]/service.go:200 level=info service=debug Starting [service] go.micro.debug
    micro_1    | 2020-07-02 03:35:08  file=grpc/grpc.go:870 level=info service=debug Server [grpc] Listening on [::]:8089
    micro_1    | 2020-07-02 03:35:08  file=grpc/grpc.go:701 level=info service=debug Registry [mdns] Registering node: go.micro.debug-0a50a681-e929-4c31-8851-832559e1d9cf
    micro_1    | 2020-07-02 03:35:08  file=server/rpc_server.go:825 level=info service=server Transport [tunnel] Listening on 4129517757616118777
    micro_1    | 2020-07-02 03:35:08  file=server/rpc_server.go:845 level=info service=server Broker [tunnel] Connected to [::]:8085
    micro_1    | 2020-07-02 03:35:08  file=server/rpc_server.go:659 level=info service=server Registry [mdns] Registering node: go.micro-55a11382-b26c-420b-8734-f4719d302967
    micro_1    | 2020-07-02 03:35:08  file=network/network.go:209 level=info service=server Network [go.micro] listening on :8085
    micro_1    | 2020-07-02 03:35:08  [email protected]/service.go:200 level=info service=server Starting [service] go.micro.network
    micro_1    | 2020-07-02 03:35:08  file=grpc/grpc.go:870 level=info service=server Server [grpc] Listening on [::]:36015
    micro_1    | 2020-07-02 03:35:08  file=grpc/grpc.go:701 level=info service=server Registry [mdns] Registering node: go.micro.network-55a11382-b26c-420b-8734-f4719d302967
    micro_1    | 172.21.0.1 - - [02/Jul/2020:03:37:03 +0000] "GET / HTTP/1.1" 200 4846 "" "Mozilla/5.0 (X11; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0"
    micro_1    | 172.21.0.1 - - [02/Jul/2020:03:37:03 +0000] "GET /favicon.ico HTTP/1.1" 200 0 "" "Mozilla/5.0 (X11; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0"
    micro_1    | 2020-07-02 03:37:06  file=auth/wrapper.go:84 level=error service=web none available
    micro_1    | 172.21.0.1 - - [02/Jul/2020:03:37:05 +0000] "GET /client HTTP/1.1" 500 15 "http://localhost:8082/" "Mozilla/5.0 (X11; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0"
    micro_1    | 2020-07-02 03:37:09  file=auth/wrapper.go:84 level=error service=web none available
    micro_1    | 172.21.0.1 - - [02/Jul/2020:03:37:09 +0000] "GET /services HTTP/1.1" 500 15 "http://localhost:8082/" "Mozilla/5.0 (X11; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0"
    

    If I restart my example service micro will complain about it:

    example_1  | 2020-07-02 03:38:19  file=grpc/grpc.go:791 level=info Deregistering node: go.micro.service.example-46f35090-fd8a-459b-abf1-5b3035066121
    example_1  | 2020-07-02 03:38:19  file=grpc/grpc.go:814 level=info Unsubscribing from topic: go.micro.service.example
    example_1  | 2020-07-02 03:38:19  file=grpc/grpc.go:959 level=info Broker [http] Disconnected from 127.0.0.1:33619
    micro_1    | 2020-07-02 03:38:19  file=registry/registry.go:102 level=error service=api unable to get go.micro.service.example service: service not found
    go-micro-docker-compose-bug_example_1 exited with code 0
    micro_1    | 2020-07-02 03:38:28  file=handler/handler.go:227 level=error service=debug Error calling [email protected]:46619 ({"id":"go.micro.client","code":500,"detail":"connection error: desc = \"transport: Error while dialing dial tcp 172.21.0.2:46619: connect: connection refused\"","status":"Internal Server Error"})
    

    What am I doing wrong and how do I get the Micro dashboard to work as expected inside docker-compose?

    opened by shackra 13
  • Does api gateway support stream?

    Does api gateway support stream?

    Hi, When I trace down to API gateway code, I found that eventually it invokes client.Call() to the target micro service. But there is no place to support client/server stream mode, by invoking client.Stream(). Does the API gateway support it?

    Thanks Leon

    opened by leon-github 12
  • Question: Micro Service Discovery over WAN using Consul

    Question: Micro Service Discovery over WAN using Consul

    Here is my deployment:

    1. Consul server agent running on machine A
    2. Consul agent running on Machine B, joined member with A
    3. A service 'example' runs on machine A
    4. micro list services and micro get service foo.example works from Machine A as well as from B
    5. micro query foo.example GetApi - This works only from machine A. I get an error when trying the same on machine B.

    ERROR: {"id":"go.micro.client","code":408,"detail":"call timeout: context deadline exceeded","status":"Request Timeout"}

    I am using go 1.7.4 on Ubuntu 16.04. Any advice to resolve this ?

    opened by ramukima 12
  • Windows support

    Windows support

    We currently have poor support for Windows with a lot of users attempting to use Micro on that platform. We need to go through, test and fix everything for Windows.

    help wanted 
    opened by asim 0
  • micro run self service error

    micro run self service error

    C:\Users\SEMI\go λ micro server 2022-05-12 11:34:22 file=server/server.go:88 level=info Starting server 2022-05-12 11:34:22 file=server/server.go:116 level=info Registering registry 2022-05-12 11:34:22 file=server/server.go:116 level=info Registering broker 2022-05-12 11:34:22 file=server/server.go:116 level=info Registering network 2022-05-12 11:34:22 file=server/server.go:116 level=info Registering runtime 2022-05-12 11:34:22 file=server/server.go:116 level=info Registering config 2022-05-12 11:34:22 file=server/server.go:116 level=info Registering store 2022-05-12 11:34:22 file=server/server.go:116 level=info Registering events 2022-05-12 11:34:22 file=server/server.go:116 level=info Registering auth 2022-05-12 11:34:22 file=server/server.go:116 level=info Registering proxy 2022-05-12 11:34:22 file=server/server.go:116 level=info Registering api 2022-05-12 11:34:22 file=server/server.go:116 level=info Registering web 2022-05-12 11:34:22 file=server/server.go:206 level=info Starting server runtime

    Micro will use the c:\ window path:

    D:\work\test\go-micro λ micro run . Rpc error: code = Unknown desc = Error writing source to blob store: open C:\Windows\micro\store\blob.db: Access is denied.

    Another error occurs when permissions are resolved: D:\work\test\go-micro λ micro run . error reading from server: read tcp 192.168.254.1:58068->192.168.254.1:8088: wsarecv: An existing connection was forcibly closed by the remote host.

    opened by flyish 1
  • github.com/micro/go-plugins/broker/kafka requires wants /micro/go-micro which is not available

    github.com/micro/go-plugins/broker/kafka requires wants /micro/go-micro which is not available

    go: github.com/micro/go-plugins/broker/[email protected] requires
    	github.com/micro/[email protected] requires
    	github.com/micro/[email protected]: reading github.com/micro/protoc-gen-micro/go.mod at revision v1.0.0: unknown revision v1.0.0
    make: *** [local] Error 1
    

    I am upgrading go-micro to v4 but getting error for go-plugins as this also requires the older version. How can I resolve this? Would be great if you can help me with this.

    Thanks

    opened by umishra21 0
  • Todo Endpoint Cache

    Todo Endpoint Cache

    Allow services to specify time to cache endpoints which clients honour

    pb.RegisterUserHandler(service.Server(), new(User), server.CacheEndpoint(time.Minute)) 
    

    The client would lookup the registry, see endpoint metadata "cache": "60" and know to cache the response for 60 seconds.

    opened by asim 0
Releases(v3.10.1)
Go Micro is a framework for distributed systems development

Go Micro Go Micro is a framework for distributed systems development. Overview Go Micro provides the core requirements for distributed systems develop

Asim Aslam 18.2k May 15, 2022
a microservice framework for rapid development of micro services in Go with rich eco-system

中文版README Go-Chassis is a microservice framework for rapid development of microservices in Go. it focus on helping developer to deliver cloud native a

null 2.5k May 9, 2022
GoLang utility packages to assist with the development of web micro-services.

GoTil Golang utility packages to assist with the development of web micro-services. Installation As a library. go get github.com/ccthomas/gotil Usage

Christopher Thomas 0 Nov 26, 2021
Go Micro: a standard library for distributed systems development

Go Micro Go Micro is a standard library for distributed systems development. Ove

Pixelmatic 1 May 2, 2022
Cloud-native and easy-to-use application management platform | 云原生且易用的应用管理平台

Website • Documentation What is NEW! August 24, 2020 ,Rainbond 5.2 Stable version is officially released View Release Rainbond Introduction Cloud nati

好雨科技 3k May 13, 2022
goTempM is a full stack Golang microservices sample application built on top of the Micro platform.

goTempM is a full stack Golang microservices sample application built on top of the Micro platform.

null 25 Apr 28, 2022
A Micro-UTP, plug-able sanity checker for any on-prem JFrog platform instance

hello-frog About this plugin This plugin is a template and a functioning example for a basic JFrog CLI plugin. This README shows the expected structur

rdar 0 Dec 7, 2021
Erda is an open-source platform created by Terminus to ensure the development of microservice applications.

Erda is an open-source platform created by Terminus to ensure the development of microservice applications.

Erda 2.3k May 14, 2022
Sample cloud-native application with 10 microservices showcasing Kubernetes, Istio, gRPC and OpenCensus.

Online Boutique is a cloud-native microservices demo application. Online Boutique consists of a 10-tier microservices application. The application is

Google Cloud Platform 12.1k May 12, 2022
Blue is a lightweight cloud-native gateway solution to handle millions of routing endpoints with a large number of connections.

Blue is a lightweight cloud-native gateway solution to handle millions of routing endpoints with a large number of connections.

null 456 Jan 19, 2022
Trying to build an Ecommerce Microservice in Golang and Will try to make it Cloud Native - Learning Example extending the project of Nic Jackson

Golang Server Project Best Practices Dependency Injection :- In simple words, we want our functions and packages to receive the objects they depend on

Ujjwal Sharma 13 May 4, 2022
Box is an incrementally adoptable tool for building scalable, cloud native, microservices.

Box is a tool for building scalable microservices from predefined templates. Box is currently in Beta so if you find any issues or have some ideas

null 1 Feb 3, 2022
Online Boutique: a cloud-native microservices demo application

This is an application forked from the GCP Microservice demo. Online Boutique is

null 0 Jan 5, 2022
CudeX: a cloud native intelligent operation and maintenance engine that provides service measurement, index quantification

简介 CudgX是星汉未来推出的面向云原生时代的AIOps智能运维引擎,它通过各类服务的多维度、大数据量的数据收集及机器学习训练分析,对各种服务进行指标化、数字

Galaxy-Future 63 May 4, 2022
Micro-service framework in Go

Kite Micro-Service Framework Kite is a framework for developing micro-services in Go. Kite is both the name of the framework and the micro-service tha

Koding, Inc. 3.1k May 15, 2022
NewSQL distributed storage database based on micro service framework

QLite 是基于微服务的 NewSQL 型数据库系统,与传统的一体化数据库不同,该系统将本该内置的多种数据结构(STL)拆分成多个服务模块,每个模块都是独立的一个节点,每个节点都与其主网关进行连接,从而形成分布式存储结构。

null 30 Mar 25, 2022
A code generator that turns plain old Go services into RPC-enabled (micro)services with robust HTTP APIs.

Frodo is a code generator and runtime library that helps you write RPC-enabled (micro) services and APIs.

Monadic 17 Apr 21, 2022
Automatic Service Mesh and RPC generation for Go micro services, it's a humble alternative to gRPC with Istio.

Mesh RPC MeshRPC provides automatic Service Mesh and RPC generation for Go micro services, it's a humble alternative to gRPC with Istio. In a nutshell

AstraNet Toolkit 68 Apr 19, 2022
🦄🌈 YoyoGo is a simple, light and fast , dependency injection based micro-service framework written in Go.

???? YoyoGo is a simple, light and fast , dependency injection based micro-service framework written in Go. Support Nacos ,Consoul ,Etcd ,Eureka ,kubernetes.

YoyoFx 533 May 1, 2022