f5router

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2018 License: Apache-2.0 Imports: 29 Imported by: 5

Documentation

Index

Constants

View Source
const (
	// HTTPRouterName HTTP virtual server name
	HTTPRouterName = "routing-vip-http"
	// HTTPSRouterName HTTPS virtual server name
	HTTPSRouterName = "routing-vip-https"
	// CFRoutingPolicyName Policy name for CF routing
	CFRoutingPolicyName = "cf-routing-policy"
	// InternalDataGroupName on BIG-IP
	InternalDataGroupName = "cf-ctlr-data-group"
	// BrokerDataGroupName on BIG-IP
	BrokerDataGroupName = "cf-broker-data-group"
)
View Source
const (
	// DefaultCmd default config driver
	DefaultCmd = "python/bigipconfigdriver.py"
)

Variables

This section is empty.

Functions

func NewTCPUpdate

func NewTCPUpdate(
	c *config.Config,
	logger logger.Logger,
	op routeUpdate.Operation,
	routePort uint16,
	member bigipResources.Member,
) (updateTCP, error)

NewTCPUpdate satisfies the interface of a routeUpdate

func NewUpdate

func NewUpdate(
	logger logger.Logger,
	op routeUpdate.Operation,
	uri route.Uri,
	ep *route.Endpoint,
	planID string,
) (updateHTTP, error)

NewUpdate creates a new HTTP route update

Types

type ConfigWriter

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

ConfigWriter Writer instance to output configuration

func NewConfigWriter

func NewConfigWriter(logger logger.Logger) (*ConfigWriter, error)

NewConfigWriter creates and returns a config writer

func (*ConfigWriter) Close

func (cw *ConfigWriter) Close()

Close close file and delete temp file

func (*ConfigWriter) GetOutputFilename

func (cw *ConfigWriter) GetOutputFilename() string

GetOutputFilename return config filename

func (*ConfigWriter) Write

func (cw *ConfigWriter) Write(input []byte) (n int, err error)

Write creates file lock and outputs byte slice

type Driver

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

Driver type which provides ifrit process interface

func NewDriver

func NewDriver(
	configFile string,
	driverCmd string,
	logger logger.Logger,
) *Driver

NewDriver create ifrit process instance

func (*Driver) Run

func (d *Driver) Run(signals <-chan os.Signal, ready chan<- struct{}) error

Run start the F5Router configuration driver

type F5Router

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

F5Router controller of BigIP configuration objects

func NewF5Router

func NewF5Router(
	logger logger.Logger,
	c *config.Config,
	writer Writer,
) (*F5Router, error)

NewF5Router create the F5Router route controller

func (*F5Router) AddBindIDRouteURIPlanNameMapping added in v1.1.0

func (r *F5Router) AddBindIDRouteURIPlanNameMapping(bindID, routeURI, planID string)

AddBindIDRouteURIPlanNameMapping maps bind ID to a route's URI and plan's ID

func (*F5Router) AddPlans added in v1.1.0

func (r *F5Router) AddPlans(plans map[string]planResources.Plan)

AddPlans adds service broker provided plans to the router

func (*F5Router) GetRouteURIFromBindID added in v1.1.0

func (r *F5Router) GetRouteURIFromBindID(bindID string) string

GetRouteURIFromBindID gets the route's URI associated with the bind ID

func (*F5Router) RemoveBindIDRouteURIPlanNameMapping added in v1.1.0

func (r *F5Router) RemoveBindIDRouteURIPlanNameMapping(bindID string)

RemoveBindIDRouteURIPlanNameMapping removes mapping of bind ID to a route's URI and plan's ID

func (*F5Router) Run

func (r *F5Router) Run(signals <-chan os.Signal, ready chan<- struct{}) error

Run start the F5Router controller

func (*F5Router) UpdateRoute

func (r *F5Router) UpdateRoute(ru routeUpdate.RouteUpdate)

UpdateRoute send update information to processor

func (*F5Router) VerifyPlanExists added in v1.1.0

func (r *F5Router) VerifyPlanExists(planID string) error

VerifyPlanExists verifies that the plan exists for the router

type Router added in v1.1.0

type Router interface {
	AddPlans(plans map[string]planResources.Plan)
	VerifyPlanExists(planID string) error
	UpdateRoute(ru routeUpdate.RouteUpdate)
	AddBindIDRouteURIPlanNameMapping(bindID, routeURI, planID string)
	RemoveBindIDRouteURIPlanNameMapping(bindID string)
	GetRouteURIFromBindID(bindID string) string
}

Router interface for the F5Router

type Writer

type Writer interface {
	GetOutputFilename() string
	Write(input []byte) (n int, err error)
}

Writer interface to support unit testing

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.
fakes
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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