Doc: add package docs (#296)

* Doc: add package docs

Add short package level docs to make godoc looks nicer.
Add some badges to the README.

* correct url
This commit is contained in:
Miek Gieben 2016-09-25 08:39:20 +01:00 committed by GitHub
parent edc867fe56
commit de0fa53379
24 changed files with 35 additions and 2 deletions

View file

@ -1,5 +1,8 @@
# CoreDNS
[![Documentation](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](https://godoc.org/github.com/miekg/coredns)
[![Build Status](https://img.shields.io/travis/miekg/coredns.svg?style=flat-square&label=build)](https://travis-ci.org/miekg/coredns)
CoreDNS is a DNS server that started as a fork of [Caddy](https://github.com/mholt/caddy/). It has the
same model: it chains middleware. In fact it's so similar that CoreDNS is now a server type plugin for
Caddy.

View file

@ -1,3 +1,4 @@
// Package core registers the server and all plugins we support.
package core
import (

View file

@ -1,3 +1,5 @@
// Package DNS server implements all the interfaces from Caddy, so that
// CoreDNS can be a servertype plugin.
package dnsserver
import (

View file

@ -1,3 +1,4 @@
// Package coremain contains the functions for starting CoreDNS.
package coremain
import (

View file

@ -1,3 +1,4 @@
// Package bind allows binding to a specific interface instead of bind to all of them.
package bind
import "github.com/mholt/caddy"

View file

@ -1,3 +1,4 @@
// Package chaos implements a middleware that answer to 'CH version.bind TXT' type queries.
package chaos
import (

View file

@ -1,3 +1,5 @@
// Package dnssec implements a middleware that signs responses on-the-fly using
// NSEC black lies.
package dnssec
import (

View file

@ -1,4 +1,4 @@
// Package etcd provides the etcd backend.
// Package etcd provides the etcd backend middleware.
package etcd
import (

View file

@ -1,3 +1,4 @@
// Package msg defines the Service structure which is used for service discovery.
package msg
import (

View file

@ -1,3 +1,4 @@
// Package file implements a file backend.
package file
import (

View file

@ -1,3 +1,4 @@
// Package health implements an HTTP handler that responds to health checks.
package health
import (

View file

@ -17,8 +17,8 @@ import (
"github.com/miekg/dns"
"k8s.io/kubernetes/pkg/api"
unversionedapi "k8s.io/kubernetes/pkg/api/unversioned"
unversionedclient "k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/client/restclient"
unversionedclient "k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/client/unversioned/clientcmd"
clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api"
"k8s.io/kubernetes/pkg/labels"

View file

@ -1,3 +1,4 @@
// Package loadbalance shuffles A and AAAA records.
package loadbalance
import (

View file

@ -1,3 +1,5 @@
// Package metrics implement a handler and middleware that provides Prometheus
// metrics.
package metrics
import (

View file

@ -1,3 +1,4 @@
// Package dnsrecorder allows you to record a DNS response when it is send to the client.
package dnsrecorder
import (

View file

@ -0,0 +1,2 @@
// Package dnsutil contains DNS related helper functions.
package dnsutil

View file

@ -1,3 +1,4 @@
// Package edns provides function usefull for adding/inspecting OPT records to/in messages.
package edns
import (

View file

@ -1,3 +1,4 @@
// Package storage abstracts away where middleware can store assests (zones, keys, etc).
package storage
import (

View file

@ -1,3 +1,5 @@
// Package pprof implement a debug endpoint for getting profiles using the
// go pprof tooling.
package pprof
import (

View file

@ -1,3 +1,4 @@
// Package secondary implements a secondary middleware.
package secondary
import "github.com/miekg/coredns/middleware/file"

2
middleware/test/doc.go Normal file
View file

@ -0,0 +1,2 @@
// Package test contains helper functions for writing middleware tests.
package test

View file

@ -1,3 +1,5 @@
// Package whoami implements a middleware that returns details about the resolving
// querying it.
package whoami
import (

View file

@ -1,3 +1,5 @@
// Package requests abstract a client's request so that all middleware
// will handle them in an unified way.
package request
import (

2
test/doc.go Normal file
View file

@ -0,0 +1,2 @@
// Package test contains function and types useful for writing tests
package test