Golang client library #11796
-
|
I've been poking around at building Talos functionality into internal commands/scripts. I see there's a go client at One thing I was trying to do was get a list of cluster member ips, i.e.
It's not very type safe, there are lots of parameters that I don't really know about or shouldn't have to worry about ( I'd have expected something like Are the json paths stable in the api? It'd be a bit simpler if I could hard code a jsonpath and skip the kind display columns search stuff... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
You don't need to do any type casting or anything like that. Once you set up a client, you can do something close to: talos/internal/integration/api/discovery.go Lines 336 to 359 in 8b64f68 This gives you completely typed resources back. |
Beta Was this translation helpful? Give feedback.
You don't need to do any type casting or anything like that.
Once you set up a client, you can do something close to:
talos/internal/integration/api/discovery.go
Lines 336 to 359 in 8b64f68