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.
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.