Skip to content

Commit

Permalink
ping workload subjects
Browse files Browse the repository at this point in the history
Signed-off-by: Jordan Rash <jordan@synadia.com>
  • Loading branch information
jordan-rash committed Jan 7, 2025
1 parent a771d8e commit 2c37a2b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 15 deletions.
6 changes: 0 additions & 6 deletions api/go/shared.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions api/stop-workload-response.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
"id": {
"type": "string"
},
"issuer": {
"type": "string"
},
"stopped": {
"type": "boolean"
},
Expand All @@ -19,7 +16,6 @@
},
"required": [
"id",
"issuer",
"stopped",
"message"
],
Expand Down
8 changes: 4 additions & 4 deletions models/agents.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ func AgentAPISetLameduckSubject(inAgentName string) string {
return fmt.Sprintf("%s.%s.%s.SETLAMEDUCK", AgentAPIPrefix, NodeSystemNamespace, inAgentName)
}

func AgentAPIPingWorkloadSubject(inAgentName string) string {
return fmt.Sprintf("%s.%s.%s.PINGWORKLOAD", AgentAPIPrefix, NodeSystemNamespace, inAgentName)
}

func AgentAPIPingSubject(inAgentName string) string {
return fmt.Sprintf("%s.%s.%s.PING", AgentAPIPrefix, NodeSystemNamespace, inAgentName)
}

// User based
func AgentAPIPingWorkloadSubject(inAgentName string) string {
return fmt.Sprintf("%s.*.%s.PINGWORKLOAD.*", AgentAPIPrefix, inAgentName)
}

func AgentAPIStartWorkloadSubject(inAgentName string) string {
return fmt.Sprintf("%s.*.%s.STARTWORKLOAD.*", AgentAPIPrefix, inAgentName)
}
Expand Down
1 change: 0 additions & 1 deletion node/internal/actors/control_api_conversions.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ func startResponseFromProto(response *actorproto.WorkloadStarted) *api.StartWork
func stopResponseFromProto(response *actorproto.WorkloadStopped) *api.StopWorkloadResponse {
return &api.StopWorkloadResponse{
Id: response.Id,
Issuer: response.Issuer,
Stopped: response.Stopped,
}
}
Expand Down
4 changes: 4 additions & 0 deletions node/internal/actors/subjects.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ func WorkloadPingSubscribeSubject() string {
func AgentAPIStartWorkloadRequestSubject(inNamespace, inAgentName, inWorkloadId string) string {
return fmt.Sprintf("%s.%s.%s.STARTWORKLOAD.%s", models.AgentAPIPrefix, inNamespace, inAgentName, inWorkloadId)
}

func AgentAPIPingWorkloadRequestSubject(inNamespace, inAgentName, inWorkloadId string) string {
return fmt.Sprintf("%s.%s.%s.PINGWORKLOAD.%s", models.AgentAPIPrefix, inNamespace, inAgentName, inWorkloadId)
}

0 comments on commit 2c37a2b

Please sign in to comment.