assistant

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

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

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 NewGslbAssistant(client client.Client, k8gbNamespace string, edgeDNSServers []utils.DNSServer) *Gslb

func (*Gslb) CoreDNSExposedIPs added in v0.8.1

func (r *Gslb) CoreDNSExposedIPs() ([]string, error)

CoreDNSExposedIPs retrieves list of IP's exposed by CoreDNS

func (*Gslb) GetExternalTargets added in v0.8.1

func (r *Gslb) GetExternalTargets(host string, extClusterNsNames map[string]string) (targets []string)

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

func (r *Gslb) InspectTXTThreshold(fqdn string, splitBrainThreshold time.Duration) error

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

func (r *Gslb) RemoveEndpoint(endpointName string) error

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

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.

Jump to

Keyboard shortcuts

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