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

142 Commits

Author SHA1 Message Date
610c00859f v5 2024-06-04 21:40:43 +01:00
b1e58a1fe8 fix typo (#2701) 2024-03-26 03:39:45 +00:00
f1a8b39309 Fix double close in stream client (#2693)
* [fix] etcd config source prefix issue (#2389)

* http transport data race issue (#2436)

* [fix] #2431 http transport data race issue

* [feature] Ability to close connection while receiving.
Ability to send messages while receiving.
Icreased r channel limit to 100 to more fluently communication.
Do not dropp sent request if r channel is full.

* [fix] Do not close the transport client twice in stream connection , the transport client is closed in the rpc codec

---------

Co-authored-by: Johnson C <chengqiaosheng@gmail.com>
Co-authored-by: Hunyadvári Péter <peter.hunyadvari@vcc.live>
2024-02-15 20:26:36 +00:00
a7522e7d6c fix: struct field alignment (#2632) 2023-04-26 02:16:34 +02:00
a3980c2308 feat: add test framework & refactor RPC server (#2579)
Co-authored-by: Rene Jochum <rene@jochum.dev>
2022-10-20 13:00:50 +02:00
85c0b0b8eb fix: some linting issues (#2563) 2022-09-30 16:27:07 +02:00
d2a51d05c4 [feature] stream CloseSend (#2323)
* support stream CloseSend

* move CloseSend into Closer
2021-10-26 15:07:08 +01:00
1cd7cfaa6c go-micro.dev/v4 (#2305) 2021-10-12 12:55:53 +01:00
b11a2f17e9 make rpcClient compatible with 32bit arm systems (#2156)
On ARM, 386, and 32-bit MIPS, it is the caller's responsibility to
arrange for 64-bit alignment of 64-bit words accessed
atomically. Only the first word in an allocated struct can
be relied upon to be 64-bit aligned.
2021-04-25 06:54:00 +01:00
26b859c4f9 improve code quality (#2128)
* Fix inefficient string comparison

* Fix unnecessary calls to Printf

* Canonicalize header key

* Replace `t.Sub(time.Now())` with `time.Until`

* Remove unnecessary blank (_) identifier

* Remove unnecessary use of slice

* Remove unnecessary comparison with bool
2021-02-25 08:30:35 +00:00
d94936f6c9 v3 (#2104)
* v3

* revert plugins

* fixup some issues
2021-01-20 13:54:31 +00:00
df687fe5d4 move selector 2020-12-12 20:14:50 +00:00
9216a47724 fix client race (#1647) 2020-05-19 14:44:46 +01:00
9bb1904a38 broker: add publish context (#1590)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-04-28 19:29:00 +03:00
d7ecb58f6c Add network proxying (#1556)
* Add network proxying

* go fmt
2020-04-21 15:54:40 +01:00
68b0238a5d add stream timeout option which defaults to 0 (#1456)
* add stream timeout option which defaults to 0

* fix option
2020-03-31 23:22:11 +01:00
58598d0fe0 fixes for safe conversation and avoid panics (#1213)
* fixes for safe convertation

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

* fix client publish panic

If broker connect returns error we dont check it status and use
it later to publish message, mostly this is unexpected because
broker connection failed and we cant use it.
Also proposed solution have benefit - we flag connection status
only when we have succeseful broker connection

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

* api/handler/broker: fix possible broker publish panic

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-02-18 23:05:38 +00:00
1e40c86dfe Ignore gRPC Proxy (#1205) 2020-02-17 08:14:45 +00:00
b3fc8be24e normalise proxy name (#1203) 2020-02-15 21:57:30 +00:00
99807a680c strip Micro-Topic header from incoming context in client.Call (#1177)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-02-07 22:09:52 +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
2b1844971c go fmt 2020-01-24 21:31:57 +00:00
fac75866d9 Move pool to util 2020-01-19 17:30:49 +00:00
c145f355dd Moving to gRPC by default (#1069)
* Step 1

* Fix the test panics
2019-12-29 21:07:55 +00:00
c445aed6b1 Cleanup and speedup network convergence along with direct messaging for connect and solicit 2019-12-07 19:54:29 +00:00
29fb58db39 improve code quality 2019-12-03 20:59:02 +08:00
00bbb3ac61 revert some protocol changes for now 2019-11-30 21:20:33 +00:00
080363e8c4 The mega cruft proxy PR (#974)
* the mega cruft proxy PR

* Rename broker id

* add protocol=grpc

* fix compilation breaks

* Add the tunnel broker to the network

* fix broker id

* continue to be backwards compatible in the protocol
2019-11-25 16:31:43 +00:00
afa1f50435 Revert to creating new connections for stream 2019-09-25 15:21:21 +01:00
52d9d75dfa use with stream for client connection 2019-08-31 18:26:48 +01:00
4495ca3839 Use client.Call for non streaming requests 2019-08-16 17:24:17 +01:00
0b0eee41d0 functioning proxy code 2019-08-16 16:46:29 +01:00
58bc4c103f go fmt 2019-08-15 20:54:09 +01:00
ef04331b86 multiplexing cruft 2019-08-15 20:08:49 +01:00
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
1db98ee0f0 move all the buffer references to util/buf 2019-07-28 19:33:24 +01:00
f2669e7b1e Move connection pool to own package 2019-07-28 18:56:18 +01:00
a3bddf5839 changes to minimize allocations and provide useful info
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-07-17 00:21:03 +03:00
64ec0633a3 Fix breaks and go fmt 2019-07-10 07:47:17 +01:00
0bf54c122f move transport back 2019-07-09 18:41:26 +01:00
e0bf1c2283 Remove Port from registry 2019-07-08 08:01:42 +01:00
4b4ad68eb9 Change Publication to Event 2019-07-07 12:44:09 +01:00
777a203f96 gofmt 2019-07-07 12:33:54 +01:00
d2d6841f02 Move transport to network/transport 2019-07-07 10:37:34 +01:00
0da8256426 Accept a range of addresses 2019-06-26 20:51:13 +01:00
1b4005e9a5 Go fmt everything 2019-06-21 17:20:41 +01:00
ca5acba0c6 Move selector to client/selector 2019-06-21 15:13:54 +01:00
ed4bce3285 check in this cruft 2019-06-08 19:40:44 +01:00
9e23855c37 Fixup the proxy, strip down go.mod. Win bigly 2019-06-07 13:42:39 +01:00
a86c26d485 fix bug need pass the variable as a parameter to the anonymous function 2019-05-31 14:24:37 +08:00