chore: 初始化 Slurm Go SDK 项目骨架和核心客户端

添加 Go 模块定义、.gitignore、包文档、HTTP Client 核心、Token 认证和错误处理。

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
dailz
2026-04-08 18:28:32 +08:00
commit 73453ddd10
6 changed files with 254 additions and 0 deletions

18
internal/slurm/slurm.go Normal file
View File

@@ -0,0 +1,18 @@
// 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.
//
// Basic usage:
//
// 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)
// }
package slurm