mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 22:04:21 +01:00
30 lines
678 B
Go
30 lines
678 B
Go
package example
|
|
|
|
import (
|
|
"log"
|
|
|
|
"github.com/breez/breez-sdk-go/breez_sdk"
|
|
)
|
|
|
|
func HealthCheckStatus() {
|
|
// ANCHOR: health-check-status
|
|
if healthCheck, err := sdk.ServiceHealthCheck(); err != nil {
|
|
log.Printf("Current service status is: %v", healthCheck.Status)
|
|
}
|
|
// ANCHOR_END: health-check-status
|
|
}
|
|
|
|
func ReportPaymentFailure() {
|
|
// ANCHOR: report-payment-failure
|
|
paymentHash := "..."
|
|
reportIssueRequest := breez_sdk.ReportIssueRequestPaymentFailure{
|
|
Data: breez_sdk.ReportPaymentFailureDetails{
|
|
PaymentHash: paymentHash,
|
|
},
|
|
}
|
|
if err := sdk.ReportIssue(reportIssueRequest); err != nil {
|
|
log.Printf("%#v", err)
|
|
}
|
|
// ANCHOR_END: report-payment-failure
|
|
}
|