Comments (2)
proto-gen-micro
package by the README must be installed with master
version, not latest
.
I'll fix this in template
The next step in init
is to install protoc-gen-openapi
, but as far as I can see it is no longer supported in V4
.
New problems are likely to arise as users try to follow the documentation's instructions.
TODO test
- new service create
- make targets
- run service with default values
from micro.
The handler template is not fully compatible anymore. Only can run Call
endpoint.
dna-tech@alex:micro$ go run cmd/micro/main.go new aaa
Creating service aaa
.
├── main.go
├── handler
│ └── aaa.go
├── proto
│ └── aaa.proto
├── dep-install.mk
├── Makefile
├── README.md
├── .gitignore
└── go.mod
cd aaa
go mod tidy
make proto
micro run .
dna-tech@alex:micro$ cd aaa
dna-tech@alex:aaa$ go mod tidy
dna-tech@alex:aaa$ make proto
protoc --proto_path=. --go_out=:. --micro_out=. proto/aaa.proto
dna-tech@alex:aaa$ micro run .
dna-tech@alex:aaa$ micro user
admin
dna-tech@alex:aaa$ micro services
auth
broker
config
events
helloworld
network
registry
runtime
store
dna-tech@alex:aaa$ micro status aaa
NAME VERSION SOURCE STATUS BUILD UPDATED METADATA
aaa latest /Volumes/DATA/sim/testdir/@micro/micro/aaa running n/a 1m5s agoowner=admin, group=micro
dna-tech@alex:aaa$ micro services
aaa
auth
broker
config
events
helloworld
network
registry
runtime
store
dna-tech@alex:aaa$ micro aaa --help
NAME:
micro aaa
VERSION:
latest
USAGE:
micro aaa [command]
COMMANDS:
call
pingPong
stream
dna-tech@alex:aaa$ micro aaa call --help
NAME:
micro aaa call
USAGE:
micro aaa call [flags]
FLAGS:
--name string
dna-tech@alex:aaa$ micro aaa call --name="John"
{
"msg": "Hello John"
}
dna-tech@alex:aaa$ micro aaa stream --help
NAME:
micro aaa stream
USAGE:
micro aaa stream [flags]
FLAGS:
dna-tech@alex:aaa$ micro aaa not-exists --help
NAME:
micro aaa not-exists
USAGE:
micro aaa not-exists [flags]
FLAGS:
dna-tech@alex:aaa$ micro aaa pingPong --help
NAME:
micro aaa pingPong
USAGE:
micro aaa pingPong [flags]
FLAGS:
dna-tech@alex:aaa$ micro call --help
NAME:
micro call - Call a service e.g micro call greeter Say.Hello '{"name": "John"}'
USAGE:
micro call [command options] [arguments...]
OPTIONS:
--address value Set the address of the service instance to call [$MICRO_ADDRESS]
--output value Set the output format; json (default), raw [$MICRO_OUTPUT]
--metadata value A list of key-value pairs to be forwarded as metadata [$MICRO_METADATA]
--request_timeout value timeout duration
--help, -h show help (default: false)
dna-tech@alex:aaa$ micro call aaa --help
malformed method name: "--help"
dna-tech@alex:aaa$ micro call aaa Aaa.Call '{"name":"John"}'
{
"msg": "Hello John"
}
dna-tech@alex:aaa$ micro call aaa Aaa.Stream '{"name":"John"}'
grpc: failed to unmarshal the received message: unknown field "name" in aaa.StreamingRequest
dna-tech@alex:aaa$ micro call aaa Aaa.Stream '{"name":"John","messages":10}'
grpc: failed to unmarshal the received message: unknown field "messages" in aaa.StreamingRequest
dna-tech@alex:aaa$ micro call aaa Aaa.Stream '{}'
EOF
dna-tech@alex:aaa$ micro call aaa Aaa.PingPong '{"stroke":1}'
EOF
dna-tech@alex:aaa$ micro call aaa Aaa.PingPong '{"stroke":"aaa"}'
grpc: failed to unmarshal the received message: invalid character 'a' looking for beginning of value
dna-tech@alex:aaa$ micro call aaa Aaa.Stream '{"count":10}'
grpc: client streaming protocol violation: get <nil>, want <EOF>
dna-tech@alex:aaa$
Maybe referenced to #1961
from micro.
Related Issues (20)
- Failed to connect to micro server at 127.0.0.1:10012 HOT 2
- Unable to login on a remote server HOT 2
- How to run in production? HOT 6
- Kubernetes Deployment HOT 2
- Context deadline exceeded HOT 2
- server.NewServer use http2 some bug
- 'micro' is not recognized as an internal or external command, operable program or batch file.
- Problems connecting with Windows
- Could not import opentelemetry HOT 2
- How to write KV to a table. HOT 4
- How to update and delete - tables/databases HOT 1
- Postgres Database Connectivity HOT 2
- micro.dev/v4 - module declares its path as: github.com/micro/micro HOT 8
- Releaser build with CGO_ENABLED=0 doesn't run on Mac M1 HOT 1
- ..\..\go\pkg\mod\github.com\!proton!mail\[email protected]\openpgp\ecdh\x25519.go:16:2: //go:build comment without // +build comment HOT 3
- list of bugs i know
- run micro server command error HOT 6
- Release 4.5.0 does not contain prebuilt binaries HOT 5
- How to run a service that has been built into binary? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from micro.