1
0
Fork 0
mirror of https://github.com/postmannen/ctrl.git synced 2025-03-31 01:24:31 +00:00

renamed and cleaned up files

This commit is contained in:
postmannen 2021-03-26 05:34:53 +01:00
parent f792675ebe
commit 25386535a8
9 changed files with 0 additions and 82 deletions

View file

@ -1,55 +0,0 @@
package steward
// // REMOVED:
// type publisherServices struct {
// sayHelloPublisher sayHelloPublisher
// }
//
// func newPublisherServices(sayHelloInterval int) *publisherServices {
// ps := publisherServices{
// sayHelloPublisher: sayHelloPublisher{
// interval: sayHelloInterval,
// },
// }
// return &ps
// }
//
// // ---
//
// type sayHelloPublisher struct {
// interval int
// }
//
// func (s *sayHelloPublisher) start(newMessagesCh chan<- []subjectAndMessage, fromNode node) {
// go func() {
// for {
// sam := s.createMsg(fromNode)
// newMessagesCh <- []subjectAndMessage{sam}
// time.Sleep(time.Second * time.Duration(s.interval))
// }
// }()
// }
//
// // Will prepare a subject and message with the content
// // of the error
// func (s *sayHelloPublisher) createMsg(FromNode node) subjectAndMessage {
// // TESTING: Creating an error message to send to errorCentral
// m := fmt.Sprintf("Hello from %v\n", FromNode)
//
// sam := subjectAndMessage{
// Subject: Subject{
// ToNode: "central",
// CommandOrEvent: EventNACK,
// Method: SayHello,
// },
// Message: Message{
// ToNode: "central",
// FromNode: FromNode,
// Data: []string{m},
// Method: SayHello,
// },
// }
//
// return sam
// }
//

View file

@ -1,26 +0,0 @@
package steward
// // subscriberServices will hold all the helper services needed for
// // the different subcribers. Example of a help service can be a log
// // subscriber needs a way to write logs locally or send them to some
// // other central logging system.
// type subscriberServices struct {
// // sayHelloNodes are the register where the register where nodes
// // who have sent an sayHello are stored. Since the sayHello
// // subscriber is a handler that will be just be called when a
// // hello message is received we need to store the metrics somewhere
// // else, that is why we store it here....at least for now.
// sayHelloNodes map[node]struct{}
// }
//
// //newSubscriberServices will prepare and return a *subscriberServices
// func newSubscriberServices() *subscriberServices {
// s := subscriberServices{
// sayHelloNodes: make(map[node]struct{}),
// }
//
// return &s
// }
//
// // ---
//

View file

@ -1 +0,0 @@
package steward