1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-08-04 21:42:57 +02:00
Commit Graph

3648 Commits

Author SHA1 Message Date
a1da40d9aa Delete CNAME 2021-10-01 20:23:38 +01:00
a315fc2dda Fix missing content type (#2289) 2021-09-30 12:15:09 +01:00
6dc25053ea Errors (#2290)
* add errors.As

convert target err to *Error, return false if err don't match *Error

* update errors.As to (*Error, bool)

* fixing FromError panic issue when err is nil
2021-09-30 07:45:10 +01:00
4612baa7f8 zap plugin: allow injecting zap logger options (#2287)
Though some of the Zap logger option can be customized through
plugins/logger/zap.Options, this change allows go.uber.org/zap.Option be
be injected directly for deeper customization.
2021-09-29 07:12:16 +01:00
44ecd6a457 Hystrix filter (#2286)
* support hystrix filter

* filter function should return true of false
2021-09-28 11:23:04 +01:00
8c39b1e120 Update index.html 2021-09-24 09:10:04 +01:00
12eff1cc60 go fmt 2021-09-24 09:08:39 +01:00
9deb715ebb Update go.mod 2021-09-24 09:08:16 +01:00
3b60db0dcd logger helper: add "inject" method, to make a pair with "extract" (#2283) 2021-09-23 16:48:08 +01:00
af22cbb108 Update README.md 2021-09-22 14:48:20 +01:00
9d7131a512 Update README.md 2021-09-22 14:43:37 +01:00
bca9ab165d Update README.md 2021-09-22 14:42:17 +01:00
d111f96993 Update README.md 2021-09-22 14:41:29 +01:00
2f223c276c Update README.md 2021-09-22 14:32:06 +01:00
33acb4a956 update readme 2021-09-22 14:31:21 +01:00
b515785637 add services dir 2021-09-22 14:30:40 +01:00
3dcdcdad32 Update README.md 2021-09-22 13:37:07 +01:00
916ed6b8ee logger: caller's skip correction (#2280) 2021-09-22 09:01:03 +01:00
b8fbe87e1f Use context to log "panic recovered" errors in grpc-server plugin (#2278) 2021-09-20 10:50:13 +01:00
cb3db7dd83 Update options.go 2021-09-19 17:22:28 +01:00
066ce5045b Command Option add NewConfig,NewProfile func (#2276)
* Add grpc,memory,quic transport automatically discover

* Add grpc,memory,quic transport automatically discover

* Add jwt auth automatically discover

* Add jwt auth automatically discover

* Add config command option automatically discover

* Add AuthCall wrapper func

* Add NewConfig func

* Add NewProfile func
2021-09-19 17:21:55 +01:00
a65932ff82 Create CNAME 2021-09-19 15:10:47 +01:00
5496086916 Create index.html 2021-09-19 14:44:03 +01:00
efd4ef0e62 fix(cache): only watch calling service in registry (#2273) 2021-09-19 10:40:21 +01:00
00d819a199 Remove fields map from Helper, add Extract method and fix for defaultLogger.Fields (#2274) 2021-09-19 10:40:09 +01:00
ad532522ea Config CORS (#2270)
* Added cors.config for CORS

* Added cors.config for CORS

* Added cors.config for CORS

Co-authored-by: 于海洋 <yhy@iothinking.com>
2021-09-17 10:17:12 +01:00
4c7d2e28eb test(api): fix randomly failing rpc test (#2268) 2021-09-13 21:56:36 +01:00
d78d35078c Consul sync plugin (#2267)
* adding consul sync provider

* adding logging options

Co-authored-by: Branden Horiuchi <Branden.Horiuchi@blackline.com>
2021-09-13 19:08:05 +01:00
22409c8ff3 support hystrix filter (#2265) 2021-09-13 09:23:26 +01:00
6c3a5c161f upgrade nacos sdk version (#2264)
Co-authored-by: binbin <binbin@didiglobal.com>
2021-09-12 22:16:46 +01:00
fa27250605 Add generate kubernetes command (#2261) 2021-09-10 18:56:51 +01:00
ac21bb5b19 Document Gomu's generator package (#2262) 2021-09-10 18:48:09 +01:00
5b8d22a463 Add Kubernetes flag to new command (#2263)
To remain consistent with the Gomu's generate command, we add a
Kubernetes flag to Gomu's new command as well.
2021-09-10 18:47:55 +01:00
56d5143557 Document Gomu's generate command (#2260) 2021-09-10 14:30:46 +01:00
5772697752 Make generator package a first class citizen (#2259)
There's really no point in having the `generator` be embedded in a
`file` package so we remove the `file` package and make the `generator`
package a first class citizen instead.
2021-09-10 13:31:52 +01:00
e23006b1a5 Generate Gomu files after the fact (#2258)
* Move file generation to new package

* Use text/template instead of html/template

* Make config variables more consistent

* Combine generate files and print comments there

* Add gomu generate command

* Refactor project templating to file library

* Determine client earlier
2021-09-10 13:20:57 +01:00
01b7b4409b Fix generating Dockerfile with Gomu (#2254)
Somehow I didn't test this and managed to forget to properly close a
template control structure. This change fixes that.
2021-09-08 14:43:52 +01:00
0dd6afe128 Optimize Dockerfile generated by Gomu (#2253)
This change prevents having to rebuild the entire Docker image when your
source code changes.
2021-09-08 12:50:30 +01:00
a36f52c6d2 Fix Gomu's call response (#2251)
Gomu expects a `map[string]string` type response back, but this isn't
always the case. When Gomu calls a service endpoint that responds with,
let's say, a key where its value is a map or a list, Gomu would be
unable to decode that response. By expecting a `map[string]interface{}`
type response, Gomu is able to decode those responses as well.
2021-09-08 08:30:53 +01:00
440aa4a1ce Add AuthCall wrapper func (#2250)
* Add grpc,memory,quic transport automatically discover

* Add grpc,memory,quic transport automatically discover

* Add jwt auth automatically discover

* Add jwt auth automatically discover

* Add config command option automatically discover

* Add AuthCall wrapper func
2021-09-07 07:13:56 +01:00
f77c91b7ae Simplify gomu cmd registering (#2249)
* Use internal runtime package for gomu run

This change refactors the `gomu run` command to use Go Micro's internal
runtime package in order to run services. Not only does this clean up
duplicate functionality between Go Micro and Gomu, but also adds the
feature to Gomu to run remote projects. For example, the following
command pulls in a remote project and runs it locally.

```bash
gomu run github.com/auditemarlow/helloworld
```

The `gomu run` command remains backwards compatible. By invoking `gomu
run` in a Go Micro project directory, Gomu will simply run that project.

* Simplify Gomu's command registering

By leveraging Go's `init()` function, we can simplify registering
commands just a tad.
2021-09-06 14:12:27 +01:00
a58b8883f8 Use internal runtime package for gomu run (#2248)
This change refactors the `gomu run` command to use Go Micro's internal
runtime package in order to run services. Not only does this clean up
duplicate functionality between Go Micro and Gomu, but also adds the
feature to Gomu to run remote projects. For example, the following
command pulls in a remote project and runs it locally.

```bash
gomu run github.com/auditemarlow/helloworld
```

The `gomu run` command remains backwards compatible. By invoking `gomu
run` in a Go Micro project directory, Gomu will simply run that project.
2021-09-06 14:01:29 +01:00
270d910b73 Add config command option automatically discover (#2246)
* Add grpc,memory,quic transport automatically discover

* Add grpc,memory,quic transport automatically discover

* Add jwt auth automatically discover

* Add jwt auth automatically discover

* Add config command option automatically discover
2021-09-04 07:17:21 +01:00
77bf39f2cd Fix client gRPC plugin (#2245)
The helloworld examples found in the `google.golang.org/grpc/examples`
package were imported multiple times as different versions, resulting in
package conflicts. By running `go mod tidy`, these conflicts are
resolved and the gRPC client plugin can now be imported again.
2021-09-03 14:16:56 +01:00
c45073a308 Fix Skaffold pipelines for client projects (#2244)
* Update greeter references to helloworld

* Add new client command

With this change, Gomu users will be able to generate template projects
for clients to services. Additionally vendor support has been built in
so Gomu users can now generate projects using fully qualified package
names, for example:

```bash
gomu new service github.com/auditemarlow/helloworld
```

This will create a new service project `helloworld` with its module name
already set to `github.com/auditemarlow/helloworld`. Likewise, Gomu
users can then generate client projects in the same manner:

```bash
gomu new client github.com/auditemarlow/helloworld
```

This will create a `helloworld-client` project that uses the protobufs
found in the `github.com/auditemarlow/helloworld` service. This removes
at least some strain in configuring these module dependencies yourself;
you can just scaffold them outright from the start.

Although the default client project is highly opinionated, it works
straight out of the box and has Skaffold in mind. Gomu users should be
able to get going in a matter of seconds.

* Update README

* Fix Skaffold pipeline for generated client projects
2021-09-03 13:26:34 +01:00
86de031adc [WIP] Add new client cmd (#2243)
* Update greeter references to helloworld

* Add new client command

With this change, Gomu users will be able to generate template projects
for clients to services. Additionally vendor support has been built in
so Gomu users can now generate projects using fully qualified package
names, for example:

```bash
gomu new service github.com/auditemarlow/helloworld
```

This will create a new service project `helloworld` with its module name
already set to `github.com/auditemarlow/helloworld`. Likewise, Gomu
users can then generate client projects in the same manner:

```bash
gomu new client github.com/auditemarlow/helloworld
```

This will create a `helloworld-client` project that uses the protobufs
found in the `github.com/auditemarlow/helloworld` service. This removes
at least some strain in configuring these module dependencies yourself;
you can just scaffold them outright from the start.

Although the default client project is highly opinionated, it works
straight out of the box and has Skaffold in mind. Gomu users should be
able to get going in a matter of seconds.

* Update README
2021-09-03 12:33:10 +01:00
80dbe51077 Add jwt auth automatically discover (#2242)
* Add grpc,memory,quic transport automatically discover

* Add grpc,memory,quic transport automatically discover

* Add jwt auth automatically discover

* Add jwt auth automatically discover
2021-09-03 07:49:49 +01:00
f444dadd50 fixing #2235 win10 install failed issue (#2239) 2021-09-03 07:49:39 +01:00
e080791787 chore(gomu): tweak makefile template (#2238) 2021-09-02 18:24:28 +01:00
a159598f36 Add grpc,memory,quic transport automatically discover (#2237)
* Add grpc,memory,quic transport automatically discover

* Add grpc,memory,quic transport automatically discover
2021-09-02 18:10:24 +01:00