This provides interface to consume (watch) events in the same way (with
the same API) as server code does. So some processing might be moved
back and forth between client and server without much code change.
Also moved peer methods out of helpers to the main client package, they
might be useful for any client, not only talosctl.
Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
Create a new `client.New` to make external API systems easier to
construct.
A new type `client.OptionFunc` allows the client to be
extended with specific configuration.
This also makes a first pass at supporting multiple endpoints properly
by creating a custom grpc resolver.
(Proper load balancing support is still a TODO.)
Fixes#2093
Signed-off-by: Seán C McCord <ulexus@gmail.com>
This adds the ability to bootstrap a cluster using the API.
The API simply starts the bootkube service.
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>