Files
vmware-api-simulator/docs/ru/examples/go.md
T
inecs f8d3cbdd59 Initial commit: VMware vSphere API simulator scaffold.
Add the FastAPI app, PostgreSQL migrations, Docker/Helm packaging, API
contracts, docs, client examples, and the unit/integration/compatibility
test suite for local client and tooling labs without a real vCenter.
2026-07-18 04:42:11 +03:00

22 lines
1012 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
**Language / Язык:** [English](../../examples/go.md) | [Русский](go.md)
# Go
Использует стандартную библиотеку Go (`net/http`) против
`https://localhost` с Basic-auth сессией
(`vmware-api-session-id`).
```bash
cd examples/go
go run .
```
Переопределите значения по умолчанию через `VSPHERE_BASE`, `VSPHERE_USER`,
`VSPHERE_PASSWORD`, `VSPHERE_VM_NAME`. См. [`main.go`](../../../examples/go/main.go)
для потока session → list → create → power → wait-task → delete и вспомогательной
функции `waitTask`, которая опрашивает `GET /api/cis/tasks/{task}`.
Проверка TLS отключена в HTTP-клиенте только для локального самоподписанного
сертификата разработческого шлюза — не переиспользуйте такой transport против
реального vCenter.