Documentation
¶
Index ¶
- func DoE(span SpanError, f func() error) (rerr error)
- func DoVE[T any](span SpanError, f func() (T, error)) (_ T, rerr error)
- func IsDuringGen(ctx context.Context) bool
- func WorkerStageFactory[S SpanError](f createSpanFunc[S]) worker2.Hook
- type BaseHook
- func (b BaseHook) OnCacheDownload(ctx context.Context, _ *TargetArtifactCacheSpan) (context.Context, SpanHook)
- func (b BaseHook) OnCacheUpload(ctx context.Context, _ *TargetArtifactCacheSpan) (context.Context, SpanHook)
- func (b BaseHook) OnCollectOutput(ctx context.Context, _ *TargetSpan) (context.Context, SpanHook)
- func (b BaseHook) OnExternalCacheGet(ctx context.Context, _ *ExternalCacheGetSpan) (context.Context, SpanHook)
- func (b BaseHook) OnGenPass(ctx context.Context, _ *BaseSpan) (context.Context, SpanHook)
- func (b BaseHook) OnLocalCacheCheck(ctx context.Context, _ *TargetArtifactCacheSpan) (context.Context, SpanHook)
- func (b BaseHook) OnLocalCacheStore(ctx context.Context, _ *TargetSpan) (context.Context, SpanHook)
- func (b BaseHook) OnLogs(ctx context.Context) io.Writer
- func (b BaseHook) OnRoot(ctx context.Context, _ *BaseSpan) (context.Context, SpanHook)
- func (b BaseHook) OnRun(ctx context.Context, _ *TargetSpan) (context.Context, SpanHook)
- func (b BaseHook) OnRunExec(ctx context.Context, _ *TargetExecSpan) (context.Context, SpanHook)
- func (b BaseHook) OnRunPrepare(ctx context.Context, _ *TargetSpan) (context.Context, SpanHook)
- type BaseSpan
- func (s *BaseSpan) End()
- func (s *BaseSpan) EndError(err error)
- func (s *BaseSpan) EndErrorState(err error, state State)
- func (s *BaseSpan) EndTime() time.Time
- func (s *BaseSpan) Error() error
- func (s *BaseSpan) FinalState() State
- func (s *BaseSpan) ID() uint64
- func (s *BaseSpan) QueuedTime() time.Time
- func (s *BaseSpan) ScheduledTime() time.Time
- func (s *BaseSpan) SetQueuedTime(t time.Time)
- func (s *BaseSpan) SetScheduledTime(t time.Time)
- func (s *BaseSpan) SetStartTime(t time.Time)
- func (s *BaseSpan) StartTime() time.Time
- type ExternalCacheGetSpan
- type Hook
- type Observability
- func (t *Observability) LogsWriter(ctx context.Context) io.Writer
- func (t *Observability) RegisterHook(h Hook)
- func (t *Observability) SpanCacheDownload(ctx context.Context, target *graph.Target, cache string, ...) (context.Context, *TargetArtifactCacheSpan)
- func (t *Observability) SpanCacheUpload(ctx context.Context, target *graph.Target, cache string, ...) (context.Context, *TargetArtifactCacheSpan)
- func (t *Observability) SpanCollectOutput(ctx context.Context, target *graph.Target) (context.Context, *TargetSpan)
- func (t *Observability) SpanExternalCacheGet(ctx context.Context, target *graph.Target, cache string, outputs []string, ...) (context.Context, *ExternalCacheGetSpan)
- func (t *Observability) SpanGenPass(ctx context.Context) (context.Context, *BaseSpan)
- func (t *Observability) SpanLocalCacheCheck(ctx context.Context, target *graph.Target, artifact artifacts.Artifact) (context.Context, *TargetArtifactCacheSpan)
- func (t *Observability) SpanLocalCacheStore(ctx context.Context, target *graph.Target) (context.Context, *TargetSpan)
- func (t *Observability) SpanRoot(ctx context.Context) (context.Context, *BaseSpan)
- func (t *Observability) SpanRun(ctx context.Context, target *graph.Target) (context.Context, *TargetSpan)
- func (t *Observability) SpanRunExec(ctx context.Context, target *graph.Target) (context.Context, *TargetExecSpan)
- func (t *Observability) SpanRunPrepare(ctx context.Context, target *graph.Target) (context.Context, *TargetSpan)
- type Span
- type SpanCacheHit
- type SpanError
- type SpanHook
- type SpanHookFunc
- type SpanTarget
- type SpanTargetArtifact
- type State
- type TargetArtifactCacheSpan
- type TargetArtifactSpan
- type TargetExecSpan
- type TargetSpan
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDuringGen ¶
func WorkerStageFactory ¶
Types ¶
type BaseHook ¶
type BaseHook struct{}
func (BaseHook) OnCacheDownload ¶
func (BaseHook) OnCacheUpload ¶
func (BaseHook) OnCollectOutput ¶
func (BaseHook) OnExternalCacheGet ¶
func (BaseHook) OnLocalCacheCheck ¶
func (BaseHook) OnLocalCacheStore ¶
func (BaseHook) OnRunPrepare ¶
type BaseSpan ¶
type BaseSpan struct {
// contains filtered or unexported fields
}
func (*BaseSpan) EndErrorState ¶
func (*BaseSpan) FinalState ¶
func (*BaseSpan) QueuedTime ¶
func (*BaseSpan) ScheduledTime ¶
func (*BaseSpan) SetQueuedTime ¶
func (*BaseSpan) SetScheduledTime ¶
func (*BaseSpan) SetStartTime ¶
type ExternalCacheGetSpan ¶
type ExternalCacheGetSpan struct { TargetSpan Cache string Outputs []string OnlyMeta bool // contains filtered or unexported fields }
func (*ExternalCacheGetSpan) IsCacheHit ¶
func (s *ExternalCacheGetSpan) IsCacheHit() *bool
func (*ExternalCacheGetSpan) SetCacheHit ¶
func (s *ExternalCacheGetSpan) SetCacheHit(v bool)
type Hook ¶
type Hook interface { OnRoot(ctx context.Context, span *BaseSpan) (context.Context, SpanHook) OnRun(ctx context.Context, span *TargetSpan) (context.Context, SpanHook) OnGenPass(ctx context.Context, span *BaseSpan) (context.Context, SpanHook) OnCacheDownload(ctx context.Context, span *TargetArtifactCacheSpan) (context.Context, SpanHook) OnCacheUpload(ctx context.Context, span *TargetArtifactCacheSpan) (context.Context, SpanHook) OnRunPrepare(ctx context.Context, span *TargetSpan) (context.Context, SpanHook) OnRunExec(ctx context.Context, span *TargetExecSpan) (context.Context, SpanHook) OnCollectOutput(ctx context.Context, span *TargetSpan) (context.Context, SpanHook) OnLocalCacheStore(ctx context.Context, span *TargetSpan) (context.Context, SpanHook) OnLocalCacheCheck(ctx context.Context, span *TargetArtifactCacheSpan) (context.Context, SpanHook) OnExternalCacheGet(ctx context.Context, span *ExternalCacheGetSpan) (context.Context, SpanHook) OnLogs(ctx context.Context) io.Writer }
type Observability ¶
type Observability struct {
// contains filtered or unexported fields
}
func NewTelemetry ¶
func NewTelemetry() *Observability
func (*Observability) LogsWriter ¶
func (t *Observability) LogsWriter(ctx context.Context) io.Writer
func (*Observability) RegisterHook ¶
func (t *Observability) RegisterHook(h Hook)
func (*Observability) SpanCacheDownload ¶
func (*Observability) SpanCacheUpload ¶
func (*Observability) SpanCollectOutput ¶
func (t *Observability) SpanCollectOutput(ctx context.Context, target *graph.Target) (context.Context, *TargetSpan)
func (*Observability) SpanExternalCacheGet ¶
func (*Observability) SpanGenPass ¶
func (*Observability) SpanLocalCacheCheck ¶
func (t *Observability) SpanLocalCacheCheck(ctx context.Context, target *graph.Target, artifact artifacts.Artifact) (context.Context, *TargetArtifactCacheSpan)
func (*Observability) SpanLocalCacheStore ¶
func (t *Observability) SpanLocalCacheStore(ctx context.Context, target *graph.Target) (context.Context, *TargetSpan)
func (*Observability) SpanRun ¶
func (t *Observability) SpanRun(ctx context.Context, target *graph.Target) (context.Context, *TargetSpan)
func (*Observability) SpanRunExec ¶
func (t *Observability) SpanRunExec(ctx context.Context, target *graph.Target) (context.Context, *TargetExecSpan)
func (*Observability) SpanRunPrepare ¶
func (t *Observability) SpanRunPrepare(ctx context.Context, target *graph.Target) (context.Context, *TargetSpan)
type SpanCacheHit ¶
type SpanCacheHit interface {
IsCacheHit() *bool
}
type SpanHook ¶
type SpanHook interface { OnSchedule() OnQueued() OnStart() OnEnd() }
func AllSpanHook ¶
func AllSpanHook(f func()) SpanHook
func FinalizerSpanHook ¶
func FinalizerSpanHook(f func()) SpanHook
type SpanHookFunc ¶
type SpanHookFunc struct { OnScheduleFunc func() OnQueuedFunc func() OnStartFunc func() OnEndFunc func() }
func (SpanHookFunc) OnEnd ¶
func (s SpanHookFunc) OnEnd()
func (SpanHookFunc) OnQueued ¶
func (s SpanHookFunc) OnQueued()
func (SpanHookFunc) OnSchedule ¶
func (s SpanHookFunc) OnSchedule()
func (SpanHookFunc) OnStart ¶
func (s SpanHookFunc) OnStart()
type SpanTarget ¶
type SpanTargetArtifact ¶
type SpanTargetArtifact interface { SpanTarget Artifact() artifacts.Artifact }
type TargetArtifactCacheSpan ¶
type TargetArtifactCacheSpan struct { TargetArtifactSpan Cache string // contains filtered or unexported fields }
func (*TargetArtifactCacheSpan) IsCacheHit ¶
func (s *TargetArtifactCacheSpan) IsCacheHit() *bool
func (*TargetArtifactCacheSpan) SetCacheHit ¶
func (s *TargetArtifactCacheSpan) SetCacheHit(v bool)
type TargetArtifactSpan ¶
type TargetArtifactSpan struct { TargetSpan // contains filtered or unexported fields }
func (*TargetArtifactSpan) Artifact ¶
func (s *TargetArtifactSpan) Artifact() artifacts.Artifact
type TargetExecSpan ¶
type TargetExecSpan struct { TargetSpan ExecId uuid.UUID }
type TargetSpan ¶
type TargetSpan struct { BaseSpan // contains filtered or unexported fields }
func (*TargetSpan) Target ¶
func (s *TargetSpan) Target() *graph.Target
Click to show internal directories.
Click to hide internal directories.