MCPcopy Create free account

hub / github.com/caddyserver/caddy / functions

Functions2,647 in github.com/caddyserver/caddy

↓ 6 callersFunctionFormat
Format formats the input Caddyfile to a standard, nice-looking appearance. It works by reading each rune of the input and taking control over all the
caddyconfig/caddyfile/formatter.go:30
↓ 6 callersMethodHandle
(context.Context, caddy.Event)
modules/caddyevents/app.go:328
↓ 6 callersMethodLine
Line gets the line number of the current token. If there is no token loaded, it returns 0.
caddyconfig/caddyfile/dispenser.go:251
↓ 6 callersFunctionLoadConfig
LoadConfig loads the config from configFile and adapts it using adapterName. If adapterName is specified, configFile must be also. If no configFile is
cmd/main.go:108
↓ 6 callersMethodLoadOrNew
LoadOrNew loads the value associated with key from the pool if it already exists. If the key doesn't exist, it will call construct to create a new val
usagepool.go:77
↓ 6 callersFunctionNewMatcherCELLibrary
NewMatcherCELLibrary creates a matcherLibrary from option setes.
modules/caddyhttp/celmatcher.go:450
↓ 6 callersMethodNumRequests
NumRequests returns the number of active requests to the upstream.
modules/caddyhttp/reverseproxy/hosts.go:184
↓ 6 callersFunctionParseSegmentAsSubroute
ParseSegmentAsSubroute parses the segment such that its subdirectives are themselves treated as directives, from which a subroute is built and returne
caddyconfig/httpcaddyfile/directives.go:344
↓ 6 callersMethodPrev
Prev moves to the previous token. It does the inverse of Next(), except this function may decrement the cursor to -1 so that the next call to Next() p
caddyconfig/caddyfile/dispenser.go:74
↓ 6 callersMethodSelect
Select returns an available host, if any.
modules/caddyhttp/reverseproxy/selectionpolicies.go:310
↓ 6 callersMethodStatus
()
modules/caddyhttp/responsewriter.go:319
↓ 6 callersFunctionassertPlaceholder
(t *testing.T, repl *caddy.Replacer, key, expected string)
modules/caddyhttp/caddyauth/caddyauth_test.go:171
↓ 6 callersFunctionchangeConfig
changeConfig changes the current config (rawCfg) according to the method, traversed via the given path, and uses the given input as the new value (if
caddy.go:158
↓ 6 callersMethodcountFail
countFail mutates the recent failures count by delta. It returns an error if the adjustment fails.
modules/caddyhttp/reverseproxy/hosts.go:215
↓ 6 callersMethoddialAddr
()
modules/caddyhttp/reverseproxy/addresses.go:31
↓ 6 callersFunctionfileHidden
fileHidden returns true if filename is hidden according to the hide list. filename must be a relative or absolute file system path, not a request URI
modules/caddyhttp/fileserver/staticfiles.go:684
↓ 6 callersMethodfuzzy
fuzzy returns true if the given hostname h is not a specific hostname, e.g. has placeholders or wildcards.
modules/caddyhttp/matchers.go:394
↓ 6 callersFunctionhostByHashing
hostByHashing returns an available host from pool based on a hashable string s.
modules/caddyhttp/reverseproxy/selectionpolicies.go:836
↓ 6 callersMethodhttpsPort
()
modules/caddyhttp/app.go:820
↓ 6 callersFunctionisCELStringExpr
isCELStringExpr indicates whether the expression is a supported string expression
modules/caddyhttp/celmatcher.go:733
↓ 6 callersMethodlogRequest
logRequest logs the request to access logs, unless skipped.
modules/caddyhttp/server.go:843
↓ 6 callersFunctionpemDecodeCertificateChain
(pemDER []byte)
modules/caddypki/crypto.go:47
↓ 6 callersMethodport
()
listeners.go:281
↓ 6 callersFunctiontestProxyProtocolMatrix
testProxyProtocolMatrix is the shared implementation for the proxy protocol tests. It: 1. Starts a go-proxyproto-wrapped backend. 2. Configures Caddy
caddytest/integration/proxyprotocol_test.go:475
↓ 5 callersMethodApplyTo
ApplyTo applies ops to hdr using repl.
modules/caddyhttp/headers/headers.go:220
↓ 5 callersFunctionAssertLoadError
AssertLoadError will load a config and expect an error
caddytest/caddytest.go:364
↓ 5 callersMethodCompare
Compare returns true if the result of hashing plaintextPassword is hashedPassword, false otherwise. An error is returned only if there is a technical/
modules/caddyhttp/caddyauth/basicauth.go:269
↓ 5 callersMethodCookie
Cookie gets the value of a cookie with name.
modules/caddyhttp/templates/tplcontext.go:270
↓ 5 callersMethodFlushTo
(*zap.Logger)
internal/logbuffer.go:34
↓ 5 callersMethodGetContextString
GetContextString gets the value of a key in the context map as a string, or an empty string if the key does not exist.
caddyconfig/caddyfile/dispenser.go:491
↓ 5 callersMethodManage
Manage immediately begins managing subjects according to the matching automation policy. The subjects are given in a map to prevent duplication and al
modules/caddytls/tls.go:561
↓ 5 callersMethodMap
Map adds mapFunc to the list of value providers. mapFunc will be executed only at replace-time.
replacer.go:87
↓ 5 callersMethodNext
Next loads the next token. Returns true if a token was loaded; false otherwise. If false, all tokens have been consumed.
caddyconfig/caddyfile/dispenser.go:60
↓ 5 callersMethodNextSegment
NextSegment returns a copy of the tokens from the current token until the end of the line or block that starts at the end of the line.
caddyconfig/caddyfile/dispenser.go:358
↓ 5 callersMethodOption
Option gets the option keyed by name.
caddyconfig/httpcaddyfile/directives.go:217
↓ 5 callersFunctionParseAddress
ParseAddress parses an address string into a structured format with separate scheme, host, port, and path portions, as well as the original input stri
caddyconfig/httpcaddyfile/addresses.go:373
↓ 5 callersFunctionParseNetworkAddress
ParseNetworkAddress parses addr into its individual components. The input string is expected to be of the form "network/host:port-range" where any par
listeners.go:316
↓ 5 callersMethodPost
Post issues a POST request to the fcgi responder. with request body in the format that bodyType specified
modules/caddyhttp/reverseproxy/fastcgi/client.go:292
↓ 5 callersMethodRead
(b []byte)
modules/caddyhttp/server.go:1181
↓ 5 callersMethodRemainingArgsAsTokens
RemainingArgsAsTokens loads any more arguments (tokens on the same line) into a slice of Token-structs and returns them. Open curly brace tokens also
caddyconfig/caddyfile/dispenser.go:338
↓ 5 callersMethodRewrite
rewrite performs the rewrites on r using repl, which should have been obtained from r, but is passed in for efficiency. It returns true if any changes
modules/caddyhttp/rewrite/rewrite.go:158
↓ 5 callersMethodServeHTTP
(http.ResponseWriter, *http.Request)
admin.go:1361
↓ 5 callersMethodString
()
logging.go:668
↓ 5 callersMethodUnmarshalCaddyfile
UnmarshalCaddyfile sets up the handler from Caddyfile tokens. Syntax: metrics [<matcher>] { disable_openmetrics }
modules/metrics/metrics.go:85
↓ 5 callersMethodUnmarshalCaddyfile
UnmarshalCaddyfile sets up the module from Caddyfile tokens. Syntax: file <filename> { mode <mode> dir_mode <mode|inherit|fr
modules/logging/filewriter.go:379
↓ 5 callersMethodWriteHeader
WriteHeader stores the status to write when the time comes to actually write the header.
modules/caddyhttp/encode/encode.go:259
↓ 5 callersMethodWriteTo
(w io.Writer)
modules/caddyhttp/responsewriter.go:296
↓ 5 callersMethodaddForwardedHeaders
addForwardedHeaders adds the de-facto standard X-Forwarded-* headers to the request before it is sent upstream. These headers are security sensitive,
modules/caddyhttp/reverseproxy/reverseproxy.go:888
↓ 5 callersFunctioncopyHeader
(dst, src http.Header)
modules/caddyhttp/reverseproxy/reverseproxy.go:1534
↓ 5 callersFunctiongetIntegrationDir
()
caddytest/caddytest.go:318
↓ 5 callersMethodgetTracerProvider
getTracerProvider create or return an existing global TracerProvider
modules/caddyhttp/tracing/tracerprovider.go:23
↓ 5 callersFunctionhomeDirUnsafe
homeDirUnsafe is a low-level function that returns the user's home directory from environment variables. Careful: if it cannot be determined, an empty
storage.go:56
↓ 5 callersMethodhostsFromKeys
hostsFromKeys returns a list of all the non-empty hostnames found in the keys of the server block sb. If logger mode is false, a key with an empty hos
caddyconfig/httpcaddyfile/directives.go:562
↓ 5 callersMethodhttpPort
()
modules/caddyhttp/app.go:813
↓ 5 callersMethodisNewLine
isNewLine determines whether the current token is on a different line (higher line number) than the previous token. It handles imported tokens correct
caddyconfig/caddyfile/dispenser.go:504
↓ 5 callersFunctionisNextOnNewLine
isNextOnNewLine tests whether t2 is on a different line from t1
caddyconfig/caddyfile/lexer.go:378
↓ 5 callersFunctionlistenerKey
(network, addr string)
listeners.go:697
↓ 5 callersMethodnewAdminHandler
newAdminHandler reads admin's config and returns an http.Handler suitable for use in an admin endpoint server, which will be listening on listenAddr.
admin.go:221
↓ 5 callersMethodnotFound
notFound returns a 404 error or, if pass-thru is enabled, it calls the next handler in the chain.
modules/caddyhttp/fileserver/staticfiles.go:733
↓ 5 callersFunctionpemDecodeCertificate
(pemDER []byte)
modules/caddypki/crypto.go:33
↓ 5 callersFunctionprovisionedStaticUpstream
provisionedStaticUpstream creates a static upstream, registers it in the UsagePool, and returns a cleanup func that removes it from the pool.
modules/caddyhttp/reverseproxy/passive_health_test.go:45
↓ 5 callersFunctionresultsByAddress
resultsByAddress indexes a slice of upstreamStatus by address for easier lookup in assertions.
modules/caddyhttp/reverseproxy/admin_test.go:85
↓ 5 callersFunctionsdNotify
The documentation about this IPC protocol is available here: https://www.freedesktop.org/software/systemd/man/sd_notify.html
notify/notify_linux.go:29
↓ 5 callersFunctionstopAdminServer
(srv *http.Server)
admin.go:738
↓ 5 callersFunctiontestLogger
testLogger returns a logger and a buffer to which the logger writes. The buffer can be read for asserting log output.
modules/caddyhttp/server_test.go:36
↓ 5 callersFunctionunsyncedConfigAccess
unsyncedConfigAccess traverses into the current config and performs the operation at path according to method, using body and out as needed. This is a
admin.go:1159
↓ 4 callersFunctionCELValueToMapStrList
CELValueToMapStrList converts a CEL value to a map[string][]string Earlier validation stages should guarantee that the value has this type at compile
modules/caddyhttp/celmatcher.go:669
↓ 4 callersMethodCertPool
()
modules/caddytls/capools.go:38
↓ 4 callersMethodClose
()
logging.go:699
↓ 4 callersMethodConfigureDefaultFormat
(WriterOpener)
logging.go:814
↓ 4 callersMethodEmit
(ctx Context, eventName string, data map[string]any)
context.go:687
↓ 4 callersMethodEmpty
Empty returns true if the route has all zero/default values.
modules/caddyhttp/routes.go:108
↓ 4 callersMethodExecute
(args []string, request <-chan svc.ChangeRequest, status chan<- svc.Status)
service_windows.go:46
↓ 4 callersMethodFileSystems
FileSystems returns a ref to the FilesystemMap. EXPERIMENTAL: This API is subject to change.
context.go:105
↓ 4 callersMethodGetCA
GetCA retrieves a CA by ID. If the ID is the default CA ID, and it hasn't been provisioned yet, it will be provisioned.
modules/caddypki/pki.go:128
↓ 4 callersMethodIntermediateCertificateChain
IntermediateCertificateChain returns the CA's intermediate certificate chain.
modules/caddypki/ca.go:202
↓ 4 callersFunctionIsFdNetwork
IsFdNetwork returns true if the netw is a fd network.
listeners.go:304
↓ 4 callersFunctionLoad
Load loads the given config JSON and runs it only if it is different from the current config or forceReload is true.
caddy.go:115
↓ 4 callersMethodLocalAddr
()
modules/caddytls/matchers_test.go:311
↓ 4 callersMethodNewTemplate
NewTemplate returns a new template intended to be evaluated with this context, as it is initialized with configuration from this context.
modules/caddyhttp/templates/tplcontext.go:62
↓ 4 callersFunctionParseNamedResponseMatcher
ParseNamedResponseMatcher parses the tokens of a named response matcher. @name { header <field> [<value>] status <code...> } Or, single
modules/caddyhttp/responsematchers.go:69
↓ 4 callersMethodProvision
Provision sets up the CA.
modules/caddypki/ca.go:99
↓ 4 callersMethodProvision
Provision implements caddy.Provisioner.
modules/caddyhttp/tracing/module.go:48
↓ 4 callersMethodReferences
References returns the number of references (count of usages) to a key in the pool, and true if the key exists, or false otherwise.
usagepool.go:201
↓ 4 callersMethodRegisterServerNames
RegisterServerNames registers the provided DNS names with the TLS app and associates them with the given HTTPS RR ALPN values, if any. This is current
modules/caddytls/tls.go:666
↓ 4 callersMethodRemoteAddr
()
modules/caddytls/matchers_test.go:310
↓ 4 callersMethodRequest
Request returns an HTTP response with header and body from the FastCGI responder.
modules/caddyhttp/reverseproxy/fastcgi/client.go:213
↓ 4 callersMethodRootCertificate
RootCertificate returns the CA's root certificate (public key).
modules/caddypki/ca.go:186
↓ 4 callersMethodSelect
(UpstreamPool, *http.Request, http.ResponseWriter)
modules/caddyhttp/reverseproxy/reverseproxy.go:1673
↓ 4 callersMethodServeHTTP
(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler)
modules/caddyhttp/caddyauth/caddyauth.go:84
↓ 4 callersMethodServeHTTP
ServeHTTP implements caddyhttp.MiddlewareHandler.
modules/caddyhttp/tracing/module.go:67
↓ 4 callersFunctionSplitUnixSocketPermissionsBits
SplitUnixSocketPermissionsBits takes a unix socket address in the unusual "path|bits" format (e.g. /run/caddy.sock|0222) and tries to split it into so
internal/sockets.go:34
↓ 4 callersMethodValidate
Validate checks that action types are correct.
modules/logging/filters.go:331
↓ 4 callersMethodWrite
Write wraps the underlying Conn.Write method, but if that fails, it will re-dial the connection anew and try writing again.
modules/logging/netwriter.go:169
↓ 4 callersMethodWriteHeader
WriteHeader writes the headers with statusCode to the wrapped ResponseWriter unless the response is to be buffered instead. 1xx responses are never bu
modules/caddyhttp/responsewriter.go:148
↓ 4 callersFunctionadminHandlerFixture
adminHandlerFixture sets up the global host state for an admin endpoint test and returns a cleanup function that must be deferred by the caller. stat
modules/caddyhttp/reverseproxy/admin_test.go:30
↓ 4 callersFunctionallTokens
allTokens lexes the entire input, but does not parse it. It returns all the tokens from the input, unstructured and in order. It may mutate input as i
caddyconfig/caddyfile/parse.go:63
↓ 4 callersFunctionasciiServerNameForMatch
(name string)
modules/caddytls/matchers.go:83
↓ 4 callersFunctionautomationPolicyIsSubset
automationPolicyIsSubset returns true if a's subjects are a subset of b's subjects.
caddyconfig/httpcaddyfile/tlsapp.go:1079
↓ 4 callersMethodbuffer
()
modules/caddyhttp/reverseproxy/streaming.go:659
← previousnext →201–300 of 2,647, ranked by callers