Versions in this module Expand all Collapse all v1 v1.8.8 Jun 18, 2024 Changes in this version + const DefaultWeight + const MetaSecretName + const MetaSecretNamespace + var ErrEmptyCert = errors.New("missing cert field") + var ErrEmptyPrivKey = errors.New("missing key field") + var ErrUnknownSecretFormat = errors.New("unknown secret format") + func ExtractCA(s *v1.Secret) ([]byte, error) + func ExtractKeyPair(s *v1.Secret, hasPrivateKey bool) ([]byte, []byte, error) + func ValidateRemoteAddrs(remoteAddrs []string) error + type TranslateContext struct + GlobalRules []*apisix.GlobalRule + PluginConfigs []*apisix.PluginConfig + Routes []*apisix.Route + SSL []*apisix.Ssl + StreamRoutes []*apisix.StreamRoute + UpstreamMap map[string]struct{} + Upstreams []*apisix.Upstream + func DefaultEmptyTranslateContext() *TranslateContext + func (tc *TranslateContext) AddGlobalRule(gr *apisix.GlobalRule) + func (tc *TranslateContext) AddPluginConfig(pc *apisix.PluginConfig) + func (tc *TranslateContext) AddRoute(r *apisix.Route) + func (tc *TranslateContext) AddSSL(ssl *apisix.Ssl) + func (tc *TranslateContext) AddStreamRoute(sr *apisix.StreamRoute) + func (tc *TranslateContext) AddUpstream(u *apisix.Upstream) + func (tc *TranslateContext) CheckUpstreamExist(name string) (ok bool) + type TranslateError struct + Field string + Reason string + func (te *TranslateError) Error() string + type Translator interface + TranslateEndpoint func(kube.Endpoint, int32, types.Labels) (apisixv1.UpstreamNodes, error) + TranslateService func(string, string, string, int32) (*apisixv1.Upstream, error) + TranslateUpstreamConfigV2 func(*configv2.ApisixUpstreamConfig) (*apisixv1.Upstream, error) + func NewTranslator(opts *TranslatorOptions) Translator + type TranslatorOptions struct + APIVersion string + ApisixUpstreamLister kube.ApisixUpstreamLister + EndpointLister kube.EndpointLister + IngressClassName string + PodLister listerscorev1.PodLister + PodProvider pod.Provider + SecretLister listerscorev1.SecretLister + ServiceLister listerscorev1.ServiceLister v1.8.5 Jun 12, 2024