func (s *Swift) Status(ctx context.Context) []sdk.MonitoringStatusLine {
	info, _, err := s.client.Account()
	if err != nil {
		return []sdk.MonitoringStatusLine{{Component: "backend/" + s.Name(), Value: "Swift KO" + err.Error(), Status: sdk.MonitoringStatusAlert}}
	}
	return []sdk.MonitoringStatusLine{{
		Component: "backend/" + s.Name(),
		Value:     fmt.Sprintf("Swift OK (%d containers, %d objects, %d bytes used", info.Containers, info.Objects, info.BytesUsed),
		Status:    sdk.MonitoringStatusOK,
	}}
}
// Status returns the status of swift account
Status returns the status of swift account
// Status returns the status of swift account
func (s *Swift) Status(ctx context.Context) []sdk.MonitoringStatusLine {
	info, _, err := s.client.Account()
	if err != nil {
		return []sdk.MonitoringStatusLine{{Component: "backend/" + s.Name(), Value: "Swift KO" + err.Error(), Status: sdk.MonitoringStatusAlert}}
	}
	return []sdk.MonitoringStatusLine{{
		Component: "backend/" + s.Name(),
		Value:     fmt.Sprintf("Swift OK (%d containers, %d objects, %d bytes used", info.Containers, info.Objects, info.BytesUsed),
		Status:    sdk.MonitoringStatusOK,
	}}
}
func ( s * Swift ) Status ( ctx context . Context ) [ ] sdk . MonitoringStatusLine { info , _ , err := s . client . Account ( ) if err != nil { return [ ] sdk . MonitoringStatusLine { { Component : " " + s . Name ( ) , Value : " " + err . Error ( ) , Status : sdk . MonitoringStatusAlert } } } return [ ] sdk . MonitoringStatusLine { { Component : " " + s . Name ( ) , Value : fmt . Sprintf ( " " , info . Containers , info . Objects , info . BytesUsed ) , Status : sdk . MonitoringStatusOK , } } }
Status returns the status of swift account
Status returns the status of swift account