Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
29 lines
785 B
Go
29 lines
785 B
Go
// Package slurm provides a Go client for the Slurm REST API (v0.0.40).
|
|
//
|
|
// The client handles authentication via X-SLURM-USER-NAME and X-SLURM-USER-TOKEN
|
|
// headers, request/response marshaling, and error handling.
|
|
//
|
|
// Static token authentication:
|
|
//
|
|
// httpClient := &http.Client{
|
|
// Transport: &slurm.TokenAuthTransport{
|
|
// UserName: "slurm",
|
|
// Token: "your-token",
|
|
// },
|
|
// }
|
|
// client, err := slurm.NewClient("http://localhost:6820", httpClient)
|
|
// if err != nil {
|
|
// log.Fatal(err)
|
|
// }
|
|
//
|
|
// JWT authentication (auto-signed from local key):
|
|
//
|
|
// client, err := slurm.NewClientWithOpts("http://localhost:6820",
|
|
// slurm.WithJWTKey("/etc/slurm/jwt/slurm_jwt.key"),
|
|
// slurm.WithUsername("slurmapi"),
|
|
// )
|
|
// if err != nil {
|
|
// log.Fatal(err)
|
|
// }
|
|
package slurm
|