Documentation
¶
Index ¶
- type CommandGenerator
- type IDGenerator
- type StorageEntity
- func (storageEntity *StorageEntity) GetAllApplicationServersIPWhoHaveTunnels() ([]string, error)
- func (storageEntity *StorageEntity) GetServiceInfo(serviceData *domain.ServiceInfo, eventID string) (*domain.ServiceInfo, error)
- func (storageEntity *StorageEntity) LoadAllStorageDataToDomainModels() ([]*domain.ServiceInfo, error)
- func (storageEntity *StorageEntity) LoadCacheFromStorage(oldStorageEntity *StorageEntity) error
- func (storageEntity *StorageEntity) NewServiceInfoToStorage(serviceData *domain.ServiceInfo, eventID string) error
- func (storageEntity *StorageEntity) ReadTunnelInfoForApplicationServer(ip string) *domain.TunnelForApplicationServer
- func (storageEntity *StorageEntity) RemoveAllTunnelsInfoForApplicationServer(ip string) error
- func (storageEntity *StorageEntity) RemoveServiceInfoFromStorage(serviceData *domain.ServiceInfo, eventID string) error
- func (storageEntity *StorageEntity) RemoveTunnelsInfoForApplicationServerFromStorage(ip string) error
- func (storageEntity *StorageEntity) UpdateServiceInfo(serviceData *domain.ServiceInfo, eventID string) error
- func (storageEntity *StorageEntity) UpdateTunnelFilesInfoAtStorage(tunnelsFilesInfo []*domain.TunnelForApplicationServer) error
- type TunnelFileMaker
- func (tunnelFileMaker *TunnelFileMaker) CreateTunnel(tunnelFilesInfo *domain.TunnelForApplicationServer, createTunnelID string) error
- func (tunnelFileMaker *TunnelFileMaker) CreateTunnels(tunnelsFilesInfo []*domain.TunnelForApplicationServer, createTunnelID string) ([]*domain.TunnelForApplicationServer, error)
- func (tunnelFileMaker *TunnelFileMaker) RemoveAllTunnels(tunnelsFilesInfo []*domain.TunnelForApplicationServer, removeTunnelID string) error
- func (tunnelFileMaker *TunnelFileMaker) RemoveTunnel(tunnelFilesInfo *domain.TunnelForApplicationServer, removeTunnelID string) error
- func (tunnelFileMaker *TunnelFileMaker) RemoveTunnels(tunnelsFilesInfo []*domain.TunnelForApplicationServer, removeTunnelID string) ([]*domain.TunnelForApplicationServer, error)
- type UUIDGenerator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandGenerator ¶
type CommandGenerator struct { }
CommandGenerator ...
func (*CommandGenerator) GenerateCommandsForApplicationServers ¶
func (commandGenerator *CommandGenerator) GenerateCommandsForApplicationServers(serviceInfo *domain.ServiceInfo, eventID string) error
GenerateCommandsForApplicationServers ...
type IDGenerator ¶
type IDGenerator struct { }
IDGenerator ...
func (*IDGenerator) NewID ¶
func (idGenerator *IDGenerator) NewID() string
NewID generate new ID in domain id model/struct
type StorageEntity ¶
StorageEntity ...
func NewStorageEntity ¶
func NewStorageEntity(isInMemory bool, dbPath string, logging *logrus.Logger) (*StorageEntity, error)
NewStorageEntity ... do not forget defer Db.Close()!
func (*StorageEntity) GetAllApplicationServersIPWhoHaveTunnels ¶
func (storageEntity *StorageEntity) GetAllApplicationServersIPWhoHaveTunnels() ([]string, error)
GetAllApplicationServersWhoHaveTunnels bad code :(
func (*StorageEntity) GetServiceInfo ¶
func (storageEntity *StorageEntity) GetServiceInfo(serviceData *domain.ServiceInfo, eventID string) (*domain.ServiceInfo, error)
GetServiceInfo ...
func (*StorageEntity) LoadAllStorageDataToDomainModels ¶
func (storageEntity *StorageEntity) LoadAllStorageDataToDomainModels() ([]*domain.ServiceInfo, error)
LoadAllStorageDataToDomainModels ...
func (*StorageEntity) LoadCacheFromStorage ¶
func (storageEntity *StorageEntity) LoadCacheFromStorage(oldStorageEntity *StorageEntity) error
LoadCacheFromStorage ...
func (*StorageEntity) NewServiceInfoToStorage ¶
func (storageEntity *StorageEntity) NewServiceInfoToStorage(serviceData *domain.ServiceInfo, eventID string) error
NewServiceInfoToStorage add new service to storage
func (*StorageEntity) ReadTunnelInfoForApplicationServer ¶
func (storageEntity *StorageEntity) ReadTunnelInfoForApplicationServer(ip string) *domain.TunnelForApplicationServer
ReadTunnelInfoForApplicationServer return nil, if key not exist
func (*StorageEntity) RemoveAllTunnelsInfoForApplicationServer ¶
func (storageEntity *StorageEntity) RemoveAllTunnelsInfoForApplicationServer(ip string) error
RemoveAllTunnelsInfoForApplicationServer
func (*StorageEntity) RemoveServiceInfoFromStorage ¶
func (storageEntity *StorageEntity) RemoveServiceInfoFromStorage(serviceData *domain.ServiceInfo, eventID string) error
RemoveServiceInfoFromStorage ...
func (*StorageEntity) RemoveTunnelsInfoForApplicationServerFromStorage ¶
func (storageEntity *StorageEntity) RemoveTunnelsInfoForApplicationServerFromStorage(ip string) error
RemoveTunnelsInfoForApplicationServerFromStorage ...
func (*StorageEntity) UpdateServiceInfo ¶
func (storageEntity *StorageEntity) UpdateServiceInfo(serviceData *domain.ServiceInfo, eventID string) error
UpdateServiceInfo validate and update service
func (*StorageEntity) UpdateTunnelFilesInfoAtStorage ¶
func (storageEntity *StorageEntity) UpdateTunnelFilesInfoAtStorage(tunnelsFilesInfo []*domain.TunnelForApplicationServer) error
UpdateTunnelFilesInfoAtStorage ...
type TunnelFileMaker ¶
type TunnelFileMaker struct {
// contains filtered or unexported fields
}
TunnelFileMaker ...
func NewTunnelFileMaker ¶
func NewTunnelFileMaker(sysctlConfFilePath string, isMockMode bool, logging *logrus.Logger) *TunnelFileMaker
NewTunnelFileMaker ...
func (*TunnelFileMaker) CreateTunnel ¶
func (tunnelFileMaker *TunnelFileMaker) CreateTunnel(tunnelFilesInfo *domain.TunnelForApplicationServer, createTunnelID string) error
CreateTunnel ...
func (*TunnelFileMaker) CreateTunnels ¶
func (tunnelFileMaker *TunnelFileMaker) CreateTunnels(tunnelsFilesInfo []*domain.TunnelForApplicationServer, createTunnelID string) ([]*domain.TunnelForApplicationServer, error)
CreateTunnels ...
func (*TunnelFileMaker) RemoveAllTunnels ¶
func (tunnelFileMaker *TunnelFileMaker) RemoveAllTunnels(tunnelsFilesInfo []*domain.TunnelForApplicationServer, removeTunnelID string) error
RemoveAllTunnels remove tunnels whithout any checks
func (*TunnelFileMaker) RemoveTunnel ¶
func (tunnelFileMaker *TunnelFileMaker) RemoveTunnel(tunnelFilesInfo *domain.TunnelForApplicationServer, removeTunnelID string) error
RemoveTunnel ...
func (*TunnelFileMaker) RemoveTunnels ¶
func (tunnelFileMaker *TunnelFileMaker) RemoveTunnels(tunnelsFilesInfo []*domain.TunnelForApplicationServer, removeTunnelID string) ([]*domain.TunnelForApplicationServer, error)
RemoveTunnels ...
type UUIDGenerator ¶
type UUIDGenerator struct { }
UUIDGenerator ...
func (*UUIDGenerator) NewID ¶
func (uuidGenerator *UUIDGenerator) NewID() string
NewID generate new ID in domain id model/struct