MCPcopy Create free account

hub / github.com/caddyserver/caddy / functions

Functions2,647 in github.com/caddyserver/caddy

↓ 16 callersMethodBool
Bool returns the boolean representation of the flag given by name. It returns false if the flag is not a boolean type. It panics if the flag is not in
cmd/main.go:320
↓ 16 callersMethodNewFromNextSegment
NewFromNextSegment returns a new dispenser with a copy of the tokens from the current token until the end of the "directive" whether that be to the en
caddyconfig/caddyfile/dispenser.go:351
↓ 16 callersMethodSelect
Select returns an available host, if any.
modules/caddyhttp/reverseproxy/selectionpolicies.go:131
↓ 16 callersMethodUnmarshalCaddyfile
(d *Dispenser)
caddyconfig/caddyfile/adapter.go:107
↓ 16 callersFunctionWrapCommandFuncForCobra
WrapCommandFuncForCobra wraps a Caddy CommandFunc for use in a cobra command's RunE field.
cmd/cobra.go:149
↓ 15 callersFunctionCELMatcherImpl
CELMatcherImpl creates a new cel.Library based on the following pieces of data: - macroName: the function name to be used within CEL. This will be a
modules/caddyhttp/celmatcher.go:391
↓ 15 callersMethodClose
()
modules/caddyhttp/reverseproxy/reverseproxy.go:1816
↓ 15 callersMethodDo
Do makes the request and returns an io.Reader that translates the data read from the FastCGI responder out of FastCGI packets before returning it.
modules/caddyhttp/reverseproxy/fastcgi/client.go:140
↓ 15 callersMethodHealthy
Healthy returns true if the remote host is currently known to be healthy or "up". It consults the circuit breaker, if any.
modules/caddyhttp/reverseproxy/hosts.go:85
↓ 15 callersMethodPortRangeSize
PortRangeSize returns how many ports are in pa's port range. Port ranges are inclusive, so the size is the difference of start and end ports plus one.
listeners.go:251
↓ 15 callersFunctionRegisterCommand
RegisterCommand registers the command cmd. cmd.Name must be unique and conform to the following format: - lowercase - ASCII lowercase letters, digits
cmd/commands.go:578
↓ 15 callersFunctiondetermineTrustedProxy
determineTrustedProxy parses the remote IP address of the request, and determines (if the server configured it) if the client is a trusted proxy. If t
modules/caddyhttp/server.go:1029
↓ 15 callersFunctionspecificity
specificity returns len(s) minus any wildcards (*) and placeholders ({...}). Basically, it's a length count that penalizes the use of wildcards and pl
caddyconfig/httpcaddyfile/httptype.go:1726
↓ 15 callersFunctiontestPool
()
modules/caddyhttp/reverseproxy/selectionpolicies_test.go:28
↓ 14 callersMethodError
()
cmd/cobra.go:166
↓ 14 callersFunctionNewDispenser
NewDispenser returns a Dispenser filled with the given tokens.
caddyconfig/caddyfile/dispenser.go:40
↓ 14 callersFunctionRegisterDirective
RegisterDirective registers a unique directive dir with an associated unmarshaling (setup) function. When directive dir is encountered in a Caddyfile,
caddyconfig/httpcaddyfile/directives.go:109
↓ 14 callersMethodString
()
cmd/packagesfuncs.go:349
↓ 13 callersMethodAdapt
Adapt converts the Caddyfile config in body to Caddy JSON.
caddyconfig/caddyfile/adapter.go:32
↓ 13 callersMethodAssertResponse
AssertResponse requests a URI and asserts the status code and body.
caddytest/caddytest.go:522
↓ 13 callersMethodDeleteN
DeleteN is the same as Delete, but can delete many tokens at once. If there aren't N tokens available to delete, none are deleted.
caddyconfig/caddyfile/dispenser.go:465
↓ 13 callersMethodIsFdNetwork
IsFdNetwork returns true if na.Network is fd or fdgram.
listeners.go:215
↓ 12 callersMethodAddString
AddString is part of the zapcore.ObjectEncoder interface.
modules/logging/nopencoder.go:74
↓ 12 callersMethodApp
App returns the configured app named name. If that app has not yet been loaded and provisioned, it will be immediately loaded and provisioned. If no a
context.go:505
↓ 12 callersMethodConvertToNative
(typeDesc reflect.Type)
modules/caddyhttp/celmatcher.go:326
↓ 12 callersMethodFile
File gets the filename where the current token originated.
caddyconfig/caddyfile/dispenser.go:259
↓ 12 callersMethodID
()
caddy.go:1150
↓ 12 callersFunctionNewResponseRecorder
NewResponseRecorder returns a new ResponseRecorder that can be used instead of a standard http.ResponseWriter. The recorder is useful for middlewares
modules/caddyhttp/responsewriter.go:137
↓ 12 callersMethodSize
()
modules/caddyhttp/responsewriter.go:322
↓ 12 callersMethodValidate
()
modules.go:306
↓ 12 callersFunctiongetContextOrFail
(t *testing.T)
modules/caddyhttp/templates/tplcontext_test.go:684
↓ 12 callersFunctionnewMetricsInstrumentedRoute
(ctx caddy.Context, handler string, next Handler, m *Metrics)
modules/caddyhttp/metrics.go:306
↓ 12 callersFunctiontrustedRealClientIP
trustedRealClientIP finds the client IP from the request assuming it is from a trusted client. If there is no client IP headers, then the direct remot
modules/caddyhttp/server.go:1091
↓ 11 callersMethodEqual
(x crypto.PublicKey)
admin_test.go:62
↓ 11 callersFunctionNewReplacer
NewReplacer returns a new Replacer.
replacer.go:34
↓ 11 callersMethodNewRoute
NewRoute returns config values relevant to creating a new HTTP route.
caddyconfig/httpcaddyfile/directives.go:280
↓ 11 callersMethodOpen
(name string)
internal/filesystems/os.go:18
↓ 11 callersMethodOpenWriter
OpenWriter opens a new file writer.
modules/logging/filewriter.go:187
↓ 11 callersMethodString
()
modules/caddyhttp/reverseproxy/upstreams.go:435
↓ 11 callersMethodWrite
(p []byte)
modules/caddyhttp/reverseproxy/fastcgi/writer.go:46
↓ 11 callersMethodfillDynamicHost
fillDynamicHost is like fillHost, but stores the host in the separate dynamicHosts map rather than the reference-counted UsagePool. Dynamic hosts are
modules/caddyhttp/reverseproxy/hosts.go:143
↓ 11 callersFunctionnewPassiveHandler
newPassiveHandler builds a minimal Handler with passive health checks configured and a live caddy.Context so the fail-forgetter goroutine can be cance
modules/caddyhttp/reverseproxy/passive_health_test.go:28
↓ 11 callersMethodprovisionUpstream
(upstream *Upstream, dynamic bool)
modules/caddyhttp/reverseproxy/reverseproxy.go:1428
↓ 11 callersFunctiontestParser
(input string)
caddyconfig/caddyfile/parse_test.go:1034
↓ 10 callersMethodAssertRedirect
AssertRedirect makes a request and asserts the redirection happens
caddytest/caddytest.go:376
↓ 10 callersFunctionCaddyfileHeaderOp
CaddyfileHeaderOp applies a new header operation according to field, value, and replacement. The field can be prefixed with "+" or "-" to specify addi
modules/caddyhttp/headers/caddyfile.go:221
↓ 10 callersMethodClone
Clone returns a deep copy of the token.
caddyconfig/caddyfile/lexer.go:363
↓ 10 callersMethodClose
Close writes any remaining buffered response and deallocates any active resources.
modules/caddyhttp/encode/encode.go:415
↓ 10 callersMethodGetKeysText
()
caddyconfig/caddyfile/parse.go:784
↓ 10 callersMethodJSON
JSON converts val into JSON. Any errors are added to warnings.
caddyconfig/httpcaddyfile/directives.go:242
↓ 10 callersFunctionNewTestReplacer
NewTestReplacer creates a replacer for an http.Request for use in tests that are not in this package
modules/caddyhttp/replacer.go:50
↓ 10 callersFunctionaddHTTPVarsToReplacer
(repl *caddy.Replacer, req *http.Request, w http.ResponseWriter)
modules/caddyhttp/replacer.go:58
↓ 10 callersFunctionprepareTestRequest
prepareTestRequest injects the context values that ServeHTTP and proxyLoopIteration require (caddy.ReplacerCtxKey, VarsCtxKey, etc.) using the same he
modules/caddyhttp/reverseproxy/retries_test.go:28
↓ 9 callersMethodClone
Clone is part of the zapcore.ObjectEncoder interface. We don't use it as of Oct 2019 (v2 beta 7), I'm not really sure what it'd be useful for in our c
modules/logging/nopencoder.go:106
↓ 9 callersMethodFlush
()
modules/caddyhttp/encode/encode.go:575
↓ 9 callersMethodGetMetricsRegistry
Returns the active metrics registry for the context EXPERIMENTAL: This API is subject to change.
context.go:115
↓ 9 callersMethodSelect
Select returns an available host, if any.
modules/caddyhttp/reverseproxy/selectionpolicies.go:489
↓ 9 callersMethodString
()
modules/logging/netwriter.go:83
↓ 9 callersMethodparseAll
()
caddyconfig/caddyfile/parse.go:122
↓ 9 callersFunctionsendFcgi
(reqType int, fcgiParams map[string]string, data []byte, posts map[string]string, files map[string]string)
modules/caddyhttp/reverseproxy/fastcgi/client_test.go:119
↓ 8 callersMethodAvailable
Available returns true if the remote host is available to receive requests. This is the method that should be used by selection policies, etc. to dete
modules/caddyhttp/reverseproxy/hosts.go:78
↓ 8 callersMethodCertMagicStorage
()
storage.go:32
↓ 8 callersMethodDelete
Delete deletes the current token and returns the updated slice of tokens. The cursor is not advanced to the next token. Because deletion modifies the
caddyconfig/caddyfile/dispenser.go:455
↓ 8 callersMethodExtractMatcherSet
ExtractMatcherSet is like MatcherToken, except this is a higher-level method that returns the matcher set described by the matcher token, or nil if th
caddyconfig/httpcaddyfile/directives.go:262
↓ 8 callersMethodFilter
Filter filters the input field.
modules/logging/filters.go:243
↓ 8 callersMethodGetACMEIssuer
()
caddyconfig/httpcaddyfile/tlsapp.go:514
↓ 8 callersFunctionGetAdapter
GetAdapter returns the adapter with the given name, or nil if one with that name is not registered.
caddyconfig/configadapters.go:121
↓ 8 callersFunctionSanitizedPathJoin
SanitizedPathJoin performs filepath.Join(root, reqPath) that is safe against directory traversal attacks. It uses logic similar to that in the Go stan
modules/caddyhttp/caddyhttp.go:252
↓ 8 callersMethodString
Lazy generates UUID string or return cached value if present
modules/caddyhttp/replacer.go:572
↓ 8 callersMethodType
()
modules/caddyhttp/celmatcher.go:343
↓ 8 callersMethodhandleError
(w http.ResponseWriter, r *http.Request, err error)
admin.go:885
↓ 8 callersFunctionminimalHandlerWithRetryMatch
minimalHandlerWithRetryMatch is like minimalHandler but also configures RetryMatch so that response-based retry can be tested
modules/caddyhttp/reverseproxy/retries_test.go:276
↓ 8 callersMethodprotocol
protocol returns true if the protocol proto is configured/enabled.
modules/caddyhttp/server.go:915
↓ 7 callersMethodAddOperation
AddOperation adds a single regexp operation to the filter with validation. This is used when merging multiple RegexpFilter instances.
modules/logging/filters.go:824
↓ 7 callersMethodAssertPostResponseBody
AssertPostResponseBody requests a URI with POST and asserts the response code and body.
caddytest/caddytest.go:569
↓ 7 callersMethodClose
()
modules/caddyhttp/reverseproxy/fastcgi/client.go:193
↓ 7 callersMethodCompileOptions
()
modules/caddyhttp/celmatcher.go:457
↓ 7 callersMethodGetString
GetString is the same as Get, but coerces the value to a string representation as efficiently as possible.
replacer.go:111
↓ 7 callersMethodInt
Int returns the integer representation of the flag given by name. It returns 0 if the flag is not an integer type. It panics if the flag is not in the
cmd/main.go:329
↓ 7 callersFunctionIsUnixNetwork
IsUnixNetwork returns true if the netw is a unix network.
listeners.go:299
↓ 7 callersMethodIsValid
()
modules/logging/filters.go:298
↓ 7 callersMethodNewEncoder
()
modules/caddyhttp/encode/encode.go:582
↓ 7 callersFunctionPrivateRangesCIDR
PrivateRangesCIDR returns a list of private CIDR range strings, which can be used as a configuration shortcut.
internal/ranges.go:5
↓ 7 callersMethodProgramOptions
()
modules/caddyhttp/celmatcher.go:461
↓ 7 callersMethodProvision
Provision compiles all regexp patterns with security validation.
modules/logging/filters.go:728
↓ 7 callersFunctionRegisterModule
RegisterModule registers a module by receiving a plain/empty value of the module. For registration to be properly recorded, this should be called in t
modules.go:138
↓ 7 callersMethodSelect
Select returns an available host, if any.
modules/caddyhttp/reverseproxy/selectionpolicies.go:440
↓ 7 callersMethodSelect
Select returns an available host, if any.
modules/caddyhttp/reverseproxy/selectionpolicies.go:654
↓ 7 callersFunctionallNew
(upstreams []Upstream)
modules/caddyhttp/reverseproxy/upstreams.go:551
↓ 7 callersFunctionassertPlaceholderAbsent
(t *testing.T, repl *caddy.Replacer, key string)
modules/caddyhttp/caddyauth/caddyauth_test.go:182
↓ 7 callersFunctioncallAdminUpstreams
callAdminUpstreams fires a GET against handleUpstreams and returns the decoded response body.
modules/caddyhttp/reverseproxy/admin_test.go:60
↓ 7 callersFunctionnewExpressionMatcher
newExpressionMatcher provisions a MatchExpression for use in tests
modules/caddyhttp/reverseproxy/retries_test.go:263
↓ 6 callersMethodAdapt
(body []byte, options map[string]any)
caddyconfig/configadapters.go:27
↓ 6 callersMethodAddUint16
AddUint16 is part of the zapcore.ObjectEncoder interface.
modules/logging/nopencoder.go:89
↓ 6 callersMethodAppIfConfigured
AppIfConfigured is like App, but it returns an error if the app has not been configured. This is useful when the app is required and its absence is a
context.go:530
↓ 6 callersMethodAssertResponseCode
AssertResponseCode will execute the request and verify the status code, returns a response for additional assertions
caddytest/caddytest.go:506
↓ 6 callersMethodBuffered
()
modules/caddyhttp/responsewriter.go:321
↓ 6 callersFunctionCleanPath
CleanPath cleans path p according to path.Clean(), but only merges repeated slashes if collapseSlashes is true, and always preserves trailing slashes.
modules/caddyhttp/caddyhttp.go:279
↓ 6 callersMethodDirective
Directive returns the directive name for the segment. The directive name is the text of the first token.
caddyconfig/caddyfile/parse.go:811
↓ 6 callersMethodFilter
Filter applies all regexp operations sequentially to the input field. Input is sanitized and validated for security.
modules/logging/filters.go:785
← previousnext →101–200 of 2,647, ranked by callers