<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Tutorial on Miek Gieben</title>
    <link>https://miek.nl/tags/tutorial/</link>
    <description>Recent content in Tutorial on Miek Gieben</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <copyright>© Copyright 2007-2024 Miek Gieben</copyright>
    <lastBuildDate>Wed, 27 Apr 2016 07:30:39 +0100</lastBuildDate>
    <atom:link href="https://miek.nl/tags/tutorial/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Starting with CoreDNS</title>
      <link>https://miek.nl/2016/april/27/starting-with-coredns/</link>
      <pubDate>Wed, 27 Apr 2016 07:30:39 +0100</pubDate>
      <guid>https://miek.nl/2016/april/27/starting-with-coredns/</guid>
      <description>&lt;p&gt;This post talks you through getting and setting up &lt;a href=&#34;https://github.com/miekg/coredns&#34;&gt;CoreDNS&lt;/a&gt;&#xA;with a small zone file that it will serve. CoreDNS is a nameserver that is very flexible because it can&#xA;chain different kinds of middleware. From the README:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;CoreDNS aims to be a fast and flexible DNS server. The keyword here is &lt;em&gt;flexible&lt;/em&gt;, with CoreDNS you&#xA;are able to do what you want with your DNS data. And if not: write a middleware!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Writing CoreDNS Middleware</title>
      <link>https://miek.nl/2016/march/25/writing-coredns-middleware/</link>
      <pubDate>Fri, 25 Mar 2016 08:37:02 +0000</pubDate>
      <guid>https://miek.nl/2016/march/25/writing-coredns-middleware/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;If it is not for me, give it to the next one.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Writing CoreDNS middleware consists out of four parts:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The actual middleware; the &lt;code&gt;ServeDNS&lt;/code&gt; method that gets the request.&lt;/li&gt;&#xA;&lt;li&gt;The setup part, the gets the Corefile configuration and creates the middleware.&lt;/li&gt;&#xA;&lt;li&gt;Documentation.&lt;/li&gt;&#xA;&lt;li&gt;Registration.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Note that part 1 and 2 also need tests!&lt;/p&gt;&#xA;&lt;h2 id=&#34;middleware&#34;&gt;Middleware&lt;/h2&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s take a look at the chaos middleware that returns author and version information&#xA;in the CH class. The main entry point for the whole thing is the &lt;code&gt;Chaos&lt;/code&gt; structure. That structure&#xA;holds some information and most importantly the &lt;code&gt;Next&lt;/code&gt; middleware.Handler for chaining it to the&#xA;next middleware:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
