Skip to content

Latest commit

 

History

History
20 lines (17 loc) · 661 Bytes

using-client-go-in-clusternet.md

File metadata and controls

20 lines (17 loc) · 661 Bytes
title description date draft weight collapsible
client-go Support
Using client-go to interact with Clusternet
2022-01-17
false
4
false

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.