Commit Graph

142 Commits

Author SHA1 Message Date
ben-toogood
174e44b846
Deprecate client/selector (#1767)
* client/{grpc,rpc}: depricate selector (wip)

* {client,cmd}: remove client/selector

* deprecate client/selector

* router/static: fix lookup

* config/cmd: add support for legacy static selector flag

* config/cmd: add support for legacy dns selector flag
2020-07-01 17:06:59 +01:00
ben-toogood
c940961574
router: update interface (#1732)
* router: replace Start and Stop with Close

* router: update default network to micro

* router: update tests
2020-06-24 11:09:16 +01:00
ben-toogood
8dfd93e915 util/wrapper: Add Static Client wrapper (#1685)
* util/wrapper: Add Static Client wrapper

* util/wrapper/static: pass address to stream too

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* add static client wrapper tests

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* server: fix error message spaces between words

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* server/{rpc,grpc}: replace log.Error with log.Errorf

* server/grpc: fix log typo

* server/rpc: fix log typo

Co-authored-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-06-12 10:42:52 +01:00
Máximo Cuadros
0d88650511
go modules cleanup and remove wrong self import to v1 (#1658)
* Runtime local git, simply go-git code
* go modules cleanup and remove wrong self import to v1
* pin mergo v0.3.8 to avoid panics

Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
Co-authored-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-05-29 14:32:11 +03:00
x1nchen
af2db0a0d9
fix: update dependency certmagic (#1625)
module github.com/mholt/certmagic has been renamed github.com/caddyserver/certmagic,
so upgrade on this module will fail.

fix: micro/micro#835

caddyserver/certmagic@v0.10.6 is Maximum upgradeable version with go version 1.13

Higher version use *tls.ClientHelloInfo.SupportsCertificate which only supported in go 1.14
2020-05-13 15:00:13 +01:00
Janos Dobronszki
1eb63635b5
Adding file upload and download capabilities (#1610) 2020-05-11 14:08:27 +02:00
Janos Dobronszki
ff8ad7d4ca
Default runtime now checks out code on demand (#1563)
* Default runtime now checks out code on demand

* Go mod tidy
2020-04-23 16:30:43 +02:00
6fa27373ed
bundle qson lib in util (#1561)
* copy qson from https://github.com/joncalhoun/qson
  as author not want to maintain repo
* latest code contains our fix to proper decode strings
  with escaped & symbol
* replace package in api/handler/rpc

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-04-23 11:08:09 +03:00
62cedf64da
api/router/registry: extract path based parameters from url to req (#1530)
* api/router/registry: extract path based parameters from url to req
* api/handler/rpc: fix empty body request parsing
* bundle grpc-gateway util funcs

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-04-15 17:50:51 +03:00
Ben Toogood
2de03e5fd7 Tidy go mod 2020-04-15 11:39:53 +01:00
3ce2ab88f5
broker/nats: remove embed nats server reference (#1527)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-04-11 22:37:29 +03:00
Asim Aslam
ea2bb0275c Strip external use of mdns 2020-04-11 13:02:53 +01:00
Asim Aslam
3f3d2f5027 fixup broker http address 2020-04-11 01:51:26 +01:00
bc71640fd9
broker: swap default broker from eats to http (#1524)
* broker: swap default broker from eats to http

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-04-11 03:46:54 +03:00
Asim Aslam
b5f546b137 go mod tidy 2020-04-10 19:55:45 +01:00
Janos Dobronszki
2ea5b33955
Disk backed local store (#1491) 2020-04-07 13:53:22 +02:00
Jake Sanders
3324d140c0
Rename store Namespace / Prefix options to Database and Table (#1492)
* Rename Namespace to DB, Rename Prefix to table, Remove Suffix Option

* Rename options

* Rename options

* Add store_table option

* Table per service, not Database per service
2020-04-06 16:45:55 +01:00
0241197c6a
api/handler/rpc: binary streaming support (#1466)
* api/handler/rpc: binary streaming support

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* fixup

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* fix

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* fix sec webscoekt protol

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-04-02 10:13:04 +01:00
Janos Dobronszki
15fcd5ecef
Remove Go micro 1.18 dependency (#1462) 2020-04-01 16:14:08 +02:00
Janos Dobronszki
bb51b8203e
Runtime logs (#1447)
* Runtime logs

* Slightly broken

* Pushing for diff

* Log trailing works locally

* LogsOptions

* Comments and streamcount support for local logs

* Adding kubernetes logs

* Fixing k8s logs

* K8s fixes

* StreamCount is now nuked

* PR comments

* PR comments again

* Fix typo
2020-04-01 15:40:15 +02:00
9e6db79860
regenerate all proto (#1440)
* regenerate all proto

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* regenerate from proto

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* regenerate from proto

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-30 21:58:32 +01:00
3d7d5ce6b4
api: add static router and improve path parser in rpc handler (#1437)
* api: add static router and improve path parser in rpc handler

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* expose metadata context key to be able to get unmodified map keys

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* server/grpc: fix jsonpb codec for protobuf msg

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* api/handler/rpc: write 204 status code when rsp is nil

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* api/handler/rpc: add check for nil response for non javascript

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-30 09:04:59 +01:00
b38da6ced0
api/handler/rpc: process all methods and merge url params to json body (#1427)
* api/handler/rpc: process all methods and merge url params to json body

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* add merge json test

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-27 07:59:31 +00:00
Jake Sanders
eb4d2ae6aa
Remove useless variable from cockroach store (#1400) 2020-03-24 15:37:30 +00:00
Jake Sanders
c91bf7e9e7
[WIP] Store Sync (#1365)
* Initial cache implementation

* Write queue implementation

* Accidentally started writing the storage sync service
2020-03-18 16:39:36 +00:00
Asim Aslam
078dd4eb9b
fix etcd (#1340)
* fix etcd

* update go mod
2020-03-13 08:55:23 +00:00
Jake Sanders
1b4e881d74
Rewrite the store interface (#1335)
* WIP store rewrite

* Fix memory store tests

* Store hard expiry times rather than duration!

* Clarify memory test

* Add limit to store interface

* Implement suffix option

* Don't return nils from noop store

* Fix syncmap

* Start fixing store service

* wip service and cache

* Use _ for special characters in cockroachdb namespace

* Improve cockroach namespace comment

* Use service name as default store namespace

* Fixes

* Implement Store Scope

* Start fixing etcd

* implement read and write with expiry and prefix

* Fix etcd tests

* Fix cockroach store

* Fix cloudflare interface

* Fix certmagic / cloudflare store

* comment lint

* cache isn't implemented yet

* Only prepare DB staements once

Co-authored-by: Ben Toogood <ben@micro.mu>
Co-authored-by: ben-toogood <bentoogood@gmail.com>
2020-03-12 13:41:30 +00:00
Jake Sanders
eebd69c995
Change from renekroon/ttlcache to patrickmn/go-cache (#1288) 2020-03-03 13:35:49 +00:00
Jake Sanders
f6102bde70
Add a cache to workers KV storage implementation (#1284)
* cloudflare-cache

* go mod tidy
2020-03-02 18:14:25 +00:00
1f767ba18c
update go modules (#1240)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-02-23 20:47:44 +00:00
7ab3a31ac4
update micro/cli, tidy mod (#1156)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-02-03 23:29:44 +00:00
ben-toogood
d621548120
Auth (#1147)
Implement the Auth interface, with JWT and service implementations.

* Update Auth Interface

* Define Auth Service Implementation

* Support Service Auth

* Add Auth Service Proto

* Remove erronious files

* Implement Auth Service Package

* Update Auth Interface

* Update Auth Interface. Add Validate, remove Add/Remove roles

* Make Revoke interface more explicit

* Refactor serializing and deserializing service accounts

* Fix srv name & update interface to be more explicit

* Require jwt public key for auth

* Rename Variables (Resource.ID => Resource.Name & ServiceAccount => Account)

* Implement JWT Auth Package

* Remove parent, add ID

* Update auth imports to v2. Add String() to auth interface
2020-02-03 08:16:02 +00:00
f23638c036 fix import paths for v2 release
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-01-30 14:44:40 +03:00
Asim Aslam
2b1e0a6fd6 go mod tidy 2020-01-30 10:33:40 +00:00
Janos Dobronszki
a648c0d99c Bump dep to fix platform web using new debug.Stats proto fields 2020-01-30 10:27:21 +00:00
e6a34bcbe7 update micro/cli to urfave/cli/v2 and fix go-micro
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-01-25 15:57:08 +03:00
Asim Aslam
9a8c1b7ab8 update broker 2020-01-19 13:35:23 +00:00
Asim Aslam
b32ebddf85 update nlopes/slack dep 2020-01-15 21:22:07 +00:00
Asim Aslam
1d311ab457
Embedded NATS Broker (#1110)
* if the address is produced by a default route don't hash it

* embedded nats

* fix url parsing

* don't override help

* add ready flag
2020-01-14 13:23:16 +00:00
Asim Aslam
61cde4a9f4
Kubernetes Registry (#1064)
* add teh k8s registry

* add k8s reg config/cmd

* go mod update
2019-12-27 20:08:46 +00:00
Asim Aslam
2338e7c9d2 Cleanup go mod 2019-12-18 16:12:25 +00:00
Asim Aslam
5d7254e79a fix the os logger 2019-12-18 15:06:25 +00:00
johnson
11e42aac69 etcd can set log config
default log level is info, which will log o log of unused logs
2019-12-13 11:22:05 +08:00
Asim Aslam
d50f30d743 strip handlers 2019-12-10 11:46:13 +00:00
Jan Kremlacek
1582aa1572 proper go.mod, go.sum 2019-12-09 22:08:57 +01:00
Jan Kremlacek
5352d53346
nlopes/slack dep update to fix broken unmarshal
About a month ago Slack introduced the updated structure of RTM messages which resulted in an inability to unmarshal received msg (original issue: https://github.com/nlopes/slack/issues/630). It's not an issue of micro itself, but of the github.com/nlopes/slack lib. The fix was already merged into master (https://github.com/nlopes/slack/pull/618), but the lib has not been released in any new version.

Thus so I propose to update directly to the commit:

go get github.com/nlopes/slack@d06c2a2b3249b44a9c5dee8485f5a87497beb9ea

The MicroBot does now work now with any Slack client newer than around a month old.
2019-12-09 21:52:28 +01:00
罗泽轩
64a251d69a improve the syncMap.Iterate test to make it 100% reproducible (#970)
* improve the syncMap.Iterate test to make it 100% reproducible

* rename store/mocks/Store.go

* rename mocks/store to mock/store
2019-11-23 14:13:17 +00:00
Erik Hollensbe
4107733453 Memory registry from #801 with additional tweaks (#951)
* PoC: memory registry using maps instead of slice madness

* Updated proto and handlers. Fixed tests across codebase.

* Implemented ttl pruning for memory registry

* Added extensive memory registry tests

* Squased a bunch of bugs

* Proto indent; memory.Registry.String() returns "memory"

* Write a test to prove memory registry TTLs are busted

Signed-off-by: Erik Hollensbe <github@hollensbe.org>

* Additional memory testing and fixups:

* DefaultTTL removed
* When TTL == 0, it is automatically removed from expiry conditions
* Additional improvements to new tests

Signed-off-by: Erik Hollensbe <github@hollensbe.org>
2019-11-16 10:55:11 +00:00
Milos Gajdos
97c1300f53 [WIP] Micro Runtime (#947)
* Add Get() and GetOptions.

* Removed watcher. Outline of client. YAML templates

* Added default service and deployment templates and types

* Added API tests and cleaned up errors.

* Small refactoring. Template package is no more.

* Ripped out existing code in preparation to small rework

* Reshuffled the source code to make it organized better

* Create service and deployment in kubernetes runtime

* Major cleanup and refactoring of Kubernetes runtime

* Service now handles low level K8s API calls across both K8s deployment
an service API objects
* Runtime has a task queue that serves for queueing runtime action
requests
* General refactoring

* No need for Lock in k8s service

* Added kubernetes runtime env var to default deployment

* Enable running different versions of the same service

* Can't delete services through labels

* Proto cruft. Added runtime.CreateOptions implementation in proto

* Removed proxy service from default env variables

* Make service name mandatory param to Get method

* Get Delete changes from https://github.com/micro/go-micro/pull/945

* Replaced template files with global variables

* Validate service names before sending K8s API request

* Refactored Kubernetes API client. Fixed typos.

* Added client.Resource to make API resources more explicit in code
2019-11-15 13:41:40 +00:00
Asim Aslam
c433de80cd Update go mod 2019-11-09 15:44:52 +00:00
Jake Sanders
ee35fe61af update go.mod for postgres 2019-11-01 14:13:47 +00:00
Jake Sanders
53ee4ee482 goodbye cloudflare-go 2019-10-23 17:33:20 +01:00
Jake Sanders
9bd0a8f3b5 Update go.mod for cloudflare 2019-10-15 12:35:20 +01:00
Asim Aslam
18ea19a122 Regenerate go.mod 2019-10-12 12:04:55 +01:00
Peter Theophanous
62aaa72715
fix: bumped quic-go version to v0.12.1 2019-10-11 18:16:56 +01:00
Jake Sanders
9bd96d4cc1 Update go.mod for ACME changes 2019-10-11 16:24:25 +01:00
Milos Gajdos
25148af44c First commit to add etcd registry support 2019-10-02 18:56:53 +01:00
Milos Gajdos
03b8ceab5c Update go.mod 2019-10-01 19:33:23 +01:00
Asim Aslam
e8a53610f1 Update go mod to use 1.13 2019-10-01 19:09:29 +01:00
Milos Gajdos
87a5e85062 Add 1.13 support. Fix tests to enable 1.13 support 2019-09-27 17:14:24 +01:00
Asim Aslam
cb4e376c64 Update go mod 2019-08-12 12:35:09 +01:00
Asim Aslam
4370f03e04 update go modules 2019-08-07 22:11:52 +01:00
Asim Aslam
89fc142e47 Update to use mdns 0.2.0 2019-07-31 13:16:57 +01:00
Asim Aslam
a5fb124b22 update the mdns version 2019-07-29 12:34:00 +01:00
Asim Aslam
6b984136f7 update go mod 2019-07-11 21:40:52 +01:00
Asim Aslam
360e193a01 update go mod 2019-07-11 12:47:50 +01:00
Asim Aslam
4aa0192eba Update go mod 2019-06-21 12:55:31 +01:00
Asim Aslam
6d06ee8078 Update go.mod to strip etcd 2019-06-11 11:40:37 +01:00
outshow
90a9df9b8c 1. use github.com/coreos instead of go.etcd.io in etcd related import path; 2. add dialtimeout to etcd client 2019-06-11 16:18:37 +08:00
Asim Aslam
a2fbf19341 Move sync deps, change uuid to google and update go.mod 2019-06-07 13:53:42 +01:00
Asim Aslam
9e23855c37 Fixup the proxy, strip down go.mod. Win bigly 2019-06-07 13:42:39 +01:00
lixiaohui
1152c7cb03 cleanup go.mod remove replace section 2019-06-07 03:05:33 +08:00
Asim Aslam
953f41aeab Fix go mod issues 2019-06-05 10:22:28 +01:00
Asim Aslam
d2857a7b16 Add web and update deps 2019-06-03 19:30:43 +01:00
Asim Aslam
1cd844bea4 update go mod 2019-06-03 19:07:21 +01:00
Asim Aslam
b42b6fa0fc Further consolidate the libraries 2019-06-03 18:44:43 +01:00
Asim Aslam
850f8bafdf update go.mod 2019-05-31 16:19:38 +01:00
Asim Aslam
30627c32c9 the garbage commit of go.mod vault deps 2019-05-31 15:24:15 +01:00
Asim Aslam
fd9021ad6a update go.mod 2019-05-31 15:07:27 +01:00
Asim Aslam
508d181f60 update go.mod 2019-05-31 12:38:55 +01:00
Asim Aslam
0f47569714 update go.mod 2019-05-31 12:35:43 +01:00
Asim Aslam
4035ab5c7b Change go-log links 2019-05-31 00:38:05 +01:00
Asim Aslam
8618183508 bump go.mod 2019-05-30 23:20:20 +01:00
Asim Aslam
6de3d9eb24 Update go mod 2019-05-22 16:11:06 +00:00
Asim Aslam
46f44fd8f8 update go mod 2019-04-23 07:15:03 +00:00
lixiaohui
c43d7137cf cleanup deps 2019-04-22 21:39:02 +08:00
Asim Aslam
722a3682c8 Update go mod 2019-03-28 17:01:56 +00:00
Asim Aslam
f1df0f6dfe update go modules 2019-02-23 16:29:15 +00:00
Asim Aslam
e29ca94a93 Update go modules 2019-02-13 14:41:01 +00:00
Asim Aslam
d2fdbcc742 Update go modules 2019-02-13 13:32:55 +00:00
Asim Aslam
82bcb8748e update go modules 2019-02-07 12:42:45 +00:00
Asim Aslam
107b571019 Add go mod 2019-01-30 11:43:40 +00:00