ipfailover

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: May 19, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Default IP Failover resource name.
	DefaultName = "ipfailover"

	// Default IP Failover type.
	DefaultType = "keepalived"

	// Default service port.
	DefaultServicePort = 1985

	// Default IP Failover watched port number.
	DefaultWatchPort = 80

	// Default resource selector.
	DefaultSelector = "ipfailover=<name>"

	// Default network interface.
	DefaultInterface = "eth0"
)

Variables

This section is empty.

Functions

func ValidateCmdOptions

func ValidateCmdOptions(options *IPFailoverConfigCmdOptions, c *Configurator) error

Validate command line operations.

func ValidateIPAddress

func ValidateIPAddress(ip string) error

Validate IP address.

func ValidateIPAddressRange

func ValidateIPAddressRange(iprange string) error

Validate an IP address range or single IP address.

func ValidateVirtualIPs

func ValidateVirtualIPs(vips string) error

Validate virtual IP range/addresses.

Types

type Configurator

type Configurator struct {
	Name   string
	Plugin IPFailoverConfiguratorPlugin
	Writer io.Writer
}

func NewConfigurator

func NewConfigurator(name string, plugin IPFailoverConfiguratorPlugin, out io.Writer) *Configurator

func (*Configurator) Create

func (c *Configurator) Create() error

func (*Configurator) Generate

func (c *Configurator) Generate() (*kapi.List, error)

type IPFailoverConfigCmdOptions

type IPFailoverConfigCmdOptions struct {
	Type          string
	ImageTemplate variable.ImageTemplate
	Credentials   string
	ServicePort   int
	Selector      string
	Create        bool

	//  Failover options.
	VirtualIPs       string
	NetworkInterface string
	WatchPort        int
	Replicas         int
}

Options supported by the IP Failover admin command.

type IPFailoverConfiguratorPlugin

type IPFailoverConfiguratorPlugin interface {
	GetWatchPort() (int, error)
	GetSelector() (map[string]string, error)
	GetNamespace() (string, error)
	GetDeploymentConfig() (*deployapi.DeploymentConfig, error)
	Generate() (*kapi.List, error)
	Create(out io.Writer) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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