Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/caddyserver/caddy
/ functions
Functions
2,647 in github.com/caddyserver/caddy
⨍
Functions
2,647
◇
Types & classes
525
↓ 535 callers
Method
Val
Val gets the text of the current token. If there is no token loaded, it returns empty string.
caddyconfig/caddyfile/dispenser.go:202
↓ 439 callers
Method
ArgErr
ArgErr returns an argument error, meaning that another argument was expected but not found. In other words, a line break or open curly brace was encou
caddyconfig/caddyfile/dispenser.go:408
↓ 348 callers
Method
Errf
Errf is like Err, but for formatted error messages
caddyconfig/caddyfile/dispenser.go:434
↓ 341 callers
Method
NextArg
NextArg loads the next token if it is on the same line and if it is not a block opening (open curly brace). Returns true if an argument token was load
caddyconfig/caddyfile/dispenser.go:89
↓ 245 callers
Method
Error
()
modules/caddyhttp/errors.go:65
↓ 211 callers
Method
Next
Next returns the channel through which the next session ticket keys will be transmitted until doneChan is closed. Keys should be sent on keysChan as t
modules/caddytls/sessiontickets.go:239
↓ 183 callers
Method
Duration
Duration returns the duration representation of the flag given by name. It returns false if the flag is not a duration type. It panics if the flag is
cmd/main.go:347
↓ 139 callers
Method
Get
(k string)
filesystem.go:22
↓ 139 callers
Method
RemainingArgs
RemainingArgs loads any more arguments (tokens on the same line) into a slice of strings and returns them. Open curly brace tokens also indicate the e
caddyconfig/caddyfile/dispenser.go:314
↓ 137 callers
Method
String
(pointer receiver necessary to avoid a race condition, since copying the Upstream reads the 'unhealthy' field which is accessed atomically)
modules/caddyhttp/reverseproxy/hosts.go:71
↓ 134 callers
Function
newRequest
(t *testing.T, method, uri string)
modules/caddyhttp/rewrite/rewrite_test.go:480
↓ 127 callers
Method
NextBlock
NextBlock can be used as the condition of a for loop to load the next token as long as it opens a block or is already in a block nested more than init
caddyconfig/caddyfile/dispenser.go:167
↓ 119 callers
Method
Value
()
modules/caddyhttp/celmatcher.go:344
↓ 118 callers
Function
NewTestDispenser
NewTestDispenser parses input into tokens and creates a new Dispenser for test purposes only; any errors are fatal.
caddyconfig/caddyfile/dispenser.go:49
↓ 116 callers
Method
Check
Check only allows the log entry if its logger name is allowed from the include/exclude rules of fc.cl.
logging.go:611
↓ 115 callers
Method
ReplaceAll
ReplaceAll efficiently replaces placeholders in input with their values. All placeholders are replaced in the output whether they are recognized or no
replacer.go:163
↓ 104 callers
Method
Err
Err generates a custom parse-time error with a message of msg.
caddyconfig/caddyfile/dispenser.go:429
↓ 89 callers
Method
String
String returns the string representation of the flag given by name. It panics if the flag is not in the flag set.
cmd/main.go:312
↓ 87 callers
Method
Set
Set sets a header field value, overwriting any other values for that field. It returns an empty string.
modules/caddyhttp/templates/tplcontext.go:565
↓ 84 callers
Method
String
()
modules/caddyhttp/routes.go:117
↓ 73 callers
Method
ServeHTTP
(http.ResponseWriter, *http.Request)
modules/caddyhttp/caddyhttp.go:66
↓ 71 callers
Function
NewTester
NewTester will create a new testing client with an attached cookie jar
caddytest/caddytest.go:68
↓ 71 callers
Method
Write
(p []byte)
modules/caddyhttp/reverseproxy/streaming.go:588
↓ 70 callers
Method
Close
()
cmd/main_test.go:240
↓ 70 callers
Method
InitServer
InitServer this will configure the server with a configurion of a specific type. The configType must be either "json" or the adapter type.
caddytest/caddytest.go:118
↓ 70 callers
Function
JSONModuleObject
JSONModuleObject is like JSON(), except it marshals val into a JSON object with an added key named fieldName with the value fieldVal. This is useful f
caddyconfig/configadapters.go:69
↓ 64 callers
Method
setHealthy
SetHealthy sets the upstream has healthy or unhealthy and returns true if the new value is different. This sets the status only for the "active" healt
modules/caddyhttp/reverseproxy/hosts.go:258
↓ 62 callers
Method
Error
()
admin.go:1382
↓ 62 callers
Method
Header
()
modules/caddyhttp/templates/templates.go:520
↓ 62 callers
Method
LoadModule
LoadModule loads the Caddy module(s) from the specified field of the parent struct pointer and returns the loaded module(s). The struct pointer and it
context.go:188
↓ 62 callers
Method
WithValue
WithValue returns a new context with the given key-value pair.
context.go:671
↓ 59 callers
Method
Provision
(Context)
modules.go:297
↓ 57 callers
Method
AssertGetResponse
Verb specific test functions AssertGetResponse requests a URI with GET and expects a status code and body text.
caddytest/caddytest.go:545
↓ 56 callers
Method
Set
Set sets a field in the list of extra fields to log. If the field already exists, it is replaced.
modules/caddyhttp/logging.go:248
↓ 52 callers
Method
Cleanup
()
modules.go:316
↓ 51 callers
Method
Load
Load loads the certificate chain and (optional) private key from the corresponding files, using the configured format. If a private key is read, it wi
modules/caddypki/crypto.go:91
↓ 51 callers
Method
Nesting
Nesting returns the current nesting level. Necessary if using NextBlock()
caddyconfig/caddyfile/dispenser.go:196
↓ 49 callers
Method
String
()
modules/caddytls/matchers_test.go:316
↓ 48 callers
Method
Error
()
caddytest/caddytest.go:109
↓ 46 callers
Method
Addr
()
cmd/main_test.go:244
↓ 45 callers
Method
Logger
Logger returns a logger that is ready for the module to use.
logging.go:219
↓ 44 callers
Method
Add
Add adds a header field value, appending val to existing values for that field. It returns an empty string.
modules/caddyhttp/templates/tplcontext.go:557
↓ 44 callers
Function
Error
Error is a convenient way for a Handler to populate the essential fields of a HandlerError. If err is itself a HandlerError, then any essential fields
modules/caddyhttp/errors.go:32
↓ 41 callers
Function
Log
Log returns the current default logger.
logging.go:779
↓ 40 callers
Method
Equal
(other ref.Val)
modules/caddyhttp/celmatcher.go:337
↓ 40 callers
Method
Error
()
modules/caddytls/ech.go:1171
↓ 40 callers
Function
RegisterGlobalOption
RegisterGlobalOption registers a unique global option opt with an associated unmarshaling (setup) function. When the global option opt is encountered
caddyconfig/httpcaddyfile/directives.go:193
↓ 40 callers
Method
Write
(p []byte)
modules/caddyhttp/server_test.go:26
↓ 39 callers
Method
ReplaceKnown
ReplaceKnown is like ReplaceAll but only replaces placeholders that are known (recognized). Unrecognized placeholders will remain in the output.
replacer.go:154
↓ 39 callers
Function
UnmarshalModule
UnmarshalModule instantiates a module with the given ID and invokes UnmarshalCaddyfile on the new value using the immediate next segment of d as input
caddyconfig/caddyfile/adapter.go:127
↓ 38 callers
Method
Stat
(name string)
internal/filesystems/os.go:19
↓ 37 callers
Method
Add
Add adds a field to the list of extra fields to log.
modules/caddyhttp/logging.go:241
↓ 35 callers
Method
Reset
(io.Writer)
modules/caddyhttp/encode/encode.go:574
↓ 35 callers
Function
SetVar
SetVar sets a value in the context's variable table with the given key. It overwrites any previous value with the same key. If the value is nil (note
modules/caddyhttp/vars.go:448
↓ 35 callers
Method
With
With properly wraps With.
logging.go:602
↓ 34 callers
Method
Set
Set sets a custom variable to a static value.
replacer.go:92
↓ 33 callers
Method
Header
()
modules/caddyhttp/responsewriter_test.go:29
↓ 33 callers
Method
Println
(v ...any)
modules/metrics/metrics.go:59
↓ 32 callers
Method
JoinHostPort
JoinHostPort is like net.JoinHostPort, but where the port is StartPort + offset.
listeners.go:221
↓ 32 callers
Function
resetDynamicHosts
resetDynamicHosts clears global dynamic host state between tests.
modules/caddyhttp/reverseproxy/dynamic_upstreams_test.go:26
↓ 31 callers
Method
Listen
Listen is similar to net.Listen, with a few differences: Listen announces on the network address using the port calculated by adding portOffset to th
listeners.go:135
↓ 30 callers
Method
Args
Args is a convenience function that loads the next arguments (tokens on the same line) into an arbitrary number of strings pointed to in targets. If t
caddyconfig/caddyfile/dispenser.go:272
↓ 30 callers
Method
Close
()
modules/caddyhttp/server.go:1187
↓ 29 callers
Method
AllArgs
AllArgs is like Args, but if there are more argument tokens available than there are targets, false is returned. The number of available argument toke
caddyconfig/caddyfile/dispenser.go:286
↓ 29 callers
Method
CountRemainingArgs
CountRemainingArgs counts the amount of remaining arguments (tokens on the same line) without consuming the tokens.
caddyconfig/caddyfile/dispenser.go:299
↓ 29 callers
Method
Name
()
caddy.go:1152
↓ 29 callers
Function
RegisterHandlerDirective
RegisterHandlerDirective is like RegisterDirective, but for directives which specifically output only an HTTP handler. Directives registered with this
caddyconfig/httpcaddyfile/directives.go:120
↓ 28 callers
Method
Fails
Fails returns the number of recent failures with the upstream.
modules/caddyhttp/reverseproxy/hosts.go:189
↓ 28 callers
Method
Set
(value string)
cmd/main.go:511
↓ 28 callers
Method
Token
Token returns the current token.
caddyconfig/caddyfile/dispenser.go:390
↓ 27 callers
Method
Del
Del deletes a header field. It returns an empty string.
modules/caddyhttp/templates/tplcontext.go:571
↓ 27 callers
Method
Int
Int returns ws as an integer. If ws is not an integer, 0 is returned.
modules/caddyhttp/caddyhttp.go:203
↓ 27 callers
Function
JSON
JSON encodes val as JSON, returning it as a json.RawMessage. Any marshaling errors (which are highly unlikely with correct code) are converted to warn
caddyconfig/configadapters.go:51
↓ 26 callers
Method
Bool
Bool returns ws as a boolean. If ws is not a boolean, false is returned.
modules/caddyhttp/caddyhttp.go:217
↓ 26 callers
Method
String
String returns a string representation of the challenge.
modules/caddypki/acmeserver/challenges.go:43
↓ 25 callers
Method
MatchWithError
(*http.Request)
modules/caddyhttp/caddyhttp.go:56
↓ 25 callers
Method
Write
(entry zapcore.Entry, fields []zapcore.Field)
internal/logbuffer.go:58
↓ 24 callers
Method
Write
Write writes to the response. If the response qualifies, it is encoded using the encoder, which is initialized if not done so already.
modules/caddyhttp/encode/encode.go:321
↓ 24 callers
Method
WriteHeader
(code int)
metrics.go:75
↓ 23 callers
Method
Delete
Delete removes a variable with a static value that was created using Set.
replacer.go:118
↓ 23 callers
Method
Len
()
modules/caddyhttp/fileserver/browsetplcontext.go:327
↓ 23 callers
Method
WriteHeader
(statusCode int)
modules/caddyhttp/push/handler.go:212
↓ 23 callers
Method
filtered
filtered returns true if the field was filtered. If true is returned, the field was filtered and added to the underlying encoder (so do not do that ag
modules/logging/filterencoder.go:466
↓ 22 callers
Function
GetVar
GetVar gets a value out of the context's variable table by key. If the key does not exist, the return value will be nil.
modules/caddyhttp/vars.go:433
↓ 22 callers
Method
ReadFile
(name string)
internal/filesystems/os.go:22
↓ 21 callers
Method
Match
(*http.Request)
modules/caddyhttp/caddyhttp.go:44
↓ 20 callers
Method
CaddyModule
This method indicates that the type is a Caddy module. The returned ModuleInfo must have both a name and a constructor function. This method must not
modules.go:59
↓ 20 callers
Method
Compile
Compile prepares a middleware chain from the route list. This should only be done once during the request, just before the middleware chain is execute
modules/caddyhttp/routes.go:190
↓ 20 callers
Method
Stop
()
caddy.go:100
↓ 20 callers
Method
Storage
Storage returns the configured Caddy storage implementation.
context.go:552
↓ 19 callers
Method
String
()
caddyconfig/configadapters.go:38
↓ 18 callers
Method
ReplaceOrErr
ReplaceOrErr is like ReplaceAll, but any placeholders that are empty or not recognized will cause an error to be returned.
replacer.go:147
↓ 18 callers
Method
Select
Select returns an available host, if any.
modules/caddyhttp/reverseproxy/selectionpolicies.go:378
↓ 18 callers
Method
Select
Select returns an available host, if any.
modules/caddyhttp/reverseproxy/selectionpolicies.go:409
↓ 18 callers
Method
countFailure
countFailure is used with passive health checks. It remembers 1 failure for upstream for the configured duration. If passive health checks are disable
modules/caddyhttp/reverseproxy/healthchecks.go:587
↓ 17 callers
Method
IsUnixNetwork
IsUnixNetwork returns true if na.Network is unix, unixgram, or unixpacket.
listeners.go:209
↓ 17 callers
Method
Name
Name returns the server's name.
modules/caddyhttp/server.go:978
↓ 17 callers
Method
String
String returns a human-readable form of a. It will be a cleaned-up and filled-out URL string.
caddyconfig/httpcaddyfile/addresses.go:425
↓ 17 callers
Method
WrapErr
WrapErr takes an existing error and adds the Caddyfile file and line number.
caddyconfig/caddyfile/dispenser.go:439
↓ 17 callers
Method
countRequest
countRequest mutates the active request count by delta. It returns an error if the adjustment fails.
modules/caddyhttp/reverseproxy/hosts.go:205
next →
1–100 of 2,647, ranked by callers