Micro-v4/

directory
v0.0.0-...-419a547 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2024 License: Apache-2.0

README

Go Micro v4

安装

go install github.com/go-micro/cli/cmd/go-micro@latest

make (windows中)

下载https://osdn.dl.osdn.net/mingw/68260/mingw-get-setup.exe 或tdm-gcc
安装mingw32-make.exe,改名make.exe加入PATH
或直接D:\softwares\tdm-gcc\bin

创服务

go-micro new service helloworld
cd helloworld
make proto init update tidy
go-micro run
go-micro call helloworld Helloworld.Call '{"name": "John"}'
go-micro stream server helloworld Helloworld.ServerStream '{"count": 10}'

创函数

go-micro new function test-func
cd test-func
make init proto update tidy

创客户端

go-micro new client helloworld
creating client helloworld
cd helloworld-client
make tidy
go-micro run

描述服务

go-micro describe service helloworld

Directories

Path Synopsis
proto
Package greeter is a generated protocol buffer package.
Package greeter is a generated protocol buffer package.
greeter
cli
srv
Package main
Package main

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL