Documentation ¶
Index ¶
- Constants
- Variables
- func GetIngress(ctx context.Context) *netv1.Ingress
- func New(generator *dnsv1.DNSGenerator, ctx context.Context) error
- func RegistedFactories() []string
- func Register(name string, factory GeneratorFactory)
- type ContextKey
- type DNSGeneratorSource
- type GeneratorFactory
- type GeneratorFactoryArgs
- type IDNSGenerator
- type ShowResultFunc
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 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 ¶
func GetShowResultFunc ¶
func GetShowResultFunc(ctx context.Context) ShowResultFunc
Click to show internal directories.
Click to hide internal directories.