build: Index | Files

package spanlog

import ""

Package spanlog provides span and event logger interfaces that are used by the build coordinator infrastructure.


Package Files


type Logger Uses

type Logger interface {
    // CreateSpan logs the start of an event.
    // optText is 0 or 1 strings.
    CreateSpan(event string, optText ...string) Span

SpanLogger is something that has the CreateSpan method, which creates a event spanning some duration which will eventually be logged and visualized.

type Span Uses

type Span interface {
    // Done marks a span as done.
    // The err is returned unmodified for convenience at callsites.
    Done(err error) error

Span is a handle that can eventually be closed. Typical usage:

sp := sl.CreateSpan("slow_operation")
result, err := doSlowOperation()
// do something with result, err

Package spanlog is imported by 3 packages. Updated 2018-03-16. Refresh now. Tools for package owners.