Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
5c0340b
create event_bus to receive messages through a channel thanks to subs…
SKnight-s Feb 23, 2023
bd8e3e7
create concurent_data to wait for the next change with a thread safe …
SKnight-s Feb 23, 2023
778972b
change the config protocol and add pki functionnality
SKnight-s Feb 23, 2023
91cefec
create routing feature : message, handler and functions in shoset
SKnight-s Feb 23, 2023
369bbb9
create forward handler and message : messages can be forwarded to ano…
SKnight-s Feb 23, 2023
c9cc670
create simpleMessage message and handler : it enables to send a simpl…
SKnight-s Feb 23, 2023
ab18e6a
add more constructed tests and enable multiprocess to test
SKnight-s Feb 23, 2023
e318c68
first deep documentation of the project
SKnight-s Feb 23, 2023
88f837c
create file structure and adding useful functions
SKnight-s Mar 22, 2023
d1500b7
create syncfile structure with operations trace and message type
SKnight-s Mar 22, 2023
638daf5
create Library structure and adding it to message
SKnight-s Mar 22, 2023
ed2059e
create fileSeeder structure to send the file
SKnight-s Mar 22, 2023
5bc0046
create connInfo to store the information of a connection during a dow…
SKnight-s Mar 22, 2023
552d43c
create the fileLeecher instance to download a file
SKnight-s Mar 22, 2023
d73e2a8
create the fileTransfer instance and connect it to the other instance…
SKnight-s Mar 22, 2023
779f36b
create handler for file transfer and synchronisation
SKnight-s Mar 22, 2023
a97f167
Set the Librarary inside the shoset
SKnight-s Mar 22, 2023
0324226
Adding external commands : the user or programm use this to add, dele…
SKnight-s Mar 22, 2023
f1c213b
adding tests for file synchronisation
SKnight-s Mar 22, 2023
a65c836
adding tool to limit the bandwidth to have better tests
SKnight-s Mar 22, 2023
1f78cb1
adding documentation for file synchronisation
SKnight-s Mar 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,19 @@
!**/*.pem
!**/*.dot
!**/*.svg
!**/*.sh
!**/*.yaml
!**/
!./test/*
!**/.vscode/*
!**/doc/*.md
!**/doc/img/*.png

!/.gitignore
!/go.mod
!/go.sum
!/LICENSE
!/README.md
!/Dockerfile

vendor
26 changes: 26 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
// Utilisez IntelliSense pour en savoir plus sur les attributs possibles.
// Pointez pour afficher la description des attributs existants.
// Pour plus d'informations, visitez : https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Process",
"type": "go",
"request": "attach",
"mode": "local",
"processId": "${command:pickGoProcess}"
},
{
"name": "Launch Package",
"type": "go",
"preLaunchTask": "DeleteFolder",
"request": "launch",
"mode": "auto",
"program": "./test",
"args": [
"4",
]
}
]
}
84 changes: 84 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "MultiProcesses_prep",
"type": "shell",
"command": "./test/multiProcesses_prep.sh",
"problemMatcher": []
},
{
"label": "DeleteFolder",
"type": "shell",
"command": "rm -rf ~/.shoset",
"problemMatcher": []
},
{
"label": "RunMultiProcesses",
"runOptions": {},
"dependsOrder": "sequence",
"dependsOn": [
"MultiProcesses_prep",
"RunMultiProcesses_run"
],
"problemMatcher": []
},
{
"label": "RunMultiProcesses_run",
"runOptions": {},
"dependsOrder": "parallel",
"dependsOn": [
"RunMultiProcesses_E",
"RunMultiProcesses_D",
"RunMultiProcesses_C",
"RunMultiProcesses_B",
"RunMultiProcesses_A"
],
"problemMatcher": [
"$go"
]
},
{
"label": "RunMultiProcesses_A",
"type": "shell",
"command": "./test/multiProcesses_A.sh",
"presentation": {
"group": "test"
}
},
{
"label": "RunMultiProcesses_B",
"type": "shell",
"command": "./test/multiProcesses_B.sh",
"presentation": {
"group": "test"
}
},
{
"label": "RunMultiProcesses_C",
"type": "shell",
"command": "./test/multiProcesses_C.sh",
"presentation": {
"group": "test"
}
},
{
"label": "RunMultiProcesses_D",
"type": "shell",
"command": "./test/multiProcesses_D.sh",
"presentation": {
"group": "test"
}
},
{
"label": "RunMultiProcesses_E",
"type": "shell",
"command": "./test/multiProcesses_E.sh",
"presentation": {
"group": "test"
}
}
]
}
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM ubuntu:latest as setup-build-stage-git
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y git
# temporary until merge to master
RUN git clone -b new_pki https://github.com/ditrit/shoset.git

FROM golang:1.18-bullseye as setup-build-stage-shoset
WORKDIR /app
COPY --from=setup-build-stage-git . /app
WORKDIR /app/shoset
RUN go get
WORKDIR /app/shoset/test
RUN go build -o shoset

FROM ubuntu:21.04 as setup-stage-production
COPY --from=setup-build-stage-shoset /app/shoset/test/shoset usr/bin/
RUN apt-get update

FROM setup-stage-production as stage-production
WORKDIR /usr/bin
CMD [ "./shoset", "4" ]
42 changes: 33 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,42 @@
# shoset
# Shoset


## Description

Shoset is a smart Socket library, **resilient**, **distributed** and with **high availability**.

**Resilient :** automatic reconnection and no startup order (As long as every shoset is certified.) .

**Distributed :** with the brother system, any **shoset** can fail with no disruption to the network if it is not alone in its logical name.

**High availability :** Built in redundancy.

Send and receive data in the form of messages between **shosets**.

A smart multi-ends socket library.

## Documentation

Missing. -- Find a usage example [in the gandalf project](https://github.com/ditrit/gandalf-core/blob/master/aggregator/aggregator.go).
See full documentation [guide.md](doc/guide.md). </br>

## Design principles
## Install and Run

For now, over to the [team's taiga](https://taiga.orness.com/project/xavier-namt/wiki/shoset)
This project is written in **Golang**. </br>
You need to install **Golang** to run this project. </br>
See [Golang installation](https://golang.org/doc/install) for more information. </br>

## Running tests
### Install

```txt
git clone https://github.com/ditrit/shoset
go run test/test.go
```bash
go get github.com/ditrit/shoset
```

### Run

For now, few tests are available. </br>
You can see them in the [guide.md](doc/guide.md) file. </br>


## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

14 changes: 0 additions & 14 deletions certs/cert.pem

This file was deleted.

9 changes: 0 additions & 9 deletions certs/key.pem

This file was deleted.

62 changes: 0 additions & 62 deletions commandFuncs.go

This file was deleted.

Loading