Documentation ¶
Overview ¶
Copyright 2021 The k8gb Contributors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Generated by GoLic, for more details see: https://github.com/AbsaOSS/golic
Package assistant is a generated GoMock package.
Copyright 2021 The k8gb Contributors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Generated by GoLic, for more details see: https://github.com/AbsaOSS/golic
Index ¶
- type Assistant
- type Gslb
- func (r *Gslb) CoreDNSExposedIPs() ([]string, error)
- func (r *Gslb) GetExternalTargets(host string, extClusterNsNames map[string]string) (targets []string)
- func (r *Gslb) GslbIngressExposedIPs(gslb *k8gbv1beta1.Gslb) ([]string, error)
- func (r *Gslb) InspectTXTThreshold(fqdn string, splitBrainThreshold time.Duration) error
- func (r *Gslb) RemoveEndpoint(endpointName string) error
- func (r *Gslb) SaveDNSEndpoint(namespace string, i *externaldns.DNSEndpoint) error
- type MockAssistant
- func (m *MockAssistant) CoreDNSExposedIPs() ([]string, error)
- func (m *MockAssistant) EXPECT() *MockAssistantMockRecorder
- func (m *MockAssistant) GetExternalTargets(host string, extClusterNsNames map[string]string) []string
- func (m *MockAssistant) GslbIngressExposedIPs(gslb *v1beta1.Gslb) ([]string, error)
- func (m *MockAssistant) InspectTXTThreshold(fqdn string, splitBrainThreshold time.Duration) error
- func (m *MockAssistant) RemoveEndpoint(endpointName string) error
- func (m *MockAssistant) SaveDNSEndpoint(namespace string, i *endpoint.DNSEndpoint) error
- type MockAssistantMockRecorder
- func (mr *MockAssistantMockRecorder) CoreDNSExposedIPs() *gomock.Call
- func (mr *MockAssistantMockRecorder) GetExternalTargets(host, extClusterNsNames interface{}) *gomock.Call
- func (mr *MockAssistantMockRecorder) GslbIngressExposedIPs(gslb interface{}) *gomock.Call
- func (mr *MockAssistantMockRecorder) InspectTXTThreshold(fqdn, splitBrainThreshold interface{}) *gomock.Call
- func (mr *MockAssistantMockRecorder) RemoveEndpoint(endpointName interface{}) *gomock.Call
- func (mr *MockAssistantMockRecorder) SaveDNSEndpoint(namespace, i interface{}) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assistant ¶ added in v0.8.1
type Assistant interface { // CoreDNSExposedIPs retrieves list of exposed IP by CoreDNS CoreDNSExposedIPs() ([]string, error) // GslbIngressExposedIPs retrieves list of IP's exposed by all GSLB ingresses GslbIngressExposedIPs(gslb *k8gbv1beta1.Gslb) ([]string, error) // GetExternalTargets retrieves slice of targets from external clusters GetExternalTargets(host string, extClusterNsNames map[string]string) (targets []string) // SaveDNSEndpoint update DNS endpoint or create new one if doesnt exist SaveDNSEndpoint(namespace string, i *externaldns.DNSEndpoint) error // RemoveEndpoint removes endpoint RemoveEndpoint(endpointName string) error // InspectTXTThreshold inspects fqdn TXT record from edgeDNSServer. If record doesn't exists or timestamp is greater than // splitBrainThreshold the error is returned. In case fakeDNSEnabled is true, 127.0.0.1:7753 is used as edgeDNSServer InspectTXTThreshold(fqdn string, splitBrainThreshold time.Duration) error }
type Gslb ¶ added in v0.8.1
type Gslb struct {
// contains filtered or unexported fields
}
Gslb is common wrapper operating on GSLB instance. It uses apimachinery client to call kubernetes API
func NewGslbAssistant ¶
func (*Gslb) CoreDNSExposedIPs ¶ added in v0.8.1
CoreDNSExposedIPs retrieves list of IP's exposed by CoreDNS
func (*Gslb) GetExternalTargets ¶ added in v0.8.1
func (*Gslb) GslbIngressExposedIPs ¶ added in v0.8.1
func (r *Gslb) GslbIngressExposedIPs(gslb *k8gbv1beta1.Gslb) ([]string, error)
GslbIngressExposedIPs retrieves list of IP's exposed by all GSLB ingresses
func (*Gslb) InspectTXTThreshold ¶ added in v0.8.1
InspectTXTThreshold inspects fqdn TXT record from edgeDNSServer. If record doesn't exists or timestamp is greater than splitBrainThreshold the error is returned.
func (*Gslb) RemoveEndpoint ¶ added in v0.8.1
RemoveEndpoint removes endpoint
func (*Gslb) SaveDNSEndpoint ¶ added in v0.8.1
func (r *Gslb) SaveDNSEndpoint(namespace string, i *externaldns.DNSEndpoint) error
SaveDNSEndpoint update DNS endpoint or create new one if doesnt exist
type MockAssistant ¶ added in v0.8.1
type MockAssistant struct {
// contains filtered or unexported fields
}
MockAssistant is a mock of Assistant interface.
func NewMockAssistant ¶ added in v0.8.1
func NewMockAssistant(ctrl *gomock.Controller) *MockAssistant
NewMockAssistant creates a new mock instance.
func (*MockAssistant) CoreDNSExposedIPs ¶ added in v0.8.1
func (m *MockAssistant) CoreDNSExposedIPs() ([]string, error)
CoreDNSExposedIPs mocks base method.
func (*MockAssistant) EXPECT ¶ added in v0.8.1
func (m *MockAssistant) EXPECT() *MockAssistantMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockAssistant) GetExternalTargets ¶ added in v0.8.1
func (m *MockAssistant) GetExternalTargets(host string, extClusterNsNames map[string]string) []string
GetExternalTargets mocks base method.
func (*MockAssistant) GslbIngressExposedIPs ¶ added in v0.8.1
func (m *MockAssistant) GslbIngressExposedIPs(gslb *v1beta1.Gslb) ([]string, error)
GslbIngressExposedIPs mocks base method.
func (*MockAssistant) InspectTXTThreshold ¶ added in v0.8.1
func (m *MockAssistant) InspectTXTThreshold(fqdn string, splitBrainThreshold time.Duration) error
InspectTXTThreshold mocks base method.
func (*MockAssistant) RemoveEndpoint ¶ added in v0.8.1
func (m *MockAssistant) RemoveEndpoint(endpointName string) error
RemoveEndpoint mocks base method.
func (*MockAssistant) SaveDNSEndpoint ¶ added in v0.8.1
func (m *MockAssistant) SaveDNSEndpoint(namespace string, i *endpoint.DNSEndpoint) error
SaveDNSEndpoint mocks base method.
type MockAssistantMockRecorder ¶ added in v0.8.1
type MockAssistantMockRecorder struct {
// contains filtered or unexported fields
}
MockAssistantMockRecorder is the mock recorder for MockAssistant.
func (*MockAssistantMockRecorder) CoreDNSExposedIPs ¶ added in v0.8.1
func (mr *MockAssistantMockRecorder) CoreDNSExposedIPs() *gomock.Call
CoreDNSExposedIPs indicates an expected call of CoreDNSExposedIPs.
func (*MockAssistantMockRecorder) GetExternalTargets ¶ added in v0.8.1
func (mr *MockAssistantMockRecorder) GetExternalTargets(host, extClusterNsNames interface{}) *gomock.Call
GetExternalTargets indicates an expected call of GetExternalTargets.
func (*MockAssistantMockRecorder) GslbIngressExposedIPs ¶ added in v0.8.1
func (mr *MockAssistantMockRecorder) GslbIngressExposedIPs(gslb interface{}) *gomock.Call
GslbIngressExposedIPs indicates an expected call of GslbIngressExposedIPs.
func (*MockAssistantMockRecorder) InspectTXTThreshold ¶ added in v0.8.1
func (mr *MockAssistantMockRecorder) InspectTXTThreshold(fqdn, splitBrainThreshold interface{}) *gomock.Call
InspectTXTThreshold indicates an expected call of InspectTXTThreshold.
func (*MockAssistantMockRecorder) RemoveEndpoint ¶ added in v0.8.1
func (mr *MockAssistantMockRecorder) RemoveEndpoint(endpointName interface{}) *gomock.Call
RemoveEndpoint indicates an expected call of RemoveEndpoint.
func (*MockAssistantMockRecorder) SaveDNSEndpoint ¶ added in v0.8.1
func (mr *MockAssistantMockRecorder) SaveDNSEndpoint(namespace, i interface{}) *gomock.Call
SaveDNSEndpoint indicates an expected call of SaveDNSEndpoint.