MCPcopy Create free account

hub / github.com/caddyserver/caddy / functions

Functions2,647 in github.com/caddyserver/caddy

↓ 535 callersMethodVal
Val gets the text of the current token. If there is no token loaded, it returns empty string.
caddyconfig/caddyfile/dispenser.go:202
↓ 439 callersMethodArgErr
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 callersMethodErrf
Errf is like Err, but for formatted error messages
caddyconfig/caddyfile/dispenser.go:434
↓ 341 callersMethodNextArg
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 callersMethodError
()
modules/caddyhttp/errors.go:65
↓ 211 callersMethodNext
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 callersMethodDuration
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 callersMethodGet
(k string)
filesystem.go:22
↓ 139 callersMethodRemainingArgs
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 callersMethodString
(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 callersFunctionnewRequest
(t *testing.T, method, uri string)
modules/caddyhttp/rewrite/rewrite_test.go:480
↓ 127 callersMethodNextBlock
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 callersMethodValue
()
modules/caddyhttp/celmatcher.go:344
↓ 118 callersFunctionNewTestDispenser
NewTestDispenser parses input into tokens and creates a new Dispenser for test purposes only; any errors are fatal.
caddyconfig/caddyfile/dispenser.go:49
↓ 116 callersMethodCheck
Check only allows the log entry if its logger name is allowed from the include/exclude rules of fc.cl.
logging.go:611
↓ 115 callersMethodReplaceAll
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 callersMethodErr
Err generates a custom parse-time error with a message of msg.
caddyconfig/caddyfile/dispenser.go:429
↓ 89 callersMethodString
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 callersMethodSet
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 callersMethodString
()
modules/caddyhttp/routes.go:117
↓ 73 callersMethodServeHTTP
(http.ResponseWriter, *http.Request)
modules/caddyhttp/caddyhttp.go:66
↓ 71 callersFunctionNewTester
NewTester will create a new testing client with an attached cookie jar
caddytest/caddytest.go:68
↓ 71 callersMethodWrite
(p []byte)
modules/caddyhttp/reverseproxy/streaming.go:588
↓ 70 callersMethodClose
()
cmd/main_test.go:240
↓ 70 callersMethodInitServer
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 callersFunctionJSONModuleObject
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 callersMethodsetHealthy
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 callersMethodError
()
admin.go:1382
↓ 62 callersMethodHeader
()
modules/caddyhttp/templates/templates.go:520
↓ 62 callersMethodLoadModule
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 callersMethodWithValue
WithValue returns a new context with the given key-value pair.
context.go:671
↓ 59 callersMethodProvision
(Context)
modules.go:297
↓ 57 callersMethodAssertGetResponse
Verb specific test functions AssertGetResponse requests a URI with GET and expects a status code and body text.
caddytest/caddytest.go:545
↓ 56 callersMethodSet
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 callersMethodCleanup
()
modules.go:316
↓ 51 callersMethodLoad
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 callersMethodNesting
Nesting returns the current nesting level. Necessary if using NextBlock()
caddyconfig/caddyfile/dispenser.go:196
↓ 49 callersMethodString
()
modules/caddytls/matchers_test.go:316
↓ 48 callersMethodError
()
caddytest/caddytest.go:109
↓ 46 callersMethodAddr
()
cmd/main_test.go:244
↓ 45 callersMethodLogger
Logger returns a logger that is ready for the module to use.
logging.go:219
↓ 44 callersMethodAdd
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 callersFunctionError
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 callersFunctionLog
Log returns the current default logger.
logging.go:779
↓ 40 callersMethodEqual
(other ref.Val)
modules/caddyhttp/celmatcher.go:337
↓ 40 callersMethodError
()
modules/caddytls/ech.go:1171
↓ 40 callersFunctionRegisterGlobalOption
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 callersMethodWrite
(p []byte)
modules/caddyhttp/server_test.go:26
↓ 39 callersMethodReplaceKnown
ReplaceKnown is like ReplaceAll but only replaces placeholders that are known (recognized). Unrecognized placeholders will remain in the output.
replacer.go:154
↓ 39 callersFunctionUnmarshalModule
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 callersMethodStat
(name string)
internal/filesystems/os.go:19
↓ 37 callersMethodAdd
Add adds a field to the list of extra fields to log.
modules/caddyhttp/logging.go:241
↓ 35 callersMethodReset
(io.Writer)
modules/caddyhttp/encode/encode.go:574
↓ 35 callersFunctionSetVar
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 callersMethodWith
With properly wraps With.
logging.go:602
↓ 34 callersMethodSet
Set sets a custom variable to a static value.
replacer.go:92
↓ 33 callersMethodHeader
()
modules/caddyhttp/responsewriter_test.go:29
↓ 33 callersMethodPrintln
(v ...any)
modules/metrics/metrics.go:59
↓ 32 callersMethodJoinHostPort
JoinHostPort is like net.JoinHostPort, but where the port is StartPort + offset.
listeners.go:221
↓ 32 callersFunctionresetDynamicHosts
resetDynamicHosts clears global dynamic host state between tests.
modules/caddyhttp/reverseproxy/dynamic_upstreams_test.go:26
↓ 31 callersMethodListen
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 callersMethodArgs
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 callersMethodClose
()
modules/caddyhttp/server.go:1187
↓ 29 callersMethodAllArgs
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 callersMethodCountRemainingArgs
CountRemainingArgs counts the amount of remaining arguments (tokens on the same line) without consuming the tokens.
caddyconfig/caddyfile/dispenser.go:299
↓ 29 callersMethodName
()
caddy.go:1152
↓ 29 callersFunctionRegisterHandlerDirective
RegisterHandlerDirective is like RegisterDirective, but for directives which specifically output only an HTTP handler. Directives registered with this
caddyconfig/httpcaddyfile/directives.go:120
↓ 28 callersMethodFails
Fails returns the number of recent failures with the upstream.
modules/caddyhttp/reverseproxy/hosts.go:189
↓ 28 callersMethodSet
(value string)
cmd/main.go:511
↓ 28 callersMethodToken
Token returns the current token.
caddyconfig/caddyfile/dispenser.go:390
↓ 27 callersMethodDel
Del deletes a header field. It returns an empty string.
modules/caddyhttp/templates/tplcontext.go:571
↓ 27 callersMethodInt
Int returns ws as an integer. If ws is not an integer, 0 is returned.
modules/caddyhttp/caddyhttp.go:203
↓ 27 callersFunctionJSON
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 callersMethodBool
Bool returns ws as a boolean. If ws is not a boolean, false is returned.
modules/caddyhttp/caddyhttp.go:217
↓ 26 callersMethodString
String returns a string representation of the challenge.
modules/caddypki/acmeserver/challenges.go:43
↓ 25 callersMethodMatchWithError
(*http.Request)
modules/caddyhttp/caddyhttp.go:56
↓ 25 callersMethodWrite
(entry zapcore.Entry, fields []zapcore.Field)
internal/logbuffer.go:58
↓ 24 callersMethodWrite
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 callersMethodWriteHeader
(code int)
metrics.go:75
↓ 23 callersMethodDelete
Delete removes a variable with a static value that was created using Set.
replacer.go:118
↓ 23 callersMethodLen
()
modules/caddyhttp/fileserver/browsetplcontext.go:327
↓ 23 callersMethodWriteHeader
(statusCode int)
modules/caddyhttp/push/handler.go:212
↓ 23 callersMethodfiltered
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 callersFunctionGetVar
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 callersMethodReadFile
(name string)
internal/filesystems/os.go:22
↓ 21 callersMethodMatch
(*http.Request)
modules/caddyhttp/caddyhttp.go:44
↓ 20 callersMethodCaddyModule
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 callersMethodCompile
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 callersMethodStop
()
caddy.go:100
↓ 20 callersMethodStorage
Storage returns the configured Caddy storage implementation.
context.go:552
↓ 19 callersMethodString
()
caddyconfig/configadapters.go:38
↓ 18 callersMethodReplaceOrErr
ReplaceOrErr is like ReplaceAll, but any placeholders that are empty or not recognized will cause an error to be returned.
replacer.go:147
↓ 18 callersMethodSelect
Select returns an available host, if any.
modules/caddyhttp/reverseproxy/selectionpolicies.go:378
↓ 18 callersMethodSelect
Select returns an available host, if any.
modules/caddyhttp/reverseproxy/selectionpolicies.go:409
↓ 18 callersMethodcountFailure
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 callersMethodIsUnixNetwork
IsUnixNetwork returns true if na.Network is unix, unixgram, or unixpacket.
listeners.go:209
↓ 17 callersMethodName
Name returns the server's name.
modules/caddyhttp/server.go:978
↓ 17 callersMethodString
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 callersMethodWrapErr
WrapErr takes an existing error and adds the Caddyfile file and line number.
caddyconfig/caddyfile/dispenser.go:439
↓ 17 callersMethodcountRequest
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