Documentation
¶
Index ¶
- Variables
- func NewEventHandler(appMgr *Manager) *eventHandler
- type ChangedObject
- type Manager
- func (appMgr *Manager) ConfigWriter() writer.Writer
- func (appMgr *Manager) IsNodePort() bool
- func (appMgr *Manager) ProcessConfigMapUpdate(changeType changeType, obj ChangedObject)
- func (appMgr *Manager) ProcessEndpointsUpdate(changeType changeType, obj ChangedObject)
- func (appMgr *Manager) ProcessNodeUpdate(obj interface{}, err error)
- func (appMgr *Manager) ProcessServiceUpdate(changeType changeType, obj ChangedObject)
- func (appMgr *Manager) RemoveNamespace(ns string)
- func (appMgr *Manager) UseNodeInternal() bool
- func (appMgr *Manager) WatchManager() watchmanager.Manager
- type Params
- type VirtualServerConfig
- type VirtualServerConfigMap
- type VirtualServerConfigs
- type VirtualServerEnumFunc
- type VirtualServerInterface
- type VirtualServers
- func (vss *VirtualServers) Assign(key serviceKey, name string, cfg *VirtualServerConfig)
- func (vss *VirtualServers) Count() int
- func (vss *VirtualServers) CountOf(key serviceKey) int
- func (vss *VirtualServers) Delete(key serviceKey, frontEndName string) bool
- func (vss *VirtualServers) ForEach(f VirtualServerEnumFunc)
- func (vss *VirtualServers) Get(key serviceKey, frontEndName string) (*VirtualServerConfig, bool)
- func (vss *VirtualServers) GetAll(key serviceKey) (VirtualServerConfigMap, bool)
- func (vss *VirtualServers) Init()
Constants ¶
This section is empty.
Variables ¶
var DEFAULT_BALANCE string = "round-robin"
var DEFAULT_MODE string = "tcp"
Functions ¶
func NewEventHandler ¶
func NewEventHandler( appMgr *Manager, ) *eventHandler
Types ¶
type ChangedObject ¶
type ChangedObject struct { Old interface{} New interface{} }
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
Create and return a new app manager that meets the Manager interface
func (*Manager) ConfigWriter ¶
func (*Manager) IsNodePort ¶
func (*Manager) ProcessConfigMapUpdate ¶
func (appMgr *Manager) ProcessConfigMapUpdate( changeType changeType, obj ChangedObject, )
Process ConfigMap objects from the controller
func (*Manager) ProcessEndpointsUpdate ¶
func (appMgr *Manager) ProcessEndpointsUpdate( changeType changeType, obj ChangedObject, )
func (*Manager) ProcessNodeUpdate ¶
Check for a change in Node state
func (*Manager) ProcessServiceUpdate ¶
func (appMgr *Manager) ProcessServiceUpdate( changeType changeType, obj ChangedObject, )
Process Service objects from the controller
func (*Manager) RemoveNamespace ¶
RemoveNamespace cleans up all virtual servers that reference a removed namespace
func (*Manager) UseNodeInternal ¶
func (*Manager) WatchManager ¶
func (appMgr *Manager) WatchManager() watchmanager.Manager
type Params ¶
type Params struct { KubeClient kubernetes.Interface ConfigWriter writer.Writer WatchManager watchmanager.Manager UseNodeInternal bool IsNodePort bool WatchAllNamespaces bool }
Struct to allow NewManager to receive all or only specific parameters.
type VirtualServerConfig ¶
type VirtualServerConfig struct { MetaData metaData `json:"-"` VirtualServer struct { Backend virtualServerBackend `json:"backend"` Frontend virtualServerFrontend `json:"frontend"` } `json:"virtualServer"` }
main virtual server configuration
type VirtualServerConfigMap ¶
type VirtualServerConfigMap map[string]*VirtualServerConfig
type VirtualServerConfigs ¶
type VirtualServerConfigs []*VirtualServerConfig
func (VirtualServerConfigs) Len ¶
func (slice VirtualServerConfigs) Len() int
func (VirtualServerConfigs) Less ¶
func (slice VirtualServerConfigs) Less(i, j int) bool
func (VirtualServerConfigs) Swap ¶
func (slice VirtualServerConfigs) Swap(i, j int)
type VirtualServerEnumFunc ¶
type VirtualServerEnumFunc func(key serviceKey, cfg *VirtualServerConfig)
callback type for ForEach()
type VirtualServerInterface ¶
type VirtualServerInterface interface { Init() Assign(key serviceKey, name string, cfg *VirtualServerConfig) Count() int CountOf(key serviceKey) int Get(key serviceKey, frontEndName string) (*VirtualServerConfig, bool) GetAll(key serviceKey) (VirtualServerConfigMap, bool) Delete(key serviceKey, frontEndName string) bool ForEach(f VirtualServerEnumFunc) }
type VirtualServers ¶
Map of Virtual Server configs
func (*VirtualServers) Assign ¶
func (vss *VirtualServers) Assign( key serviceKey, name string, cfg *VirtualServerConfig, )
Add or update cfg in VirtualServers, identified by key.
func (*VirtualServers) Count ¶
func (vss *VirtualServers) Count() int
Count of all confiugrations currently stored.
func (*VirtualServers) CountOf ¶
func (vss *VirtualServers) CountOf(key serviceKey) int
Count of all configurations for a specific backend.
func (*VirtualServers) Delete ¶
func (vss *VirtualServers) Delete(key serviceKey, frontEndName string) bool
Remove a specific configuration.
func (*VirtualServers) ForEach ¶
func (vss *VirtualServers) ForEach(f VirtualServerEnumFunc)
Iterate over all configurations, calling the supplied callback with each.
func (*VirtualServers) Get ¶
func (vss *VirtualServers) Get( key serviceKey, frontEndName string, ) (*VirtualServerConfig, bool)
Get a specific configuration.
func (*VirtualServers) GetAll ¶
func (vss *VirtualServers) GetAll( key serviceKey) (VirtualServerConfigMap, bool)
Get all configurations for a specific backend