generator

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnnotationKeyGenerator    = "dns.xzzpig.com/generator"
	AnnotationKeyRecordPrefix = "dns.xzzpig.com/record-"
)

Variables

View Source
var (
	ErrGeneratorNotFound = errors.New("generator not found")
)

Functions

func GetIngress

func GetIngress(ctx context.Context) *netv1.Ingress

func New added in v1.2.0

func New(generator *dnsv1.DNSGenerator, ctx context.Context) error

func RegistedFactories added in v1.2.0

func RegistedFactories() []string

func Register

func Register(name string, factory GeneratorFactory)

Types

type ContextKey

type ContextKey string
const (
	ContextKeyIngress        ContextKey = "ingress"
	ContextKeyShowResultFunc ContextKey = "showResultFunc"
)

type DNSGeneratorSource

type DNSGeneratorSource string
const (
	DNSGeneratorSourceIngress DNSGeneratorSource = "ingress"
)

type GeneratorFactory added in v1.2.0

type GeneratorFactory func(*GeneratorFactoryArgs) (IDNSGenerator, error)

type GeneratorFactoryArgs added in v1.2.0

type GeneratorFactoryArgs struct {
	Spec *dnsv1.DNSGeneratorSpec
	Ctx  context.Context
}

type IDNSGenerator added in v1.2.0

type IDNSGenerator interface {
	Generate(ctx context.Context, source DNSGeneratorSource) ([]dnsv1.DNSRecordSpec, error)
	Support(source DNSGeneratorSource) bool
	RequeueAfter(ctx context.Context, source DNSGeneratorSource) time.Duration
}

func Get

func Get(name string) IDNSGenerator

type ShowResultFunc

type ShowResultFunc = func(reason string, message string, err error)

func GetShowResultFunc

func GetShowResultFunc(ctx context.Context) ShowResultFunc

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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