From 6466d010557383620b5887f2754560773ca55088 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Mon, 12 Aug 2019 18:24:57 +0000 Subject: doc: formatting and point to plugin.md (#3107) * doc: formatting and point to plugin.md Slight tweaks in CONTRIBUTING.md and point to plugin.md which also has a bunch of info. Signed-off-by: Miek Gieben * Update plugin.md Co-Authored-By: Chris O'Haver * Add minimize to configuration knobs Signed-off-by: Miek Gieben * more Signed-off-by: Miek Gieben --- plugin.md | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'plugin.md') diff --git a/plugin.md b/plugin.md index 7b7655022..f00cfe712 100644 --- a/plugin.md +++ b/plugin.md @@ -117,6 +117,16 @@ The `fallthrough` directive should optionally accept a list of zones. Only queri in one of those zones should be allowed to fallthrough. See `plugin/pkg/fallthrough` for the implementation. +## General Guidelines + +Some general guidelines: + +* logging time duration should be done in seconds (call the `Seconds()` method on any duration). +* keep logging to a minimum. +* call the main config parse function just `parse`. +* try to minimize the number of knobs in the configuration. +* use `plugin.Error()` to wrap errors returned from the `setup` function. + ## Qualifying for Main Repo Plugins for CoreDNS can live out-of-tree, `plugin.cfg` defaults to CoreDNS' repo but other -- cgit v1.2.3