All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
GetConfigApiV2SystemConfigGet | Get /api/v2/system/config | Get Config |
GetWorkerStatusApiV2SystemWorkersGet | Get /api/v2/system/workers | Get Worker Status |
RestartWorkerApiV2SystemRestartworkerWorkerNamePost | Post /api/v2/system/restartworker/{worker_name} | Restart Worker |
SystemConfigResponse GetConfigApiV2SystemConfigGet(ctx).Execute()
Get Config
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/yeti-platform/goyeti"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SystemAPI.GetConfigApiV2SystemConfigGet(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SystemAPI.GetConfigApiV2SystemConfigGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetConfigApiV2SystemConfigGet`: SystemConfigResponse
fmt.Fprintf(os.Stdout, "Response from `SystemAPI.GetConfigApiV2SystemConfigGet`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetConfigApiV2SystemConfigGetRequest 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]
WorkerStatusResponse GetWorkerStatusApiV2SystemWorkersGet(ctx).Execute()
Get Worker Status
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/yeti-platform/goyeti"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SystemAPI.GetWorkerStatusApiV2SystemWorkersGet(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SystemAPI.GetWorkerStatusApiV2SystemWorkersGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetWorkerStatusApiV2SystemWorkersGet`: WorkerStatusResponse
fmt.Fprintf(os.Stdout, "Response from `SystemAPI.GetWorkerStatusApiV2SystemWorkersGet`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetWorkerStatusApiV2SystemWorkersGetRequest struct via the builder pattern
OAuth2PasswordBearer, APIKeyCookie
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WorkerRestartResponse RestartWorkerApiV2SystemRestartworkerWorkerNamePost(ctx, workerName).Execute()
Restart Worker
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/yeti-platform/goyeti"
)
func main() {
workerName := "workerName_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SystemAPI.RestartWorkerApiV2SystemRestartworkerWorkerNamePost(context.Background(), workerName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SystemAPI.RestartWorkerApiV2SystemRestartworkerWorkerNamePost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `RestartWorkerApiV2SystemRestartworkerWorkerNamePost`: WorkerRestartResponse
fmt.Fprintf(os.Stdout, "Response from `SystemAPI.RestartWorkerApiV2SystemRestartworkerWorkerNamePost`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
workerName | string |
Other parameters are passed through a pointer to a apiRestartWorkerApiV2SystemRestartworkerWorkerNamePostRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
OAuth2PasswordBearer, APIKeyCookie
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]