Documentation ¶
Index ¶
- type Bus
- func (b *Bus) AddFormattedSubscriber(sub Subscriber)
- func (b *Bus) AddRawSubscriber(sub Subscriber)
- func (b *Bus) AddSubscriber(sub Subscriber)
- func (b *Bus) CreatedAt() time.Time
- func (b *Bus) FormattedWriter(targetID string) *FormattedWriter
- func (b *Bus) NowUnixNanos() uint64
- func (b *Bus) RemoveFormattedSubscriber(sub Subscriber)
- func (b *Bus) RemoveRawSubscriber(sub Subscriber)
- func (b *Bus) RemoveSubscriber(sub Subscriber)
- func (b *Bus) Run() *Run
- func (b *Bus) TsUnixNanos(t2 time.Time) uint64
- func (b *Bus) WriteDeltaManifest(dm *logstream.DeltaManifest)
- func (b *Bus) WriteFormattedLog(dfl *logstream.DeltaFormattedLog)
- func (b *Bus) WriteRawLog(dl *logstream.DeltaLog)
- type Command
- func (c *Command) SetCached(cached bool)
- func (c *Command) SetEnd(end time.Time, status logstream.RunStatus, errorStr string)
- func (c *Command) SetProgress(progress int32)
- func (c *Command) SetStart(start time.Time)
- func (c *Command) TailOutput() []byte
- func (c *Command) Write(dt []byte, ts time.Time, stream int32) (int, error)
- type FormattedWriter
- type Generic
- type Run
- func (run *Run) Command(commandID string) (*Command, bool)
- func (run *Run) Generic() *Generic
- func (run *Run) NewCommand(commandID string, command string, targetID string, category string, ...) (*Command, error)
- func (run *Run) NewTarget(targetID, shortTargetName, canonicalTargetName string, overrideArgs []string, ...) (*Target, error)
- func (run *Run) SetEnd(end time.Time, status logstream.RunStatus)
- func (run *Run) SetFatalError(end time.Time, targetID string, commandID string, ...)
- func (run *Run) SetStart(start time.Time)
- func (run *Run) Target(targetID string) (*Target, bool)
- type Subscriber
- type Target
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bus ¶
type Bus struct {
// contains filtered or unexported fields
}
Bus is a build log data bus. It listens for raw deltas via WriteDeltaManifest and WriteRawLog, passes them on to raw subscribers, who can then write formatted deltas back to the bus via WriteFormattedLog. The formatted deltas are then passed on to formatted subscribers.
func (*Bus) AddFormattedSubscriber ¶
func (b *Bus) AddFormattedSubscriber(sub Subscriber)
AddFormattedSubscriber adds a formatted subscriber to the bus. A formatted subscriber receives only the formatted deltas: DeltaFormattedLog.
func (*Bus) AddRawSubscriber ¶
func (b *Bus) AddRawSubscriber(sub Subscriber)
AddRawSubscriber adds a raw subscriber to the bus. A raw subscriber only receives the raw deltas: DeltaManifest and DeltaLog.
func (*Bus) AddSubscriber ¶
func (b *Bus) AddSubscriber(sub Subscriber)
AddSubscriber adds a subscriber to the bus. A subscriber receives both the raw and formatted deltas.
func (*Bus) FormattedWriter ¶
func (b *Bus) FormattedWriter(targetID string) *FormattedWriter
FormattedWriter returns a writer that writes formatted deltas to the bus.
func (*Bus) NowUnixNanos ¶
NowUnixNanos returns the current time in unix nanoseconds, ensuring monotonically increasing time.
func (*Bus) RemoveFormattedSubscriber ¶
func (b *Bus) RemoveFormattedSubscriber(sub Subscriber)
RemoveFormattedSubscriber removes a formatted subscriber from the bus.
func (*Bus) RemoveRawSubscriber ¶
func (b *Bus) RemoveRawSubscriber(sub Subscriber)
RemoveRawSubscriber removes a raw subscriber from the bus.
func (*Bus) RemoveSubscriber ¶
func (b *Bus) RemoveSubscriber(sub Subscriber)
RemoveSubscriber removes a subscriber from the bus.
func (*Bus) TsUnixNanos ¶
TsUnixNanos returns a given timestamp in unix nanoseconds, ensuring monotonically increasing time.
func (*Bus) WriteDeltaManifest ¶
func (b *Bus) WriteDeltaManifest(dm *logstream.DeltaManifest)
WriteLog write a raw delta log to the bus.
func (*Bus) WriteFormattedLog ¶
func (b *Bus) WriteFormattedLog(dfl *logstream.DeltaFormattedLog)
WriteFormattedLog writes a formatted delta to the bus.
func (*Bus) WriteRawLog ¶
WriteRawLog write a raw delta log to the bus.
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command is a build log writer for a command.
func (*Command) SetProgress ¶
SetProgress sets the progress of the command.
func (*Command) TailOutput ¶
TailOutput returns the tail of the output.
type FormattedWriter ¶
type FormattedWriter struct {
// contains filtered or unexported fields
}
FormattedWriter is a writer that produces DeltaFormattedLog messages.
func NewFormattedWriter ¶
func NewFormattedWriter(bus *Bus, targetID string) *FormattedWriter
NewFormattedWriter creates a new FormattedWriter.
type Generic ¶
type Generic struct {
// contains filtered or unexported fields
}
Generic is a generic writer for build output unrelated to a specific target.
func (*Generic) WithPrefix ¶
func (g *Generic) WithPrefix(category string) conslogging.PrefixWriter
WithPrefix returns a new Generic with the given prefix. This satisfies the conslogging.PrefixWriter interface.
type Run ¶
type Run struct {
// contains filtered or unexported fields
}
Run is a run logstream delta generator for a run.
func (*Run) Generic ¶
Generic returns a generic writer for build output unrelated to a specific target.
func (*Run) NewCommand ¶
func (run *Run) NewCommand(commandID string, command string, targetID string, category string, platform string, cached, local, interactive bool, sourceLocation *spec.SourceLocation, repoURL, repoHash, fileRelToRepo string) (*Command, error)
NewCommand creates a new command printer.
func (*Run) NewTarget ¶
func (run *Run) NewTarget(targetID, shortTargetName, canonicalTargetName string, overrideArgs []string, initialPlatform string, runner string) (*Target, error)
NewTarget creates a new target printer.
func (*Run) SetFatalError ¶
func (run *Run) SetFatalError(end time.Time, targetID string, commandID string, failureType logstream.FailureType, errString string)
SetFatalError sets a fatal error for the build.
type Subscriber ¶
Subscriber is an object that can receive deltas.