Documentation ¶
Index ¶
- Constants
- Variables
- func LogAction(w io.Writer, s colors.Style, ev tasks.EventData)
- func SetupFlags(flags *pflag.FlagSet)
- type Atom
- type ConsoleSink
- func (c *ConsoleSink) AllocateConsoleId() uint64
- func (c *ConsoleSink) AttachmentsUpdated(actionID tasks.ActionID, data *tasks.ResultData)
- func (c *ConsoleSink) Done(ra *tasks.RunningAction)
- func (c *ConsoleSink) EnterInputMode(ctx context.Context, prompt ...string) func()
- func (c *ConsoleSink) Instant(ev *tasks.EventData)
- func (c *ConsoleSink) Output(name, contentType string, outputType idtypes.CatOutputType) io.Writer
- func (c *ConsoleSink) RecentInputSourcesContain(actionId tasks.ActionID) bool
- func (c *ConsoleSink) SetStickyContent(name string, content []byte)
- func (c *ConsoleSink) Start() func()
- func (c *ConsoleSink) Started(ra *tasks.RunningAction)
- func (c *ConsoleSink) Waiting(ra *tasks.RunningAction)
- func (c *ConsoleSink) WriteLines(id idtypes.IdAndHash, name string, cat idtypes.CatOutputType, ...)
- type ConsoleSinkOpts
- type Renderable
- type RendererFunc
Constants ¶
View Source
const (
FPS = 60
)
View Source
const StampMilliTZ = "Jan _2 15:04:05.000 MST"
Variables ¶
View Source
var ( OutputActionID = false DisplayWaitingActions = false DebugConsoleOutput = false DebugOutputDecisions = false )
View Source
var ( // These assume a black background. ColorSticky = aec.NewRGB8Bit(0x00, 0x2b, 0xac) ColorFade = aec.LightBlackF ColorToolName = aec.Color8BitF(aec.NewRGB8Bit(0x30, 0x30, 0x30)) ColorToolId = aec.Color8BitF(aec.NewRGB8Bit(0x30, 0x30, 0x30)) ColorsToolBar = []aec.RGB8Bit{ aec.NewRGB8Bit(0x56, 0x00, 0xac), aec.NewRGB8Bit(0x56, 0x00, 0xd7), aec.NewRGB8Bit(0x56, 0x2b, 0xd7), aec.NewRGB8Bit(0x56, 0x56, 0xd7), aec.NewRGB8Bit(0x56, 0x81, 0xd7), aec.NewRGB8Bit(0x56, 0xac, 0xd7), aec.NewRGB8Bit(0x56, 0xd7, 0xd7), } StickyRequired = map[string]bool{ "webui": true, "commands": true, } StickyPriorities = map[string]int{ "stack": 1, "webui": 10, "commands": 99, } DefaultStickyPriority = 50 )
Functions ¶
func SetupFlags ¶
Types ¶
type ConsoleSink ¶
type ConsoleSink struct { ConsoleSinkOpts // contains filtered or unexported fields }
func NewSink ¶
func NewSink(out *os.File, opts ConsoleSinkOpts) *ConsoleSink
func (*ConsoleSink) AllocateConsoleId ¶
func (c *ConsoleSink) AllocateConsoleId() uint64
func (*ConsoleSink) AttachmentsUpdated ¶
func (c *ConsoleSink) AttachmentsUpdated(actionID tasks.ActionID, data *tasks.ResultData)
func (*ConsoleSink) Done ¶
func (c *ConsoleSink) Done(ra *tasks.RunningAction)
func (*ConsoleSink) EnterInputMode ¶
func (c *ConsoleSink) EnterInputMode(ctx context.Context, prompt ...string) func()
Stops rendering actions. But only does so when an idle state is entered, and blocks until that point.
func (*ConsoleSink) Instant ¶
func (c *ConsoleSink) Instant(ev *tasks.EventData)
func (*ConsoleSink) Output ¶
func (c *ConsoleSink) Output(name, contentType string, outputType idtypes.CatOutputType) io.Writer
func (*ConsoleSink) RecentInputSourcesContain ¶
func (c *ConsoleSink) RecentInputSourcesContain(actionId tasks.ActionID) bool
func (*ConsoleSink) SetStickyContent ¶
func (c *ConsoleSink) SetStickyContent(name string, content []byte)
func (*ConsoleSink) Start ¶
func (c *ConsoleSink) Start() func()
func (*ConsoleSink) Started ¶
func (c *ConsoleSink) Started(ra *tasks.RunningAction)
func (*ConsoleSink) Waiting ¶
func (c *ConsoleSink) Waiting(ra *tasks.RunningAction)
func (*ConsoleSink) WriteLines ¶
type ConsoleSinkOpts ¶ added in v0.0.221
type ConsoleSinkOpts struct { Interactive bool // If set to false, only emit buffer output and logged actions. InhibitReport bool MaxLevel int // Only display actions at this level or below (all actions are still computed). Renderer RendererFunc }
type Renderable ¶ added in v0.0.221
type Renderable struct { Data tasks.EventData // The original event data. Scope []string // List of packages this line item pertains to. Serialized []Atom // Pre-rendered arguments. Cached bool // Whether this item represents a cache hit. Progress tasks.ActionProgress // This is not great, as we're using memory sharing here, but keeping it simple. }
type RendererFunc ¶ added in v0.0.221
Click to show internal directories.
Click to hide internal directories.