Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCommand ¶
NewCommand creates a new instance of spectacles, which can be executed as part of an existing application.
func NewCommandWithOptions ¶
NewCommandWithOptions creates a new instance of spectacles with a set of options. The resulting command can be executed as part of a larger app.
Types ¶
type CleanupFunc ¶
type CleanupFunc func()
CleanupFunc is an operation to cleanup resources that may be left behind.
func NewStandalone ¶
func NewStandalone(o *Options) (*cobra.Command, CleanupFunc)
NewStandalone creates a new instance of spectacles, but also initializes the Kubernetes logger mechanism for when the command is being run as a standalone. The second return is a cleanup function that must be called after the function is executed, e.g.:
o := app.NewOptions() cmd, cleanup := app.NewStandalone(o) defer cleanup() err := cmd.Execute()
type Options ¶
type Options struct { Kubeconfig string Master string HealthzPort int32 MetricsPort int32 ResyncPeriod *metav1.Duration Sink sinks.Writer Sinks map[string]sinks.Writer }
Options encapsulates all application options.
func NewOptions ¶
func NewOptions() *Options
NewOptions initializes a structure to encapsulate application options.