Documentation ¶
Index ¶
- type APIConfig
- type ResolverConfig
- type Server
- func (s *Server) CreateRecord(ctx context.Context, req *api.NameserverCreateRecordReq) (*api.NameserverCreateRecordResp, error)
- func (s *Server) DeleteRecord(ctx context.Context, req *api.NameserverDeleteRecordReq) (*api.NameserverDeleteRecordResp, error)
- func (s *Server) GetRecord(ctx context.Context, req *api.NameserverGetRecordReq) (*api.NameserverGetRecordResp, error)
- func (s *Server) Init() error
- func (s *Server) ServeDNS(w dns.ResponseWriter, r *dns.Msg)
- func (s *Server) Start() error
- func (s Server) Status(ctx context.Context, _ *api.NameserverHealthReq) (*api.NameserverHealthResp, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResolverConfig ¶
ResolverConfig is a resolver configuration for a Coffee DNS Server
type Server ¶
type Server struct { *dns.Server APIConf APIConfig ResolverConf ResolverConfig Persister persist.Persist Logger *log.Logger api.UnimplementedNameserverServer }
Server is a Coffee DNS nameserver
func (*Server) CreateRecord ¶
func (s *Server) CreateRecord(ctx context.Context, req *api.NameserverCreateRecordReq) (*api.NameserverCreateRecordResp, error)
CreateRecord creates a DNS record
func (*Server) DeleteRecord ¶
func (s *Server) DeleteRecord(ctx context.Context, req *api.NameserverDeleteRecordReq) (*api.NameserverDeleteRecordResp, error)
DeleteRecord deletes a DNS record
func (*Server) GetRecord ¶
func (s *Server) GetRecord(ctx context.Context, req *api.NameserverGetRecordReq) (*api.NameserverGetRecordResp, error)
GetRecord responds to a DNS lookup
func (*Server) ServeDNS ¶
func (s *Server) ServeDNS(w dns.ResponseWriter, r *dns.Msg)
ServeDNS implements github.com/miekg/dns Handler interface
func (Server) Status ¶
func (s Server) Status(ctx context.Context, _ *api.NameserverHealthReq) (*api.NameserverHealthResp, error)
Status returns the status of the nameserver
Click to show internal directories.
Click to hide internal directories.