mirror of
https://github.com/anchore/grype
synced 2024-11-14 00:07:08 +00:00
6395481e73
* add base syft UI elements * add etui with shared ui elements * allow for concurrent download DB and fetch/catalog image
19 lines
282 B
Go
19 lines
282 B
Go
package bus
|
|
|
|
import "github.com/wagoodman/go-partybus"
|
|
|
|
var publisher partybus.Publisher
|
|
var active bool
|
|
|
|
func SetPublisher(p partybus.Publisher) {
|
|
publisher = p
|
|
if p != nil {
|
|
active = true
|
|
}
|
|
}
|
|
|
|
func Publish(event partybus.Event) {
|
|
if active {
|
|
publisher.Publish(event)
|
|
}
|
|
}
|