支持 client-go
使用 client-go 与 Clusternet 交互
如果你想使用 client-go 与 Clusternet 交互,你只需要在你的代码中插入下面的 wrapperFunc,其余的保持不变。
// 只需添加如下代码
config.Wrap(func(rt http.RoundTripper) http.RoundTripper {
return clientgo.NewClusternetTransport(config.Host, rt)
})
您可以查阅 demo.go 以快速入门。
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
最后修改 2022.07.22: fix en zh-cn versions of client-go doc (#33) (7ee622f)