Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
COREDNS-CANCEL(7)		CoreDNS	Plugins		     COREDNS-CANCEL(7)

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  plu-
       gin.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
	      cancel [TIMEOUT]

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

EXAMPLES
	      example.org {
		  cancel
		  whoami
	      }

       Or with a custom	timeout:

	      example.org {
		  cancel 1s
		  whoami
	      }

SEE ALSO
       The Go documentation for	the context package.

CoreDNS				  March	2021		     COREDNS-CANCEL(7)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=coredns-cancel&sektion=7&manpath=FreeBSD+Ports+14.3.quarterly>

home | help