Documentation ¶
Index ¶
- type AlgFactory
- type DefaultAlgFactory
- func (a *DefaultAlgFactory) GetAlgorithmById(algoId uint) (stmodel.Algorithm, bool)
- func (a *DefaultAlgFactory) GetProdAlgs() ([]stmodel.Algorithm, error)
- func (a *DefaultAlgFactory) GetSdbxAlgs() ([]stmodel.Algorithm, error)
- func (a *DefaultAlgFactory) NewHist(alg *entity.Algorithm) (stmodel.Algorithm, error)
- func (a *DefaultAlgFactory) NewProd(alg *entity.Algorithm) (stmodel.Algorithm, error)
- func (a *DefaultAlgFactory) NewRange(alg *entity.Algorithm) ([]stmodel.Algorithm, error)
- func (a *DefaultAlgFactory) NewSandbox(alg *entity.Algorithm) (stmodel.Algorithm, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlgFactory ¶
type AlgFactory interface { //NewProd returns new production algorithm based on provided properties NewProd(alg *entity.Algorithm) (stmodel.Algorithm, error) //NewSandbox returns new sandbox algorithm based on provided properties NewSandbox(alg *entity.Algorithm) (stmodel.Algorithm, error) //NewHist returns algorithm for simulation on historical data NewHist(alg *entity.Algorithm) (stmodel.Algorithm, error) //NewRange returns slice of algorithms from provided range for simulation on historical data NewRange(alg *entity.Algorithm) ([]stmodel.Algorithm, error) //GetProdAlgs returns active algorithms running production environment GetProdAlgs() ([]stmodel.Algorithm, error) //GetSdbxAlgs returns active algorithms running sandbox environment GetSdbxAlgs() ([]stmodel.Algorithm, error) //GetAlgorithmById returns active algorithm by id, searches sandbox and prod environment GetAlgorithmById(algoId uint) (stmodel.Algorithm, bool) }
AlgFactory provides methods to create new algorithms for different environments Also factory caches created algorithms and provide methods with active one
func NewAlgFactory ¶
func NewAlgFactory(infoSdxSrv service.InfoSrv, infoProdSrv service.InfoSrv, rep repository.HistoryRepository, logger *zap.SugaredLogger) AlgFactory
type DefaultAlgFactory ¶
type DefaultAlgFactory struct {
// contains filtered or unexported fields
}
func (*DefaultAlgFactory) GetAlgorithmById ¶
func (a *DefaultAlgFactory) GetAlgorithmById(algoId uint) (stmodel.Algorithm, bool)
func (*DefaultAlgFactory) GetProdAlgs ¶
func (a *DefaultAlgFactory) GetProdAlgs() ([]stmodel.Algorithm, error)
func (*DefaultAlgFactory) GetSdbxAlgs ¶
func (a *DefaultAlgFactory) GetSdbxAlgs() ([]stmodel.Algorithm, error)
func (*DefaultAlgFactory) NewSandbox ¶
Click to show internal directories.
Click to hide internal directories.