assistant

package
v0.8.8 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package assistant is a generated GoMock package.

Index

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

func (*Gslb) CoreDNSExposedIPs

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

CoreDNSExposedIPs retrieves list of IP's exposed by CoreDNS

func (*Gslb) GetExternalTargets

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

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

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

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

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

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.

Jump to

Keyboard shortcuts

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