File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package condition
22
33import (
44 "encoding/json"
5+ "fmt"
56 "time"
67
78 "github.com/google/uuid"
@@ -140,6 +141,16 @@ type Condition struct {
140141 CreatedAt time.Time `json:"createdAt,omitempty"`
141142}
142143
144+ func (c * Condition ) StreamPublishSubject (facilityCode string ) string {
145+ // note: inband install conditions are published with the serverID in the subject suffix
146+ if c .Kind == FirmwareInstallInband {
147+ return fmt .Sprintf ("%s.servers.%s.%s" , facilityCode , c .Kind , c .Target .String ())
148+
149+ }
150+
151+ return fmt .Sprintf ("%s.servers.%s" , facilityCode , c .Kind )
152+ }
153+
143154// Fault is used to introduce faults into the controller when executing on a condition.
144155//
145156// Note: this depends on controllers implementing support to honor the given fault.
You can’t perform that action at this time.
0 commit comments