Commit Graph

225 Commits

Author SHA1 Message Date
Till Knuesting
5ae3e179b9 preallocated slices (#934) 2019-11-11 00:03:51 +00:00
Asim Aslam
254045e9f3
Remove go routines for mdns watcher and cache registry (#919) 2019-11-06 15:49:40 +00:00
Till Knuesting
f67c5e779f preallocated slices (#917) 2019-11-05 17:43:12 +00:00
Till Knuesting
24b8d2a315 preallocating slices (#904)
* preallocated some slices when size is known

* gofmt

* gofmt
2019-11-04 10:33:53 +00:00
tegk
f88518d994 used gofmt with -s flag on whole project 2019-11-01 15:07:53 +00:00
yandd
f9c639af4e
fix rcache ttl 2019-10-30 14:01:51 +08:00
Asim Aslam
d4832e8f34
Remove consul registry (#818) 2019-10-23 15:53:28 +01:00
Asim Aslam
44b794722e rcache becomes cache 2019-10-14 22:39:26 +01:00
Asim Aslam
f7f65b82e6 Cleanup registry handler/service 2019-10-13 12:23:13 +01:00
Milos Gajdos
fc89c9831e
heck cache status error 2019-10-11 10:47:42 +01:00
Asim Aslam
59a3e7d4f4 Use etcd serializable option 2019-10-10 19:16:31 +01:00
Asim Aslam
e9dcff49e0 Support listing full service info in etcd 2019-10-07 16:11:52 +01:00
Asim Aslam
2c00e726b6 Decode and hash the existing node 2019-10-06 13:43:41 +01:00
Asim Aslam
2fb2d7145e Fix etcd registry lease processing and suppression 2019-10-06 09:54:26 +01:00
Asim Aslam
6fe9f2a958
Merge pull request #815 from micro/broker
Add broker service implementation
2019-10-04 17:23:29 +01:00
Asim Aslam
cfb846ee7e Fix race in cache 2019-10-04 16:40:21 +01:00
Asim Aslam
c4b6d0f3a8 fix major deadlock in registry cache 2019-10-04 16:29:56 +01:00
Milos Gajdos
b8815dff14 Append a port to address if it does not exist 2019-10-03 16:16:25 +01:00
Asim Aslam
8d2b12258f Remove gossip registry 2019-10-03 09:29:48 +01:00
Asim Aslam
31026da2a1
Update etcd.go
Use /micro/registry as the etcd key prefix
2019-10-02 20:33:59 +01:00
Milos Gajdos
25148af44c First commit to add etcd registry support 2019-10-02 18:56:53 +01:00
Asim Aslam
5d77ce9e9b Rename rcache file to cache 2019-10-02 12:35:20 +01:00
b722798caa some spelling fixes in memory and gossip registry
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-10-02 03:54:04 +03:00
Milos Gajdos
4b73ac9dc5 Simplified code. Small bug fix the used to lead to multi-registry loop. 2019-09-30 12:48:59 +01:00
Milos Gajdos
3f3f1272b3 Turn regular logs to Debug logs; annotate with Registry "tag" 2019-09-30 12:48:59 +01:00
Milos Gajdos
859ecb1872 Dont set default TTL. Stop tracking nodes with no TTL 2019-09-30 12:48:59 +01:00
Milos Gajdos
204c7d1fcf Fixed options bug and proto indenting 2019-09-30 12:48:59 +01:00
Milos Gajdos
8417361bce Set registry TTL to seconds, not the nanoseconds 2019-09-30 12:48:59 +01:00
Milos Gajdos
d85ca7abd2 Set registry TTL properly via protobuf Options 2019-09-30 12:48:59 +01:00
Milos Gajdos
e973bfaa25 Add TTL options to memory registry. 2019-09-30 12:48:59 +01:00
Milos Gajdos
27bd9581bf Refresh TTL; prune expired nodes. 2019-09-30 12:48:59 +01:00
Milos Gajdos
16c7b3a390 Added Registry TTL to memory registry. Tracking node lifetimes. 2019-09-30 12:48:59 +01:00
lubaoquan
866631df1d fixes https://github.com/micro/go-micro/issues/793 2019-09-30 10:36:43 +08: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
ef7bb46884 Don't shutdown old nodes in mdns registry 2019-09-26 16:46:09 +01:00
Asim Aslam
2b8210a106 Preserve cache in the face of failure 2019-09-25 19:44:46 +01:00
Asim Aslam
7fe64192a7 Add flag for registry service client 2019-09-25 11:09:19 +01:00
Milos Gajdos
1f23c8a85a
Emit memory registry event only when it actually happens 2019-09-25 01:58:28 +01:00
Milos Gajdos
39755721d0
Fix proto formatting 2019-09-24 14:39:51 +01:00
Milos Gajdos
ccda1d3559
Remove rpc Sync method from registry handler 2019-09-24 10:41:48 +01:00
Milos Gajdos
61ee436cc4
Added Sync RPC call; it's identical to ListServices for now 2019-09-23 21:08:31 +01:00
Milos Gajdos
04a5d884da
Move global vars to the top of the src file: conventions 2019-09-23 20:48:25 +01:00
Milos Gajdos
0ec1b840fd
Add registry event to registry package 2019-09-23 20:48:25 +01:00
Asim Aslam
04b31d374c
Merge pull request #745 from micro/registry-service
Add service registry
2019-09-09 13:05:46 -07:00
Asim Aslam
2c16c7e62f Fix build breaks 2019-09-09 09:25:47 -07:00
Asim Aslam
1f44d7a4a1 Add registry handler 2019-09-09 09:20:17 -07:00
Asim Aslam
b076ef906a Add service registry 2019-09-09 08:57:57 -07:00
Asim Aslam
c669a2b155 Use .micro domain for mdns 2019-09-09 05:11:25 -07:00
Shu Xian
bf0e46dc0d fix registry addr error for mq-rpc 2019-08-14 21:32:28 +08:00
johnson
de34f259ba update service not found error tooltip
fixing test failed issue

change back error type
change registry.ErrNotFound back to selector.ErrNotFound

change back error type
change registry.ErrNotFound back to selector.ErrNotFound

remove the single node tunnel test

Fix read yaml config from memory

package main

import (
	"fmt"

	"github.com/micro/go-micro/config"
	"github.com/micro/go-micro/config/source/memory"
)

var configData = []byte(`
---
a: 1234
`)

func main() {
	memorySource := memory.NewSource(
		memory.WithYAML(configData),
	)
	// Create new config
	conf := config.NewConfig()

	// Load file source
	conf.Load(memorySource)

	fmt.Println(string(conf.Bytes()))
}
2019-08-11 19:31:22 +08:00