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 ¶
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 ¶
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 ¶
CoreDNSExposedIPs retrieves list of IP's exposed by CoreDNS
func (*Gslb) GetExternalTargets ¶
func (*Gslb) GslbIngressExposedIPs ¶
func (r *Gslb) GslbIngressExposedIPs(gslb *k8gbv1beta1.Gslb) ([]string, error)
GslbIngressExposedIPs retrieves list of IP's exposed by all GSLB ingresses
func (*Gslb) InspectTXTThreshold ¶
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 ¶
RemoveEndpoint removes endpoint
func (*Gslb) SaveDNSEndpoint ¶
func (r *Gslb) SaveDNSEndpoint(namespace string, i *externaldns.DNSEndpoint) error
SaveDNSEndpoint update DNS endpoint or create new one if doesnt exist
type MockAssistant ¶
type MockAssistant struct {
// contains filtered or unexported fields
}
MockAssistant is a mock of Assistant interface.
func NewMockAssistant ¶
func NewMockAssistant(ctrl *gomock.Controller) *MockAssistant
NewMockAssistant creates a new mock instance.
func (*MockAssistant) CoreDNSExposedIPs ¶
func (m *MockAssistant) CoreDNSExposedIPs() ([]string, error)
CoreDNSExposedIPs mocks base method.
func (*MockAssistant) EXPECT ¶
func (m *MockAssistant) EXPECT() *MockAssistantMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockAssistant) GetExternalTargets ¶
func (m *MockAssistant) GetExternalTargets(host string, extClusterNsNames map[string]string) []string
GetExternalTargets mocks base method.
func (*MockAssistant) GslbIngressExposedIPs ¶
func (m *MockAssistant) GslbIngressExposedIPs(gslb *v1beta1.Gslb) ([]string, error)
GslbIngressExposedIPs mocks base method.
func (*MockAssistant) InspectTXTThreshold ¶
func (m *MockAssistant) InspectTXTThreshold(fqdn string, splitBrainThreshold time.Duration) error
InspectTXTThreshold mocks base method.
func (*MockAssistant) RemoveEndpoint ¶
func (m *MockAssistant) RemoveEndpoint(endpointName string) error
RemoveEndpoint mocks base method.
func (*MockAssistant) SaveDNSEndpoint ¶
func (m *MockAssistant) SaveDNSEndpoint(namespace string, i *endpoint.DNSEndpoint) error
SaveDNSEndpoint mocks base method.
type MockAssistantMockRecorder ¶
type MockAssistantMockRecorder struct {
// contains filtered or unexported fields
}
MockAssistantMockRecorder is the mock recorder for MockAssistant.
func (*MockAssistantMockRecorder) CoreDNSExposedIPs ¶
func (mr *MockAssistantMockRecorder) CoreDNSExposedIPs() *gomock.Call
CoreDNSExposedIPs indicates an expected call of CoreDNSExposedIPs.
func (*MockAssistantMockRecorder) GetExternalTargets ¶
func (mr *MockAssistantMockRecorder) GetExternalTargets(host, extClusterNsNames interface{}) *gomock.Call
GetExternalTargets indicates an expected call of GetExternalTargets.
func (*MockAssistantMockRecorder) GslbIngressExposedIPs ¶
func (mr *MockAssistantMockRecorder) GslbIngressExposedIPs(gslb interface{}) *gomock.Call
GslbIngressExposedIPs indicates an expected call of GslbIngressExposedIPs.
func (*MockAssistantMockRecorder) InspectTXTThreshold ¶
func (mr *MockAssistantMockRecorder) InspectTXTThreshold(fqdn, splitBrainThreshold interface{}) *gomock.Call
InspectTXTThreshold indicates an expected call of InspectTXTThreshold.
func (*MockAssistantMockRecorder) RemoveEndpoint ¶
func (mr *MockAssistantMockRecorder) RemoveEndpoint(endpointName interface{}) *gomock.Call
RemoveEndpoint indicates an expected call of RemoveEndpoint.
func (*MockAssistantMockRecorder) SaveDNSEndpoint ¶
func (mr *MockAssistantMockRecorder) SaveDNSEndpoint(namespace, i interface{}) *gomock.Call
SaveDNSEndpoint indicates an expected call of SaveDNSEndpoint.