gitlab.com/SkynetLabs/skyd@v1.6.9/skymodules/renter/alert.go (about)

     1  package renter
     2  
     3  import "go.sia.tech/siad/modules"
     4  
     5  // Alerts implements the modules.Alerter interface for the renter. It returns
     6  // all alerts of the renter and its subskymodules.
     7  func (r *Renter) Alerts() (crit, err, warn, info []modules.Alert) {
     8  	renterCrit, renterErr, renterWarn, renterInfo := r.staticAlerter.Alerts()
     9  	contractorCrit, contractorErr, contractorWarn, contractorInfo := r.staticHostContractor.Alerts()
    10  	hostdbCrit, hostdbErr, hostdbWarn, hostdbInfo := r.staticHostDB.Alerts()
    11  	crit = append(append(renterCrit, contractorCrit...), hostdbCrit...)
    12  	err = append(append(renterErr, contractorErr...), hostdbErr...)
    13  	warn = append(append(renterWarn, contractorWarn...), hostdbWarn...)
    14  	info = append(append(renterInfo, contractorInfo...), hostdbInfo...)
    15  	return crit, err, warn, info
    16  }