Envoie de l'annonce en multicast fonctionnelle
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
package repository
|
||||
|
||||
import (
|
||||
"_StorBackEnd/pkg/protocol"
|
||||
)
|
||||
import "_StorBackEnd/pkg/protocol"
|
||||
|
||||
func CreateProtocolRepository() *ProtocolRepository {
|
||||
return &ProtocolRepository{
|
||||
@@ -48,6 +46,19 @@ func (repo ProtocolRepository) ExecuteReader(data string) (string, bool) {
|
||||
return "", false
|
||||
}
|
||||
|
||||
/*
|
||||
ExecuteReader Permet d'exécuter un Wrier et de récupérer la commande construite avec nos argument et un indicateur de réussite.
|
||||
*/
|
||||
func (repo ProtocolRepository) ExecuteWriter(ruleName string, data ...string) (string, bool) {
|
||||
protWriter, has := repo.protocolWriters[ruleName]
|
||||
if has {
|
||||
println("OHOH")
|
||||
return (*protWriter).Execute(data...)
|
||||
} else {
|
||||
return "", false
|
||||
}
|
||||
}
|
||||
|
||||
// containsReader Permet de vérifier si le reader est déjà contenu
|
||||
func (repo ProtocolRepository) containsReader(cmd string) bool {
|
||||
_, has := repo.protocolReaders[cmd]
|
||||
|
||||
Reference in New Issue
Block a user