targetproxy

package
v0.0.0-...-ef552c2 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FakeTargetProxySelfLink is a fake self link for target proxies.
	FakeTargetProxySelfLink = "target/proxy/self/link"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeTargetProxySyncer

type FakeTargetProxySyncer struct {
	// List of target proxies that this has been asked to ensure.
	EnsuredTargetProxies []fakeTargetProxy
}

FakeTargetProxySyncer is a fake implementation of SyncerInterface to be used in tests.

func (*FakeTargetProxySyncer) DeleteTargetProxies

func (f *FakeTargetProxySyncer) DeleteTargetProxies() error

DeleteTargetProxies deletes the target proxies that EnsureHTTPTargetProxy and EnsureHTTPSTargetProxy would have created. See interface comments for details.

func (*FakeTargetProxySyncer) EnsureHTTPSTargetProxy

func (f *FakeTargetProxySyncer) EnsureHTTPSTargetProxy(lbName, umLink, certLink string, forceUpdate bool) (string, error)

EnsureHTTPSTargetProxy ensures that a https target proxy exists for the given load balancer. See interface comments for details.

func (*FakeTargetProxySyncer) EnsureHTTPTargetProxy

func (f *FakeTargetProxySyncer) EnsureHTTPTargetProxy(lbName, umLink string, forceUpdate bool) (string, error)

EnsureHTTPTargetProxy ensures that a http target proxy exists for the given load balancer. See interface comments for details.

type Syncer

type Syncer struct {
	// contains filtered or unexported fields
}

Syncer manages GCP target proxies for multicluster GCP L7 load balancers.

func (*Syncer) DeleteTargetProxies

func (s *Syncer) DeleteTargetProxies() error

DeleteTargetProxies deletes the target proxies that EnsureHTTPTargetProxy and EnsureHTTPSTargetProxy would have created. See interface comments for details.

func (*Syncer) EnsureHTTPSTargetProxy

func (s *Syncer) EnsureHTTPSTargetProxy(lbName, umLink, certLink string, forceUpdate bool) (string, error)

EnsureHTTPSTargetProxy ensures that the required https target proxy exists for the given url map. Does nothing if it exists already, else creates a new one.

func (*Syncer) EnsureHTTPTargetProxy

func (s *Syncer) EnsureHTTPTargetProxy(lbName, umLink string, forceUpdate bool) (string, error)

EnsureHTTPTargetProxy ensures that the required http target proxy exists for the given url map. Does nothing if it exists already, else creates a new one.

type SyncerInterface

type SyncerInterface interface {
	// EnsureHTTPTargetProxy ensures that the required http target proxy
	// exists for the given load balancer and url map link. Will only
	// overwrite an existing and different http target proxy if forceUpdate
	// is true.
	// Returns the self link for the ensured proxy.
	EnsureHTTPTargetProxy(lbName, urlMapLink string, forceUpdate bool) (string, error)
	// EnsureHTTPSTargetProxy ensures that the required https target proxy
	// exists for the given load balancer and url map link. Will only
	// overwrite an existing and different http target proxy if forceUpdate
	// is true.
	// Returns the self link for the ensured proxy.
	EnsureHTTPSTargetProxy(lbName, urlMapLink, certLink string, forceUpdate bool) (string, error)
	// DeleteTargetProxies deletes the target proxies that EnsureHTTPTargetProxy
	// and EnsureHTTPSTargetProxy would have created.
	DeleteTargetProxies() error
}

SyncerInterface is an interface to manage GCP target proxies.

func NewFakeTargetProxySyncer

func NewFakeTargetProxySyncer() SyncerInterface

NewFakeTargetProxySyncer returns a new instance of the fake syncer.

func NewTargetProxySyncer

func NewTargetProxySyncer(namer *utilsnamer.Namer, tpp ingresslb.LoadBalancers) SyncerInterface

NewTargetProxySyncer returns a new instance of syncer.

Jump to

Keyboard shortcuts

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