Documentation
¶
Overview ¶
Package global provides global flags for chuboctl.
Index ¶
- Variables
- type Args
- func (c *Args) NodeList() []string
- func (c *Args) WithClient(action func(context.Context, *client.Client) error, ...) error
- func (c *Args) WithClientAndNodes(action func(context.Context, *client.Client, []string) error, ...) error
- func (c *Args) WithClientMaintenance(enforceFingerprints []string, ...) error
- func (c *Args) WithClientNoNodes(action func(context.Context, *client.Client) error, ...) error
Constants ¶
This section is empty.
Variables ¶
var ErrConfigContext = errors.New("failed to resolve config context")
ErrConfigContext is returned when config context cannot be resolved.
Functions ¶
This section is empty.
Types ¶
type Args ¶
type Args struct {
Chuboconfig string
CmdContext string
Cluster string
Nodes []string
Endpoints []string
SideroV1KeysDir string
}
Args is a context for the Chubo OS command line client.
func (*Args) WithClient ¶
func (c *Args) WithClient(action func(context.Context, *client.Client) error, dialOptions ...grpc.DialOption) error
WithClient builds upon WithClientNoNodes to provide set of nodes on request context based on config & flags.
func (*Args) WithClientAndNodes ¶
func (c *Args) WithClientAndNodes(action func(context.Context, *client.Client, []string) error, dialOptions ...grpc.DialOption) error
WithClientAndNodes builds upon WithClientNoNodes to provide a list of nodes to the function.
func (*Args) WithClientMaintenance ¶
func (c *Args) WithClientMaintenance(enforceFingerprints []string, action func(context.Context, *client.Client) error) error
WithClientMaintenance wraps common code to initialize Chubo OS client in maintenance (insecure mode).
func (*Args) WithClientNoNodes ¶
func (c *Args) WithClientNoNodes(action func(context.Context, *client.Client) error, dialOptions ...grpc.DialOption) error
WithClientNoNodes wraps common code to initialize Chubo OS client and provide cancellable context.
WithClientNoNodes doesn't set any node information on the request context.