Documentation ¶
Index ¶
- func GetSidecarConnectionVars(broker string) *models.ConnectionVariables
- func ResetBrokerMemory()
- type AbstractBrokerFactory
- type BrokerMemoryManager
- func (bmm *BrokerMemoryManager) Configs(broker string) (brokers.BrokerConfiguration, error)
- func (bmm *BrokerMemoryManager) Create(config brokers.BrokerConfiguration) error
- func (bmm *BrokerMemoryManager) Factory() SidecarManager
- func (bmm *BrokerMemoryManager) GetAll() (utils.StringArray, error)
- func (bmm *BrokerMemoryManager) GetDefault() (string, error)
- func (bmm *BrokerMemoryManager) SetDefault(broker string) error
- type Manager
- type SidecarManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSidecarConnectionVars ¶
func GetSidecarConnectionVars(broker string) *models.ConnectionVariables
GetSidecarConnectionVars returns port enviroment variable names for each possible broker
func ResetBrokerMemory ¶
func ResetBrokerMemory()
ResetBrokerMemory makes the BrokersManagers singleton points to nil, used only in tests
Types ¶
type AbstractBrokerFactory ¶
type AbstractBrokerFactory struct { }
AbstractBrokerFactory singleton and abstract factory implementation for SidecarInterface
func (*AbstractBrokerFactory) Get ¶
func (abf *AbstractBrokerFactory) Get(broker string) (models.SidecarFactory, error)
Get returns a factory for the specifyed broker
func (*AbstractBrokerFactory) Subscribe ¶
func (abf *AbstractBrokerFactory) Subscribe(broker string, factory models.SidecarFactory) error
Subscribe includes a broker specific factory on the Abstract broker factory
type BrokerMemoryManager ¶
type BrokerMemoryManager struct {
// contains filtered or unexported fields
}
BrokerMemoryManager implements the methods described by the BrokersInterface
func (*BrokerMemoryManager) Configs ¶
func (bmm *BrokerMemoryManager) Configs(broker string) (brokers.BrokerConfiguration, error)
Configs returns the configurations for a given broker
func (*BrokerMemoryManager) Create ¶
func (bmm *BrokerMemoryManager) Create(config brokers.BrokerConfiguration) error
Create configures a new broker on insprd
func (*BrokerMemoryManager) Factory ¶
func (bmm *BrokerMemoryManager) Factory() SidecarManager
Factory provides the struct implementation for Sidecarfactory
func (*BrokerMemoryManager) GetAll ¶
func (bmm *BrokerMemoryManager) GetAll() (utils.StringArray, error)
GetAll returns an array containing all currently configured brokers
func (*BrokerMemoryManager) GetDefault ¶
func (bmm *BrokerMemoryManager) GetDefault() (string, error)
GetDefault returns the broker configured as default
func (*BrokerMemoryManager) SetDefault ¶
func (bmm *BrokerMemoryManager) SetDefault(broker string) error
SetDefault sets a previously configured broker as insprd's default broker
type Manager ¶
type Manager interface { GetAll() (utils.StringArray, error) GetDefault() (string, error) Create(config brokers.BrokerConfiguration) error SetDefault(broker string) error Factory() SidecarManager Configs(broker string) (brokers.BrokerConfiguration, error) }
Manager is the interface that allows for interaction with the systems multiple brokers and its configurations.
func GetBrokerMemory ¶
func GetBrokerMemory() Manager
GetBrokerMemory allows for connection with BrokersManager sigleton
type SidecarManager ¶
type SidecarManager interface { Get(broker string) (models.SidecarFactory, error) Subscribe(broker string, factory models.SidecarFactory) error }
SidecarManager is the interface that allows the build and deployment of available brokers