[英]Softlayer API for closing a session in golang?
I am using the softlayer go client https://github.com/softlayer/softlayer-go 我正在使用softlayer go客户端https://github.com/softlayer/softlayer-go
I am not able to close the softlayer session. 我无法关闭softlayer会话。 How do I do that?
我怎么做?
I have created the softlayer session using the Session.New()
API. 我已经使用
Session.New()
API创建了softlayer会话。 Reference:- https://github.com/softlayer/softlayer-go/blob/master/session/session.go 参考: -https : //github.com/softlayer/softlayer-go/blob/master/session/session.go
The https://github.com/softlayer/softlayer-go/blob/master/session/session.go basically configures the go-client by storing the username, apiKey, endpoint, timeout, etc., in variables, which are used every time do a request to the API. https://github.com/softlayer/softlayer-go/blob/master/session/session.go基本上通过将用户名,apiKey,端点,超时等存储在变量中来配置go-client,这些变量用于每次向API发送请求。
If you review the SoftLayer API , it doesn't have any method that will create/close a session, so if you want to simulate something similar then I think you can try by sending blank values to Session.New()
and removing any value stored in ~/.softlayer
file 如果您查看SoftLayer API ,它没有任何可以创建/关闭会话的方法,那么如果您想模拟类似的内容,那么我认为您可以尝试将空白值发送到
Session.New()
并删除任何值存储在~/.softlayer
文件中
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.