client-go Support
Using client-go to interact with Clusternet
If you want to use client-go to interact with Clusternet, you only need to
insert below wrapperFunc in your codes, while the rest remains the same.
// This is the ONLY place you need to wrap for Clusternet
config.Wrap(func(rt http.RoundTripper) http.RoundTripper {
return clientgo.NewClusternetTransport(config.Host, rt)
})
You can follow demo.go for a quick start.
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.
Last modified July 22, 2022: fix en zh-cn versions of client-go doc (#33) (7ee622f)