Commit Graph

2193 Commits

Author SHA1 Message Date
Milos Gajdos
8ad2f73ad6
Advertisement is now Update; started bit is now running. 2019-07-01 15:46:25 +01:00
Milos Gajdos
9d7420658d
Changed router interface. Added table watcher. Advertise routes
* Changed router interface to return Advertisement channel
* Added default gateway route to the routing table if supplied
* Watch table for updates and advertise to the network
* We hash the routes on 3-tuple (Destination, Gateway, Network)
2019-07-01 15:46:25 +01:00
Asim Aslam
0971deb9cc
Merge pull request #558 from micro/network
Networking code
2019-07-01 12:12:23 +01:00
Asim Aslam
0899282277 Checkpoint networking code 2019-07-01 11:55:15 +01:00
Asim Aslam
d8e998ad85 add peer in context 2019-06-27 14:53:01 +01:00
Asim Aslam
b4b76d452a Call advertise 2019-06-27 14:38:12 +01:00
Asim Aslam
67e3d560fe Lookup every service. FML 2019-06-27 14:37:52 +01:00
Asim Aslam
9630e153a5 fix grpc proto wrapper 2019-06-27 13:08:06 +01:00
Asim Aslam
43297f731c Add default router 2019-06-27 12:57:23 +01:00
Asim Aslam
f6f6e1b561 Use the router to get routes 2019-06-27 12:56:52 +01:00
Asim Aslam
4bee5c1b2b
Merge pull request #546 from lpxxn/master
pass parameter to anonymous function
2019-06-27 07:02:45 +01:00
lpxxn
3b0ef425b6 pass parameter to anonymous function 2019-06-27 13:06:53 +08:00
李鹏
5334203435
Merge pull request #4 from micro/master
pull
2019-06-27 13:01:14 +08:00
Asim Aslam
0da8256426 Accept a range of addresses 2019-06-26 20:51:13 +01:00
Asim Aslam
940ea94a96 Lookup router via registry 2019-06-26 19:56:40 +01:00
Asim Aslam
b904f383c1 go fmt 2019-06-26 19:28:30 +01:00
Asim Aslam
cedcef032d Add remote lookup via router selector 2019-06-26 19:27:38 +01:00
Milos Gajdos
76011b151d
Bugfix: Set gateway to node.Address
gw has not been initialized; it was basically an empty string and only
got populated by Sprintf-ing the addr:port IF the port has been set.
This commit sets the gw to node.Address to it's never an empty string.
2019-06-26 16:28:33 +01:00
Asim Aslam
27b145f968 add router proto 2019-06-26 16:23:10 +01:00
Asim Aslam
ac098e4d78 add router selector and network defaults 2019-06-26 16:12:57 +01:00
Asim Aslam
1a62c11166
Merge pull request #544 from milosgajdos83/router-rework
Router rework
2019-06-26 16:08:12 +01:00
Milos Gajdos
fe84a2d726
Route per service node. No Network Registry for now. 2019-06-26 16:03:19 +01:00
李鹏
c282125f09
Merge pull request #3 from micro/master
update
2019-06-26 11:56:00 +08:00
Asim Aslam
4cad7697cc
Merge pull request #542 from magodo/config_consul_source_opt
Add consul-specific option for config (as registry)
2019-06-25 16:14:03 +01:00
magodo
a8dbca756c rename stuff per feedback 2019-06-25 22:41:31 +08:00
magodo
8e4fd16aff Add consul-specific option for config (as registry) 2019-06-25 18:31:32 +08:00
Asim Aslam
68764ebafc Add registry resolver 2019-06-24 15:30:17 +01:00
Asim Aslam
4d08618517 fix typo 2019-06-24 15:22:12 +01:00
Asim Aslam
e5959f80d6 add http resolver 2019-06-24 15:21:24 +01:00
Asim Aslam
b89423bf37 add resolver 2019-06-24 15:11:11 +01:00
Asim Aslam
9a56c4e0b2 Merge branch 'master' of ssh://github.com/micro/go-micro 2019-06-24 14:49:26 +01:00
Asim Aslam
4f982bb9cd Default to json content-type in api 2019-06-24 14:49:19 +01:00
Asim Aslam
1277f2478d
Merge pull request #541 from milosgajdos83/gossip-del-service-revert
Reverts c0a628d
2019-06-22 20:05:10 +01:00
Asim Aslam
dffbe045e4 move node functions 2019-06-22 19:02:57 +01:00
Milos Gajdos
c3d2043caf
Reverts c0a628d65b
Fixes #540
2019-06-22 19:01:03 +01:00
Asim Aslam
79cc8e34b0 Merge branch 'master' of ssh://github.com/micro/go-micro 2019-06-22 16:51:28 +01:00
Asim Aslam
2d91ba411e update the network interface 2019-06-22 16:51:20 +01:00
Asim Aslam
5ee7140aa3
Merge pull request #536 from magodo/config_source_consul_support_array
Config source consul support 1st array
2019-06-22 08:39:17 +01:00
magodo
6ef838c9aa Merge branch 'master' of https://github.com/micro/go-micro into config_source_consul_support_array 2019-06-22 07:14:15 +08:00
Asim Aslam
1b4005e9a5 Go fmt everything 2019-06-21 17:20:41 +01:00
Asim Aslam
3f97743e34 Move router and proxy into network package 2019-06-21 17:20:31 +01:00
Asim Aslam
7936d74602 Update comments 2019-06-21 16:17:12 +01:00
Asim Aslam
6db720b197 Merge branch 'master' of ssh://github.com/micro/go-micro 2019-06-21 15:14:08 +01:00
Asim Aslam
ca5acba0c6 Move selector to client/selector 2019-06-21 15:13:54 +01:00
Asim Aslam
b4acb9bb58
Merge pull request #538 from magodo/consul_path_prefix_leading_slash
config consul source supports slash as prefix
2019-06-21 14:23:53 +01:00
Asim Aslam
c350e19552 Move cmd => config/cmd 2019-06-21 13:36:11 +01:00
Asim Aslam
4aa0192eba Update go mod 2019-06-21 12:55:31 +01:00
magodo
3c82b2e9e8 Merge branch 'consul_path_prefix_leading_slash' into dev 2019-06-21 16:53:21 +08:00
magodo
9514bd7b2a Merge branch 'config_source_consul_support_array' into dev 2019-06-21 16:52:01 +08:00
magodo
7acd249147 config consul source supports slash as prefix
`config.NewConfig()` with consul source will both read from consul
and watch consul for changes. Hence, the `prefix` is used in these
2 cases:

- read case: it is used to strip path based on the `KVPair` returned
from consul `kv.List()` method
- watch case: it is used as the `key` of watch query (`keyprefix` type)

So for *watch case*, the `key` is leagal to be `/` for watching change
on root. While for *read case*, because `KVPair.Key` is always stripped
off the leading slash, so if user specified some `prefix` with leading
slash, we should strip it also.

An extream case would be: user want's to read & watch node in root dir.
One would specify `prefix` as `/`, and it should work then.
2019-06-21 16:35:48 +08:00