From cfa22be3c6e274c2910ec54a4946c338fccd79ff Mon Sep 17 00:00:00 2001
From: Xavier Perret <xa.perret@outlook.com>
Date: Fri, 28 Oct 2022 11:55:21 +0200
Subject: [PATCH] added datastructures for cleaner code

---
 app/types/datastructures.go | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/app/types/datastructures.go b/app/types/datastructures.go
index 0348421..7837771 100644
--- a/app/types/datastructures.go
+++ b/app/types/datastructures.go
@@ -39,3 +39,17 @@ type Blob struct {
 	ContainerClient azblob.ContainerClient
 	BlockBlobClient azblob.BlockBlobClient
 }
+
+// Config - is the configuration of a node, it's id, address, port and neighbours
+type Config struct {
+	ID         int         `yaml:"id"`
+	Address    string      `yaml:"address"`
+	Port       int         `yaml:"port"`
+	Neighbours []Neighbors `yaml:"neighbors"`
+}
+
+type Neighbors struct {
+	ID      int    `yaml:"id"`
+	Address string `yaml:"address"`
+	Port    int    `yaml:"port"`
+}
-- 
GitLab