sync

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSkipBackendsSync = errors.New("ingress skip backends sync and beyond")

ErrSkipBackendsSync is an error that can be returned by a Controller to indicate that syncing of backends was skipped and that all other future processes should be skipped as well.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	// SyncBackends syncs the backends for a GCLB given some existing state.
	SyncBackends(state interface{}) error
	// GCBackends garbage collects backends for all Ingresses given some existing state.
	GCBackends(state interface{}) error
	// SyncLoadBalancer syncs the front-end load balancer resources for a GCLB given some existing state.
	SyncLoadBalancer(state interface{}) error
	// GCLoadBalancers garbage collects front-end load balancer resources for all Ingresses given some existing state.
	GCLoadBalancers(state interface{}) error
	// PostProcess allows for doing some post-processing after an Ingress is synced to a GCLB.
	PostProcess(state interface{}) error
}

Controller is an interface for ingress controllers and declares methods on how to sync the various portions of the GCLB for an Ingress.

type IngressSyncer

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

IngressSyncer processes an Ingress spec and produces a load balancer given an implementation of Controller.

func (*IngressSyncer) GC

func (s *IngressSyncer) GC(state interface{}) error

GC implements Syncer.

func (*IngressSyncer) Sync

func (s *IngressSyncer) Sync(state interface{}) error

Sync implements Syncer.

type Syncer

type Syncer interface {
	// Sync creates a full GCLB given some state related to an Ingress.
	Sync(state interface{}) error
	// GC cleans up GCLB resources for all Ingresses and can optionally
	// use some arbitrary to help with the process.
	// TODO(rramkumar): Do we need to rethink the strategy of GC'ing
	// all Ingresses at once?
	GC(state interface{}) error
}

Syncer is an interface to sync GCP resources associated with an Ingress.

func NewIngressSyncer

func NewIngressSyncer(controller Controller) Syncer

Jump to

Keyboard shortcuts

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