This repository has been archived by the owner on Mar 24, 2024. It is now read-only.
generated from yandex-praktikum/go-musthave-devops-tpl
-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Use closures instead of passing channels. - Remove extra closure around shutdown logic. Signed-off-by: Alexander Kurbatov <sir.alkurbatov@yandex.ru>
Assume that if we can't decrypt request, something is wrong with the client data. Signed-off-by: Alexander Kurbatov <sir.alkurbatov@yandex.ru>
Signed-off-by: Alexander Kurbatov <sir.alkurbatov@yandex.ru>
Now it is possible to reject agents requests from not trusted networks. Signed-off-by: Alexander Kurbatov <sir.alkurbatov@yandex.ru>
Signed-off-by: Alexander Kurbatov <sir.alkurbatov@yandex.ru>
Since we know how much was read, we can trim not written bytes. Signed-off-by: Alexander Kurbatov <sir.alkurbatov@yandex.ru>
Currently, only Ping method supported. Signed-off-by: Alexander Kurbatov <sir.alkurbatov@yandex.ru>
Signed-off-by: Alexander Kurbatov <sir.alkurbatov@yandex.ru>
Signed-off-by: Alexander Kurbatov <sir.alkurbatov@yandex.ru>
Signed-off-by: Alexander Kurbatov <sir.alkurbatov@yandex.ru>
Also, disable wrapcheck as it doesn't help much. Signed-off-by: Alexander Kurbatov <sir.alkurbatov@yandex.ru>
Signed-off-by: Alexander Kurbatov <sir.alkurbatov@yandex.ru>
Also, refactor unit-tests. Signed-off-by: Alexander Kurbatov <sir.alkurbatov@yandex.ru>
Previously we had to provide MetricReq structure of HTTP API. Now it is possible to use either storage.Record, or plain data for convenience. Also, refactor and simplify signer's tests and logic. Signed-off-by: Alexander Kurbatov <sir.alkurbatov@yandex.ru>
Signed-off-by: Alexander Kurbatov <sir.alkurbatov@yandex.ru>
In order to simplify the CI routine avoid installation of many extra tools for code generation. Signed-off-by: Alexander Kurbatov <sir.alkurbatov@yandex.ru>
Signed-off-by: Alexander Kurbatov <sir.alkurbatov@yandex.ru>
This situation most likely means that something is wrong with request, not server. Signed-off-by: Alexander Kurbatov <sir.alkurbatov@yandex.ru>
172f649
to
60d8658
Compare
Signed-off-by: Alexander Kurbatov <sir.alkurbatov@yandex.ru>
Also, disable musttag as we don't follow it's rules. Signed-off-by: Alexander Kurbatov <sir.alkurbatov@yandex.ru>
c87bac8
to
ecbb548
Compare
Signed-off-by: Alexander Kurbatov <sir.alkurbatov@yandex.ru>
Signed-off-by: Alexander Kurbatov <sir.alkurbatov@yandex.ru>
The autotests have changed and now require the server to return updated metrics in each response to batch update request. This commit implements proper logic in both gRPC and HTTP APIs. Signed-off-by: Alexander Kurbatov <sir.alkurbatov@yandex.ru>
Signed-off-by: Alexander Kurbatov <sir.alkurbatov@yandex.ru>
kilchik
approved these changes
Apr 22, 2023
} | ||
|
||
service Metrics { | ||
rpc Update(MetricReq) returns (MetricReq); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Лучше делать типы запросов и ответов разными: UpdateRequest, UpdateResponse, GetResponse.
Так если придется обновить один из типов, изменения удастся внести только в один тип, не затрагивая остальные
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Согласен, спасибо.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Детали реализации инкремента 24
API
:HTTP
иGRPC
. Адрес и портgRPC API
назначается по аналогии с адресомHTTP API
(поддержаны все доступные способы).HTTP
, либо поgRPC
(желаемый способ задается через опциюTRANSPORT
, поддержаны все доступные способы).gRPC API
добавлен проект дляKreya
.Ограничения
gRPC API
RSA
шифрования (непонятно как это делать на уровнеgRPC
, поддержка сертификатов не требовалась по условиям задания).Покрытие сейчас 81%