selfhosted

package
v0.0.0-...-526b324 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: Unlicense Imports: 24 Imported by: 0

Documentation

Overview

Package example is a CoreDNS plugin that prints "example" to stdout on every packet received.

It serves as an example CoreDNS plugin with numerous code comments.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SelfHosted

type SelfHosted struct {
	Next plugin.Handler

	shproto.UnimplementedDNSServer
	shproto.UnimplementedRestartServer
	// contains filtered or unexported fields
}

Example is an example plugin to show how to write a plugin.

func (*SelfHosted) CleanUp

func (s *SelfHosted) CleanUp(ctx context.Context, record *shproto.Record) (*shproto.Empty, error)

CleanUp grpc endpoint. See cert-manager's webhook documentation.

func (*SelfHosted) Name

func (s *SelfHosted) Name() string

Name implements the Handler interface.

func (*SelfHosted) Present

func (s *SelfHosted) Present(ctx context.Context, record *shproto.Record) (*shproto.Empty, error)

Present grpc endpoint. See cert-manager's webhook documentation.

func (*SelfHosted) Quit

func (s *SelfHosted) Quit(ctx context.Context, _ *shproto.Empty) (*shproto.Empty, error)

CleanUp grpc endpoint. See cert-manager's webhook documentation.

func (*SelfHosted) Ready

func (s *SelfHosted) Ready() bool

Ready implements the ready.Readiness interface, once this flips to true CoreDNS assumes this plugin is ready for queries; it is not checked again.

func (*SelfHosted) ServeDNS

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

ServeDNS implements the plugin.Handler interface. This method gets called when example is used in a Server.

Jump to

Keyboard shortcuts

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