All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
CheckAllComponents | Get /healthcheck | Check all components |
CheckComponent | Get /healthcheck/checks/{componentName} | Check single component |
ListAllHealthChecks | Get /healthcheck/checks | List all health checks |
CheckAllComponents200Response CheckAllComponents(ctx).Execute()
Check all components
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.HealthcheckAPI.CheckAllComponents(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HealthcheckAPI.CheckAllComponents``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CheckAllComponents`: CheckAllComponents200Response
fmt.Fprintf(os.Stdout, "Response from `HealthcheckAPI.CheckAllComponents`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiCheckAllComponentsRequest struct via the builder pattern
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HealthCheckResult CheckComponent(ctx, componentName).Execute()
Check single component
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
componentName := "componentName_example" // string | URL encoded name of the component
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.HealthcheckAPI.CheckComponent(context.Background(), componentName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HealthcheckAPI.CheckComponent``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CheckComponent`: HealthCheckResult
fmt.Fprintf(os.Stdout, "Response from `HealthcheckAPI.CheckComponent`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
componentName | string | URL encoded name of the component |
Other parameters are passed through a pointer to a apiCheckComponentRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]HealthCheckInfo ListAllHealthChecks(ctx).Execute()
List all health checks
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.HealthcheckAPI.ListAllHealthChecks(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HealthcheckAPI.ListAllHealthChecks``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListAllHealthChecks`: []HealthCheckInfo
fmt.Fprintf(os.Stdout, "Response from `HealthcheckAPI.ListAllHealthChecks`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListAllHealthChecksRequest struct via the builder pattern
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]