1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-06-12 22:07:47 +02:00

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>
This commit is contained in:
Erik Hollensbe
2019-11-16 02:55:11 -08:00
committed by Asim Aslam
parent 97c1300f53
commit 4107733453
12 changed files with 476 additions and 496 deletions

View File

@ -13,8 +13,7 @@ func TestFunction(t *testing.T) {
var wg sync.WaitGroup
wg.Add(1)
r := memory.NewRegistry()
r.(*memory.Registry).Services = testData
r := memory.NewRegistry(memory.Services(testData))
// create service
fn := NewFunction(