Softlayer API 用于关闭 golang 中的会话?
Softlayer API for closing a session in golang?
我正在使用 softlayer go 客户端
https://github.com/softlayer/softlayer-go
我无法关闭软层会话。我该怎么做?
我已经使用 Session.New()
API 创建了软层会话。
参考:- https://github.com/softlayer/softlayer-go/blob/master/session/session.go
https://github.com/softlayer/softlayer-go/blob/master/session/session.go
基本上通过将用户名、apiKey、端点、超时等存储在变量中来配置 go-client,每次向 API.
发出请求时都会使用这些变量
如果您查看 SoftLayer API,它没有任何方法可以 create/close 会话,所以如果您想模拟类似的东西,那么我认为您可以尝试发送空白值到 Session.New()
并删除存储在 ~/.softlayer
文件
中的任何值
我正在使用 softlayer go 客户端 https://github.com/softlayer/softlayer-go
我无法关闭软层会话。我该怎么做?
我已经使用 Session.New()
API 创建了软层会话。
参考:- https://github.com/softlayer/softlayer-go/blob/master/session/session.go
https://github.com/softlayer/softlayer-go/blob/master/session/session.go 基本上通过将用户名、apiKey、端点、超时等存储在变量中来配置 go-client,每次向 API.
发出请求时都会使用这些变量如果您查看 SoftLayer API,它没有任何方法可以 create/close 会话,所以如果您想模拟类似的东西,那么我认为您可以尝试发送空白值到 Session.New()
并删除存储在 ~/.softlayer
文件