mirror of
https://github.com/postmannen/ctrl.git
synced 2024-12-14 12:37:31 +00:00
removed label from subject
This commit is contained in:
parent
ef8fcee368
commit
3368448cd7
4 changed files with 4 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
|||
[
|
||||
{
|
||||
"label":"metrics/vg.no/annet/minside/",
|
||||
"label":"metrics/network/sniffer",
|
||||
"toNode": "ship1",
|
||||
"data": ["http://vg.no"],
|
||||
"method":"REQHttpGet",
|
||||
|
|
|
@ -82,9 +82,6 @@ type Subject struct {
|
|||
// from routeMessagesToPublish in *server.
|
||||
// This channel is only used for publishing processes.
|
||||
messageCh chan Message
|
||||
// Label, single word used to describe the data content. For example
|
||||
// syslog, metrics, etc.
|
||||
Label string
|
||||
}
|
||||
|
||||
// newSubject will return a new variable of the type subject, and insert
|
||||
|
|
|
@ -104,7 +104,6 @@ func newSAM(m Message) (subjectAndMessage, error) {
|
|||
ToNode: string(m.ToNode),
|
||||
CommandOrEvent: tmpH.getKind(),
|
||||
Method: m.Method,
|
||||
Label: m.Label,
|
||||
}
|
||||
|
||||
sm := subjectAndMessage{
|
||||
|
|
|
@ -359,12 +359,15 @@ func (m methodREQTextToFile) handler(proc process, message Message, node string)
|
|||
// information from, so we use the one that are in the current mesage.
|
||||
fileName = fmt.Sprintf("%v.%v.log", message.ToNode, message.Method)
|
||||
folderTree = filepath.Join(proc.configuration.SubscribersDataFolder, message.Label, string(message.FromNode))
|
||||
fmt.Printf(" ** DEBUG1: foldertree: %v\n", folderTree)
|
||||
case message.PreviousMessage.ToNode != "":
|
||||
fileName = fmt.Sprintf("%v.%v.log", message.PreviousMessage.ToNode, message.PreviousMessage.Method)
|
||||
folderTree = filepath.Join(proc.configuration.SubscribersDataFolder, message.PreviousMessage.Label, string(message.PreviousMessage.ToNode))
|
||||
fmt.Printf(" ** DEBUG2: foldertree: %v\n", folderTree)
|
||||
case message.PreviousMessage.ToNode == "":
|
||||
fileName = fmt.Sprintf("%v.%v.log", message.FromNode, message.Method)
|
||||
folderTree = filepath.Join(proc.configuration.SubscribersDataFolder, message.PreviousMessage.Label, string(message.PreviousMessage.ToNode))
|
||||
fmt.Printf(" ** DEBUG3: foldertree: %v\n", folderTree)
|
||||
}
|
||||
|
||||
// Check if folder structure exist, if not create it.
|
||||
|
|
Loading…
Reference in a new issue