aboutsummaryrefslogtreecommitdiff
path: root/plugin/cancel/README.md
blob: 64f585a294695f8b8cd2cdd9dfd5f440a460c897 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# cancel

## Name

*cancel* - cancels a request's context after 5001 milliseconds.

## Description

The *cancel* plugin creates a canceling context for each request. It adds a timeout that gets
triggered after 5001 milliseconds.

The 5001 number was chosen because the default timeout for DNS clients is 5 seconds, after that they
give up.

A plugin interested in the cancellation status should call `plugin.Done()` on the context. If the
context was canceled due to a timeout the plugin should not write anything back to the client and
return a value indicating CoreDNS should not either; a zero return value should suffice for that.

## Syntax

~~~ txt
cancel [TIMEOUT]
~~~

* **TIMEOUT** allows setting a custom timeout. The default timeout is 5001 milliseconds (`5001 ms`)

## Examples

~~~ corefile
example.org {
    cancel
    whoami
}
~~~

Or with a custom timeout:

~~~ corefile
example.org {
    cancel 1s
    whoami
}
~~~

## See Also

The Go documentation for the context package.
on> Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/builtins (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2022-11-15wipjarred/dumpGravatar Jarred Sumner 3-0/+26
2022-11-15Update ZigGlobalObject.cppGravatar Jarred Sumner 1-3/+1
2022-11-15Add a test with decently large headersGravatar Jarred Sumner 1-0/+61
2022-11-15Update test types a littleGravatar Jarred Sumner 1-2/+2
cc @colinhacks `test` is an alias of `it` `done` accepts an `error` object
2022-11-15Add missing typeGravatar Jarred Sumner 1-0/+5
2022-11-14switch default encoding order (#1510)Gravatar Dylan Conway 1-1/+1
2022-11-14Fix spawn macOS issueGravatar Jarred Sumner 1-7/+11
2022-11-14Fix crash in web crypto. caused by refptrGravatar Jarred Sumner 3-2/+15
2022-11-14Fix crashiness with `process.env`Gravatar Jarred Sumner 2-27/+66
This also makes it a lot slower
2022-11-14Fix string encoding issue in JSC C API usagesGravatar Jarred Sumner 3-139/+74
2022-11-14Prevent double-frees in log msgsGravatar Jarred Sumner 1-4/+15
2022-11-14Fix build errorGravatar Jarred SUmner 2-6/+1
2022-11-14Bugfixes and perf improvements to child_processGravatar Jarred SUmner 15-192/+416
2022-11-13use `write$NOCANCEL`, more loggingGravatar Jarred Sumner 3-12/+42
2022-11-13Add an e2e testGravatar Jarred Sumner 3-0/+52
2022-11-13Add missing `rmdir` exportGravatar Jarred Sumner 1-1/+2
2022-11-13Make node streams faster (#1502)Gravatar Jarred Sumner 23-406/+836
* Make node streams faster * Fix for macOS, improve performance, handle ref and unref Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2022-11-13Fix incorrect exit status messageGravatar Jarred Sumner 1-3/+6
2022-11-12Fix syntax errorGravatar Jarred Sumner 1-2/+2
2022-11-12Set linker script to Bun 0.2Gravatar Jarred SUmner 1-1/+1
2022-11-12Fix infinite write loop on LinuxGravatar Jarred SUmner 3-44/+185
2022-11-12Add missing typeGravatar Jarred SUmner 1-1/+1
2022-11-12Add linker script to remove unwanted exports (#1499)Gravatar Tom Birch 2-1/+9
2022-11-12Fix memory leak in gzip pool + add test for gzip'd dataGravatar Jarred SUmner 7-62/+1530
2022-11-12Redo how we poll pipes (#1496)Gravatar Jarred Sumner 22-707/+1251
* Fix pipe * Handle unregistered * Fix failing test
2022-11-11Add test that fails on linuxGravatar Jarred Sumner 7-21/+42
2022-11-112 framesGravatar Jarred Sumner 1-1/+1
2022-11-11Revert "Omit frame pointer"Gravatar Jarred Sumner 1-0/+1
This reverts commit 4f91f66a373a295f9a469eb8d84a06b271f6a70a.
2022-11-11Don't rm cachedGravatar Jarred Sumner 4-4/+0
2022-11-11try thisGravatar Jarred Sumner 4-0/+4
2022-11-11Update bun-linux-build.ymlGravatar Jarred Sumner 1-1/+0
2022-11-11try using git actionGravatar Jarred Sumner 4-7/+8
2022-11-11Remove with `git rm`Gravatar Jarred Sumner 2-8/+0