redisdyndns

package
v0.0.0-...-6badf63 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2024 License: EUPL-1.2 Imports: 10 Imported by: 0

Documentation

Overview

* Copyright 2024 eBlocker Open Source UG (haftungsbeschraenkt) * * Licensed under the EUPL, Version 1.2 or - as soon they will be * approved by the European Commission - subsequent versions of the EUPL * (the "License"); You may not use this work except in compliance with * the License. You may obtain a copy of the License at: * * https://joinup.ec.europa.eu/page/eupl-text-11-12 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License.

* Copyright 2024 eBlocker Open Source UG (haftungsbeschraenkt) * * Licensed under the EUPL, Version 1.2 or - as soon they will be * approved by the European Commission - subsequent versions of the EUPL * (the "License"); You may not use this work except in compliance with * the License. You may obtain a copy of the License at: * * https://joinup.ec.europa.eu/page/eupl-text-11-12 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database interface {
	// Query looks up a string value given a query string
	Query(ctx context.Context, query string) (string, error)
}

Database is a read-only key-value store

type RedisDatabase

type RedisDatabase struct {
	Client redis.Client
}

func (*RedisDatabase) Query

func (rdb *RedisDatabase) Query(ctx context.Context, query string) (string, error)

Query implements interface Database

type RedisDynDns

type RedisDynDns struct {
	Next     plugin.Handler
	Domains  []string
	Database Database
}

func NewRedisDynDns

func NewRedisDynDns(next plugin.Handler, domains []string) *RedisDynDns

newRedisDynDns creates a new plugin handler that uses Redis at localhost:6379

func (RedisDynDns) Name

func (r RedisDynDns) Name() string

Name implements plugin.Handler.

func (*RedisDynDns) ServeDNS

func (rd *RedisDynDns) ServeDNS(ctx context.Context, writer dns.ResponseWriter, req *dns.Msg) (int, error)

ServeDNS implements plugin.Handler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL