Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Shopify/goose
/ functions
Functions
660 in github.com/Shopify/goose
⨍
Functions
660
◇
Types & classes
129
↓ 4 callers
Function
HandlerServlet
HandlerServlet creates a Servlet from a Handler, which implements ServeHTTP.
srvutil/servlet.go:36
↓ 4 callers
Function
LogIfError
LogIfError makes it less verbose to defer a Close() call while handling an unlikely-but-possible error return by logging it. Example: defer LogIfErr
logger/logger.go:77
↓ 4 callers
Function
NewForwardingBackend
NewForwardingBackend creates a new Backend that sends all metrics to a ForwardHandler
statsd/forwarding_backend.go:11
↓ 4 callers
Function
PrefixServlet
PrefixServlet registers a whole Servlet under a path prefix.
srvutil/servlet.go:43
↓ 4 callers
Method
ReadByte
()
syncio/buffer.go:58
↓ 4 callers
Method
ReadRune
()
syncio/buffer.go:40
↓ 4 callers
Method
Record
(duration time.Duration)
timetracker/tracker.go:9
↓ 4 callers
Method
ResponseBody
()
srvutil/recorder.go:19
↓ 4 callers
Method
RunAndWait
RunAndWait starts all components in this `Main`. `RunAndWait` will also listen to SIGINT and SIGTERM to do graceful shutdowns of all components it ma
genmain/genmain.go:181
↓ 4 callers
Method
Running
Running returns a (racy) counter of how many Run calls are currently executing their function.
concurrency/limiter.go:27
↓ 4 callers
Method
String
()
shell/shell_test.go:87
↓ 4 callers
Method
UnreadByte
()
syncio/buffer.go:70
↓ 4 callers
Function
WatchingTaggable
WatchingTaggable attaches a Taggable to a Context. When a metric is recorded, StatsTags() will be called and the tags will be appended.
statsd/taggable.go:80
↓ 4 callers
Method
WriteByte
(c byte)
syncio/buffer.go:76
↓ 4 callers
Function
buildLogger
()
logger/logger_test.go:15
↓ 4 callers
Method
deltaAndMaybePublish
(ctx context.Context, ptr *int32, delta int32, state string)
concurrency/limiter.go:102
↓ 4 callers
Function
newHangingComponent
(hangTime time.Duration)
genmain/genmain_test.go:43
↓ 4 callers
Function
newMap
(interval time.Duration)
lockmap/map_test.go:47
↓ 4 callers
Function
newTestRequest
(path string)
srvutil/request_test.go:74
↓ 4 callers
Function
runAndPerform
(t *testing.T, perform func(*genmain.Main, *testComponent))
genmain/genmain_test.go:228
↓ 3 callers
Function
CombineServlets
CombineServlets combines all Servlets into one, without other modifications. Great for splitting the dependency managements into smaller servlets.
srvutil/servlet.go:61
↓ 3 callers
Function
ContextLog
(ctx Valuer, err []error, entry *logrus.Entry)
logger/logger.go:33
↓ 3 callers
Method
ContextWait
ContextWait waits for a signal while the context is not Done. Requires L to be locked. Returns whether it received the signal.
cond/cond.go:65
↓ 3 callers
Method
Distribution
Distribution tracks the statistical distribution of a set of values across your infrastructure.
statsd/statsd.go:32
↓ 3 callers
Function
Headers
(headers http.Header)
redact/redact.go:49
↓ 3 callers
Method
IsInitial
()
statetracker/notification.go:19
↓ 3 callers
Method
LogFields
()
logger/loggable.go:17
↓ 3 callers
Function
Map
(data map[string]interface{})
redact/redact.go:35
↓ 3 callers
Method
MaxConcurrency
()
concurrency/limiter.go:29
↓ 3 callers
Function
New
(initial interface{})
statetracker/tracker.go:33
↓ 3 callers
Function
New
New creates a new `Main`
genmain/genmain.go:47
↓ 3 callers
Function
NewBufferString
(s string)
syncio/buffer.go:159
↓ 3 callers
Function
NewRequestMetricsMiddleware
NewRequestMetricsMiddleware records the time taken to serve a request, and logs request and response data. Example tags: statusClass:2xx, statusCode:2
srvutil/metrics.go:16
↓ 3 callers
Function
NewRetryResolver
(resolver Resolver, backoffs []time.Duration)
resolver/retry_resolver.go:18
↓ 3 callers
Method
Next
(n int)
syncio/buffer.go:94
↓ 3 callers
Method
Read
([]byte)
syncio/buffer_test.go:20
↓ 3 callers
Function
Recover
Recover recovers a panic, if any, and submits it to bugsnag through logrus (assuming that handler is registered) before terminating the program for re
safely/safely.go:33
↓ 3 callers
Method
Release
Release unlocks a key and resolved the previous Promise, if any.
lockmap/map.go:24
↓ 3 callers
Method
Run
(ctx context.Context, fn func() error)
concurrency/throttler.go:20
↓ 3 callers
Method
Start
()
profiler/profiler.go:16
↓ 3 callers
Method
TimeoutWait
TimeoutWait waits for a signal for up to a duration. Requires L to be locked. Returns whether it received the signal.
cond/cond.go:48
↓ 3 callers
Method
Truncate
(n int)
syncio/buffer.go:106
↓ 3 callers
Method
UnreadRune
()
syncio/buffer.go:46
↓ 3 callers
Function
WatchingLoggable
WatchingLoggable attaches a Loggable to the Context. Upon logging, LogFields will be called and the fields will be attached as metadata.
logger/loggable.go:79
↓ 3 callers
Method
WithContextCancellation
(gracefulTimeout time.Duration)
shell/builder.go:18
↓ 3 callers
Function
WithUUID
(ctx context.Context)
logger/uuid.go:13
↓ 3 callers
Method
Write
([]byte)
srvutil/metrics_test.go:100
↓ 3 callers
Method
WriteHeader
(statusCode int)
srvutil/metrics_test.go:104
↓ 3 callers
Function
assertResolved
(promise Promise)
lockmap/map_test.go:53
↓ 3 callers
Function
defaultTagsFromEnv
()
statsd/default_tags.go:13
↓ 3 callers
Function
fillString
Fill buf through n writes of string fus. The initial contents of buf corresponds to the string s; the result is the final contents of buf returned as
syncio/buffer_test.go:54
↓ 3 callers
Function
getStatsTagsMap
getStatsTagsMap returns the merged tags as a map
statsd/taggable.go:104
↓ 3 callers
Method
killIgnoreDead
(signal syscall.Signal)
shell/supervisor.go:107
↓ 3 callers
Function
newBugsnagger
(config *bugsnaggo.Configuration, notifier notifier)
bugsnag/bugsnagger.go:43
↓ 2 callers
Method
AutoRecover
AutoRecover when deferred, records a panic to Bugsnag and recovers.
bugsnag/bugsnagger.go:178
↓ 2 callers
Function
BuildContext
(r *http.Request)
srvutil/request.go:69
↓ 2 callers
Method
Count
Count tracks how many times something happened per second.
statsd/statsd.go:28
↓ 2 callers
Method
End
()
profiler/profiler.go:17
↓ 2 callers
Function
EnvVarHeaderMiddleware
EnvVarHeaderMiddleware will expose environment variables as HTTP response headers. It can be used with github.com/gorilla/mux:Router.Use or wrapping a
srvutil/env_var_middleware.go:10
↓ 2 callers
Method
Error
()
logger/logger_test.go:41
↓ 2 callers
Method
Error
()
genmain/genmain.go:59
↓ 2 callers
Function
EstimatedWaitTime
(limiter Limiter, average time.Duration)
concurrency/wait_time.go:5
↓ 2 callers
Method
Gauge
Gauge measures the value of a metric at a particular time.
statsd/statsd.go:26
↓ 2 callers
Method
Grow
(n int)
syncio/buffer.go:112
↓ 2 callers
Method
Histogram
Histogram tracks the statistical distribution of a set of values on each host.
statsd/statsd.go:30
↓ 2 callers
Method
Int63
()
random/locked.go:23
↓ 2 callers
Function
IsSensitive
(key string)
redact/redact.go:26
↓ 2 callers
Function
New
(sweepInterval time.Duration, tomb *tomb.Tomb)
lockmap/map.go:31
↓ 2 callers
Function
NewBugsnagHook
NewBugsnagHook initializes a logrus hook which sends exceptions to an exception-tracking service compatible with the Bugsnag API. Before using this ho
logrusbugsnag/bugsnag.go:43
↓ 2 callers
Function
NewDatadogBackend
NewDatadogBackend instantiates a new datadog/statsd connection. When running in containers at shopify, the endpoint should generally be "localhost:812
statsd/datadog_backend.go:18
↓ 2 callers
Function
NewDummy
NewDummy returns a rand.Rand seeded with 0.
random/dummy.go:6
↓ 2 callers
Function
NewExponentialMovingAverageTracker
(window uint)
timetracker/ema_tracker.go:10
↓ 2 callers
Function
NewLimiterWithSampledGauge
NewLimiterWithSampledGauge creates a Limiter that will publish the a gauge every <sampling> Run
concurrency/limiter.go:64
↓ 2 callers
Function
NewLocked
NewLocked returns a rand.Rand with a random source protected by a mutex. To be used for concurrent access.
random/locked.go:9
↓ 2 callers
Function
NewLockedSource
NewLockedSource wraps the Source with a mutex. To be used for concurrent access.
random/locked.go:14
↓ 2 callers
Function
NewLogBackend
NewLogBackend creates a new Backend that emits statsd metrics to the logger. namespace is a global namespace to apply to every metric emitted. tags i
statsd/log_backend.go:14
↓ 2 callers
Function
NewMockLimiter
(stubRun bool)
concurrency/limiter_mock.go:11
↓ 2 callers
Function
NewMockResolver
()
resolver/resolver_mock.go:16
↓ 2 callers
Function
NewNetResolver
(resolver *net.Resolver)
resolver/net_resolver.go:7
↓ 2 callers
Function
NewServerFromFactory
(t *tomb.Tomb, servlet Servlet, factory ServerFactory)
srvutil/server.go:38
↓ 2 callers
Function
NewShuffleResolver
(lookup Resolver)
resolver/shuffle_resolver.go:16
↓ 2 callers
Function
NewSource
NewSource returns a rand.Source seeded with the current time with nanoseconds precision.
random/random.go:14
↓ 2 callers
Method
Query
(sql string)
srvutil/servlet_test.go:18
↓ 2 callers
Method
ReadBytes
(delim byte)
syncio/buffer.go:64
↓ 2 callers
Method
ReadFrom
(r io.Reader)
syncio/buffer.go:28
↓ 2 callers
Method
ReadString
(delim byte)
syncio/buffer.go:82
↓ 2 callers
Function
RealIPMiddleware
()
srvutil/real_ip.go:9
↓ 2 callers
Function
SecurityHeaderMiddleware
SecurityHeaderMiddleware set default security headers.
srvutil/security.go:59
↓ 2 callers
Method
SetShutdownDeadline
(d time.Duration)
genmain/genmain.go:172
↓ 2 callers
Method
StatsTags
()
statsd/taggable.go:20
↓ 2 callers
Method
StatusCode
()
srvutil/recorder.go:18
↓ 2 callers
Method
Timing
Timing sends timing information, it is an alias for TimeInMilliseconds
statsd/statsd.go:36
↓ 2 callers
Method
TombWait
TombWait waits for a signal while the tomb is not dead. Requires L to be locked. Returns whether it received the signal.
cond/cond.go:58
↓ 2 callers
Method
Wait
(ctx context.Context, desired interface{})
statetracker/tracker.go:20
↓ 2 callers
Method
WithEnv
(env Env)
shell/builder.go:15
↓ 2 callers
Function
WithLoggable
WithLoggable attaches a Loggable's fields to the Context. Upon logging, those fields will be attached as metadata.
logger/loggable.go:73
↓ 2 callers
Function
WithTag
WithTag attaches a key-value pair to a Context. Upon recording a metric, the pair will be attached as a tag.
statsd/taggable.go:59
↓ 2 callers
Method
WriteTo
(w io.Writer)
syncio/buffer.go:34
↓ 2 callers
Function
assertNotResolved
(promise Promise)
lockmap/map_test.go:61
↓ 2 callers
Function
createFile
(name string)
profiler/profiler.go:111
← previous
next →
101–200 of 660, ranked by callers