MCPcopy
hub / github.com/containerd/containerd / FromContext

Function FromContext

pkg/epoch/context.go:35–41  ·  view source on GitHub ↗

FromContext returns the epoch associated with the context. FromContext does not fall back to read the SOURCE_DATE_EPOCH env var.

(ctx context.Context)

Source from the content-addressed store, hash-verified

33// FromContext returns the epoch associated with the context.
34// FromContext does not fall back to read the SOURCE_DATE_EPOCH env var.
35func FromContext(ctx context.Context) *time.Time {
36 v := ctx.Value(epochKey{})
37 if v == nil {
38 return nil
39 }
40 return v.(*time.Time)
41}

Callers 9

CreateMethod · 0.92
UpdateMethod · 0.92
CompareMethod · 0.92
CreateMethod · 0.92
UpdateMethod · 0.92
WriteDiffFunction · 0.92
CompareMethod · 0.92
CompareMethod · 0.92
CompareMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…