Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat implement etcd client #27

Merged
merged 1 commit into from
Aug 27, 2022

Conversation

GridexX
Copy link
Contributor

@GridexX GridexX commented Aug 19, 2022

Overall explanation of your work :

We implemented 6 methods for the ETCD_client :

  • PUT : insert a couple key/value
  • GET : find a value for one key*
  • PATCH : update a previously stored value associated with a key
  • DELETE : remove a couple key/value stored
  • GET_ALL : return all stored values
  • GET_ALL_WITH_PAGINATION : return all value delimited within a range with PaginateRequest object and return them througt a PaginateResult :
    pub struct PaginateRequest {
      limit: usize,
      page: usize
    }
    pub struct PaginateResult {
      pub count: usize,
      pub values: Vec<String>
    }

Structure

Service

Workload service contain all functions to interact with ETCD

Controller

Handle request , call service and return HTTP responses

ETCD

Store ETCD key, value like this : "uuid" => Workload (JSON)

Used libraries

etcd_client : an API for interfacing with etcd. It provides asynchronous client backed by tokio and tonic.

@GridexX GridexX changed the title Feat implement etcd client Draft: feat implement etcd client Aug 19, 2022
@GridexX GridexX force-pushed the feat-implement-etcd-client branch from e5d9179 to 3917f9f Compare August 20, 2022 13:46
@GridexX GridexX changed the title Draft: feat implement etcd client feat implement etcd client Aug 20, 2022
@GridexX GridexX force-pushed the feat-implement-etcd-client branch 7 times, most recently from 8381291 to b92d9c1 Compare August 23, 2022 08:49
controller/lib/Cargo.toml Outdated Show resolved Hide resolved
controller/lib/src/etcd_client/interface.rs Outdated Show resolved Hide resolved
@GridexX GridexX force-pushed the feat-implement-etcd-client branch 3 times, most recently from 2844246 to bdc644d Compare August 23, 2022 11:08
@GridexX GridexX force-pushed the feat-implement-etcd-client branch from bdc644d to 518af95 Compare August 24, 2022 08:16
@GridexX
Copy link
Contributor Author

GridexX commented Aug 24, 2022

The tests won't succed as an instance of ETCD should be launched on the computer. Shall I remove them ?

@sameo
Copy link
Contributor

sameo commented Aug 24, 2022

The tests won't succed as an instance of ETCD should be launched on the computer. Shall I remove them ?

Disable them for now, and open an issue to track that regression. Don't remove them please.

@GridexX GridexX force-pushed the feat-implement-etcd-client branch 2 times, most recently from 254946c to 041c154 Compare August 24, 2022 08:59
@GridexX
Copy link
Contributor Author

GridexX commented Aug 24, 2022

The tests won't succed as an instance of ETCD should be launched on the computer. Shall I remove them ?

Disable them for now, and open an issue to track that regression. Don't remove them please.

Tests disabled for now and issue created : #42

Another problem is that the new version of etcd_client need the package protobuf-compiler for building. I have created another issue about that and reverse to the 0.9.2 version

@GridexX GridexX force-pushed the feat-implement-etcd-client branch 3 times, most recently from 9bd64c8 to aff0ee7 Compare August 24, 2022 12:22
@GridexX
Copy link
Contributor Author

GridexX commented Aug 24, 2022

@sameo PR is finnaly ready to be Merged 😄

controller/lib/src/etcd/mod.rs Outdated Show resolved Hide resolved
controller/lib/src/etcd/mod.rs Outdated Show resolved Hide resolved
controller/lib/src/etcd/mod.rs Outdated Show resolved Hide resolved
controller/lib/src/etcd/mod.rs Outdated Show resolved Hide resolved
controller/lib/src/etcd/mod.rs Outdated Show resolved Hide resolved
@GridexX GridexX force-pushed the feat-implement-etcd-client branch from aff0ee7 to ce7351a Compare August 24, 2022 13:46
@GridexX
Copy link
Contributor Author

GridexX commented Aug 24, 2022

@sameo Have removed all unwrap() function and modify the get method to return an option

@Roxxas96 Roxxas96 force-pushed the feat-implement-etcd-client branch from ce7351a to 8f2262b Compare August 25, 2022 13:07
@GridexX GridexX force-pushed the feat-implement-etcd-client branch from 8f2262b to 836722a Compare August 26, 2022 11:59
Create a new internal_etcd interface witch contains all methods
related to the ETCD client.

Signed-off-by: GridexX <[email protected]>
@GridexX GridexX force-pushed the feat-implement-etcd-client branch from 836722a to 32b27b9 Compare August 26, 2022 14:00
@sameo sameo merged commit 3cdbdee into dev-sys-do:main Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants