package
6.2.24+incompatible
Repository: https://github.com/travis-ci/worker.git
Documentation: pkg.go.dev
# Functions
CaptureError takes an error and captures the details about it and sends it off to Sentry, if Sentry has been set up.
ComponentFromContext returns the component name stored in the context with FromComponent.
FromComponent generates a new context with the given context as its parent and stores the given component name with the context.
FromInstanceID generates a new context with the given context as its parent and stores the given instance ID with the context.
FromJobID generates a new context with the given context as its parent and stores the given job ID with the context.
FromJWT generates a new context with the given context as its parent and stores the given JWT with the context.
FromProcessor generates a new context with the given context as its parent and stores the given processor ID with the context.
FromRepository generates a new context with the given context as its parent and stores the given repository name with the context.
FromUUID generates a new context with the given context as its parent and stores the given UUID with the context.
InstanceIDFromContext returns the instance ID stored in the context with FromInstanceID.
JobIDFromContext returns the job ID stored in the context with FromJobID.
JWTFromContext returns the jwt stored in the context with FromJWT.
LoggerFromContext returns a logrus.Entry with the PID of the current process set as a field, and also includes every field set using the From* functions this package.
LoggerTimingsFromContext returns a set of logrus fields.
ProcessorFromContext returns the processor name stored in the context with FromProcessor.
RepositoryFromContext returns the repository name stored in the context with FromRepository.
TimeSince accumulates timing over the course of a request, it returns "total time this request spent doing X".
TimingsFromContext returns the timings stored within the context.
UUIDFromContext returns the UUID stored in the context with FromUUID.
WithTimings initializes the timings map in the context, to be mutated by TimeSince for accumulated timings per request.