stellar

package module
v0.0.0-...-b2de6a9 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2022 License: Apache-2.0 Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Stellar CoreDNS Plugin

This is a CoreDNS Plugin that resolves queries for applications and services running in a Stellar system.

Build

See the CoreDNS docs on how to build a CoreDNS version with an external plugin using this repository.

Configuration and Usage

To use the plugin, specify a CoreDNS configuration similar to the following:

stellar.local {
  log
  debug
  stellar <stellar-server-address:8080> {
    fallthrough
  }
}

Replace stellar.local with whatever domain you want to resolve as and <stellar-server-address> with the address of one of your Stellar servers.

With an application deployed, you can query all services by just using the application name. For example, if the application is named nginx-example you can dig nginx-example.stellar.local and get something similar to this:

;; ANSWER SECTION:
nginx.nginx-example.stellar.local. 0 IN A       10.10.228.101
nginx.nginx-example.stellar.local. 0 IN A       10.10.228.102
cache.nginx-example.stellar.local. 0 IN A       10.10.228.103
cache.nginx-example.stellar.local. 0 IN A       10.10.228.104

You can also query an individual service by specifying the service name as a prefix. For example, to query for the service nginx in the application nginx-example you can dig nginx.nginx-example.stellar.local and get something like:

;; ANSWER SECTION:
nginx.nginx-example.stellar.local. 0 IN A       10.10.228.101
nginx.nginx-example.stellar.local. 0 IN A       10.10.228.102

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stellar

type Stellar struct {
	Next  plugin.Handler
	Fall  fall.F
	Zones []string
	// contains filtered or unexported fields
}

Stellar is a CoreDNS plugin that resolves DNS entries from the Stellar system

func (*Stellar) Name

func (s *Stellar) Name() string

Name implements the Handler interface

func (*Stellar) Ready

func (s *Stellar) Ready() bool

Ready implements the ready.Readiness interface

func (*Stellar) ServeDNS

func (s *Stellar) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error)

ServeDNS implements the plugin.Handler interface

Jump to

Keyboard shortcuts

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