Documentation
¶
Overview ¶
Package widgets contains a YaGoStatus widgets.
Index ¶
- func NewBlankWidget(params interface{}, wlogger logger.Logger) (ygs.Widget, error)
- func NewClockWidget(params interface{}, wlogger logger.Logger) (ygs.Widget, error)
- func NewExecWidget(params interface{}, wlogger logger.Logger) (ygs.Widget, error)
- func NewHTTPWidget(params interface{}, wlogger logger.Logger) (ygs.Widget, error)
- func NewStaticWidget(params interface{}, wlogger logger.Logger) (ygs.Widget, error)
- func NewWrapperWidget(params interface{}, wlogger logger.Logger) (ygs.Widget, error)
- type BlankWidget
- type BlankWidgetParams
- type ClockWidget
- type ClockWidgetParams
- type ExecWidget
- type ExecWidgetParams
- type HTTPWidget
- type HTTPWidgetParams
- type StaticWidget
- type StaticWidgetParams
- type WrapperWidget
- type WrapperWidgetParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBlankWidget ¶ added in v0.4.0
NewBlankWidget returns a new BlankWidget.
func NewClockWidget ¶ added in v0.4.0
NewClockWidget returns a new ClockWidget.
func NewExecWidget ¶ added in v0.4.0
NewExecWidget returns a new ExecWidget.
func NewHTTPWidget ¶ added in v0.4.0
NewHTTPWidget returns a new HTTPWidget.
func NewStaticWidget ¶ added in v0.4.0
NewStaticWidget returns a new StaticWidget.
Types ¶
type BlankWidget ¶ added in v0.2.0
type BlankWidget struct{}
BlankWidget is a widgets template.
func (*BlankWidget) Continue ¶ added in v1.0.0
func (w *BlankWidget) Continue() error
Continue continues the widdget.
func (*BlankWidget) Event ¶ added in v0.2.0
func (w *BlankWidget) Event(event ygs.I3BarClickEvent, blocks []ygs.I3BarBlock) error
Event processes the widget events.
func (*BlankWidget) Run ¶ added in v0.2.0
func (w *BlankWidget) Run(c chan<- []ygs.I3BarBlock) error
Run starts the main loop.
func (*BlankWidget) Shutdown ¶ added in v1.0.0
func (w *BlankWidget) Shutdown() error
Shutdown shutdowns the widget.
func (*BlankWidget) Stop ¶ added in v0.2.0
func (w *BlankWidget) Stop() error
Stop stops the widdget.
type BlankWidgetParams ¶ added in v1.0.0
type BlankWidgetParams struct{}
BlankWidgetParams are widget parameters.
type ClockWidget ¶
type ClockWidget struct { BlankWidget // contains filtered or unexported fields }
ClockWidget implements a clock.
func (*ClockWidget) Run ¶
func (w *ClockWidget) Run(c chan<- []ygs.I3BarBlock) error
Run starts the main loop.
type ClockWidgetParams ¶ added in v1.0.0
ClockWidgetParams are widget parameters.
type ExecWidget ¶
type ExecWidget struct { BlankWidget // contains filtered or unexported fields }
ExecWidget implements the exec widget.
func (*ExecWidget) Event ¶
func (w *ExecWidget) Event(event ygs.I3BarClickEvent, blocks []ygs.I3BarBlock) error
Event processes the widget events.
func (*ExecWidget) Run ¶
func (w *ExecWidget) Run(c chan<- []ygs.I3BarBlock) error
Run starts the main loop.
type ExecWidgetParams ¶ added in v1.0.0
type ExecWidgetParams struct { Command string Interval int Retry *int Silent bool EventsUpdate bool `yaml:"events_update"` Signal *int OutputFormat executor.OutputFormat `yaml:"output_format"` WorkDir string }
ExecWidgetParams are widget parameters.
type HTTPWidget ¶ added in v0.2.0
type HTTPWidget struct { BlankWidget // contains filtered or unexported fields }
HTTPWidget implements the http server widget.
func (*HTTPWidget) Event ¶ added in v0.2.0
func (w *HTTPWidget) Event(event ygs.I3BarClickEvent, blocks []ygs.I3BarBlock) error
Event processes the widget events.
func (*HTTPWidget) Run ¶ added in v0.2.0
func (w *HTTPWidget) Run(c chan<- []ygs.I3BarBlock) error
Run starts the main loop.
func (*HTTPWidget) Shutdown ¶ added in v1.0.0
func (w *HTTPWidget) Shutdown() error
type HTTPWidgetParams ¶ added in v1.0.0
HTTPWidgetParams are widget parameters.
type StaticWidget ¶
type StaticWidget struct { BlankWidget // contains filtered or unexported fields }
StaticWidget implements a static widget.
func (*StaticWidget) Run ¶
func (w *StaticWidget) Run(c chan<- []ygs.I3BarBlock) error
Run returns configured blocks.
type StaticWidgetParams ¶ added in v1.0.0
type StaticWidgetParams struct {
Blocks string
}
StaticWidgetParams are widget parameters.
type WrapperWidget ¶
type WrapperWidget struct {
// contains filtered or unexported fields
}
WrapperWidget implements the wrapper of other status commands.
func (*WrapperWidget) Continue ¶ added in v1.0.0
func (w *WrapperWidget) Continue() error
Continue continues the widdget.
func (*WrapperWidget) Event ¶
func (w *WrapperWidget) Event(event ygs.I3BarClickEvent, blocks []ygs.I3BarBlock) error
Event processes the widget events.
func (*WrapperWidget) Run ¶
func (w *WrapperWidget) Run(c chan<- []ygs.I3BarBlock) error
Run starts the main loop.
func (*WrapperWidget) Shutdown ¶ added in v1.0.0
func (w *WrapperWidget) Shutdown() error
Shutdown shutdowns the widget.
type WrapperWidgetParams ¶ added in v1.0.0
WrapperWidgetParams are widget parameters.