consolesink

package
v0.0.205 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

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 LogAction

func LogAction(w io.Writer, s colors.Style, ev tasks.EventData)

func SetupFlags

func SetupFlags(flags *pflag.FlagSet)

Types

type ConsoleSink

type ConsoleSink struct {
	// contains filtered or unexported fields
}

func NewSink

func NewSink(out *os.File, interactive bool, maxLevel int) *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 common.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

func (c *ConsoleSink) WriteLines(id common.IdAndHash, name string, cat common.CatOutputType, actionID tasks.ActionID, _ time.Time, lines [][]byte)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL