Commit Graph

85 Commits

Author SHA1 Message Date
818a0e6356 codec: add context helper funcs
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-09-22 01:07:27 +03:00
56e02ec463 codec: add ability to pass codec options
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-09-22 00:57:10 +03:00
34f0b209cc codec: add ability to control codec via struct tags
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-05-25 22:20:39 +03:00
86626c5922 fieldalignment of all structs to save memory
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-04-27 08:32:47 +03:00
610427445f codec: provide proto for codec.Frame
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-03-11 07:42:42 +03:00
bbbcb22565 fieldalignment of all structs to save memory
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-03-06 19:45:13 +03:00
cf2aa827e4 update to go 1.16
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-02-18 12:44:18 +03:00
e5bf1448f4 lint fixes
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-02-14 11:28:50 +03:00
82248eb3b0
many lint fixes and optimizations (#17)
* util/kubernetes: drop stale files
* debug/log/kubernetes: drop stale files
* util/scope: remove stale files
* util/mdns: drop stale files
* lint fixes

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-02-13 15:35:56 +03:00
2cb6843773 codec: fix noop codec
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-01-29 23:18:12 +03:00
bcd7f6a551 codec: fix noop codec to handle *broker.Message
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-01-29 16:07:21 +03:00
c7bafecce3 add meter and tracer across all options
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-01-22 23:32:33 +03:00
e6f870bda7 codec: fix interface
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-12-20 23:53:29 +03:00
5c6eba20e7 codec: fix noop codec
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-12-11 00:32:29 +03:00
0a68a9c278 use default codec for store
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-12-11 00:21:53 +03:00
b7b28f6b9a lint
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-12-08 00:38:37 +03:00
0d93b2c31c add some defaults
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-11-26 01:13:05 +03:00
3f6852030f expose codec options
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-11-25 10:43:13 +03:00
458388359a add string support to noop codec
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-11-25 10:04:11 +03:00
2101e994d9 add Frame support in noop codec
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-11-25 09:59:28 +03:00
71d82e9d5b add codec NewMessage helper
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-11-24 15:14:47 +03:00
c9049c3845 major codec upgrade
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-11-23 16:21:07 +03:00
daffa9e548
use metadata.Metadata (#8)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-11-18 16:50:41 +03:00
8a2b122015
many fixes for lint and context.Context usage (#5)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-11-03 02:02:32 +03:00
14c97d59c1 many improvements with options and noop stuff
* add many options helpers
* fix noop client to allow publish messages to topic in broker
* fix noop server to allow registering in registry
* fix noop server to allow subscribe to topic in broker
* fix new service initialization

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-10-16 09:38:57 +03:00
5bfca99627 fix old proto
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-09-10 15:17:23 +03:00
6aa857dfa1 fixup deps
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-08-28 11:27:45 +03:00
0f19355621 resurrect service stuff
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-08-28 10:58:08 +03:00
67ab44593b
fix repocard issues (#21)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-08-25 15:41:48 +03:00
c4a303190a
lint fixes (#14)
* lint fixes

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-08-21 14:53:21 +03:00
199ff66bd4
enable cache for build, closes #8 (#12)
* enable cache for build, closes #8
* goimports
* lint fixes

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-08-20 15:23:41 +03:00
06136312bb
regen files with never protoc (#6)
* regen files with never protoc
* rewrite import path

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-08-19 17:47:17 +03:00
Maarten Bezemer
74907987d1
codec - Allow to Write() nil body (#1905)
* codec - Allow to Write() nil body

* Oops we are in v3 now
2020-08-06 18:51:00 +01:00
Asim Aslam
563768b58a
v3 refactor (#1868)
* Move to v3

Co-authored-by: Ben Toogood <bentoogood@gmail.com>
2020-07-27 13:22:00 +01:00
Asim Aslam
c787fd0483 fix missing pointer 2020-04-14 17:13:38 +01:00
Asim Aslam
1134ea5ff3 make proto.Message compatible with raw json 2020-04-14 16:59:24 +01:00
Asim Aslam
9d0381306d add a proto message without serialisation 2020-04-14 15:54:25 +01:00
1fbc056dd4
minimize allocations (#1472)
* server: minimize allocations on re-register

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

* server: stop old instance before Init()

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

* client/grpc: fix allocations in protobuf marshal

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

* codec/json: fix allocations in protobuf marshal

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

* remove stop from init

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

* codec/grpc: expose MaxMessageSize

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

* codec: use buffer pool

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

* metadata: minimize reallocations

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

* util/wrapper: use metadata helper

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

* registry/cache: move logs to debug level

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

* server: move logs to debug level

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

* server: cache service only when Advertise is ip addr

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

* server: use metadata.Copy

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-04-08 10:50:19 +01: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
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
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
6358b9277d don't write anything if theres no data 2019-12-31 22:58:14 +00:00
Milos Gajdos
5865e89bed
Fixing dead code and go vet moaning 2019-12-05 16:10:49 +00:00
Astone
29fb58db39 improve code quality 2019-12-03 20:59:02 +08:00
Asim Aslam
36623bfe50 Improve stream processing 2019-08-25 19:30:22 +01:00
Asim Aslam
6128d18ee0 checkpoint fixing data race to process h2 and grpc requests 2019-08-24 20:12:04 +01:00
Asim Aslam
4b4ad68eb9 Change Publication to Event 2019-07-07 12:44:09 +01:00
Asim Aslam
46de3ae9a9 Fix text codec 2019-06-10 12:42:43 +01:00
magodo
748c20c979 use package level func for unmarshal 2019-06-09 11:55:36 +08:00
magodo
3573ac818f unmarshal json with jsonpb if accepter is pb 2019-06-09 11:50:50 +08:00