Documentation ¶
Index ¶
- func AddAlgo(conf recconf.AlgoConfig)
- func Load(config *recconf.RecommendConfig)
- func RegistRequestDataFunc(name string, f RequestDataFunc)
- func RegisterAlgorithm(name string, algo IAlgorithm)
- func Run(name string, algoData interface{}) (interface{}, error)
- type AlgorithmFactory
- type IAlgorithm
- type LookupPolicy
- type LookupResponse
- type RequestDataFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAlgo ¶
func AddAlgo(conf recconf.AlgoConfig)
func Load ¶
func Load(config *recconf.RecommendConfig)
init algorithm from the config, and add to the algoFactory
func RegistRequestDataFunc ¶
func RegistRequestDataFunc(name string, f RequestDataFunc)
func RegisterAlgorithm ¶
func RegisterAlgorithm(name string, algo IAlgorithm)
Types ¶
type AlgorithmFactory ¶
type AlgorithmFactory struct {
// contains filtered or unexported fields
}
func NewAlgorithmFactory ¶
func NewAlgorithmFactory() *AlgorithmFactory
func (*AlgorithmFactory) Init ¶
func (a *AlgorithmFactory) Init(algoConfs []recconf.AlgoConfig)
func (*AlgorithmFactory) Run ¶
func (a *AlgorithmFactory) Run(name string, algoData interface{}) (interface{}, error)
type IAlgorithm ¶
type IAlgorithm interface { Init(conf *recconf.AlgoConfig) error Run(algoData interface{}) (interface{}, error) }
type LookupPolicy ¶
type LookupPolicy struct {
// contains filtered or unexported fields
}
func NewLookupPolicy ¶
func NewLookupPolicy() *LookupPolicy
func (*LookupPolicy) Init ¶
func (m *LookupPolicy) Init(conf *recconf.AlgoConfig) error
func (*LookupPolicy) Run ¶
func (m *LookupPolicy) Run(algoData interface{}) (interface{}, error)
type LookupResponse ¶
type LookupResponse struct {
// contains filtered or unexported fields
}
func (*LookupResponse) GetModuleType ¶
func (r *LookupResponse) GetModuleType() bool
func (*LookupResponse) GetScore ¶
func (r *LookupResponse) GetScore() float64
func (*LookupResponse) GetScoreMap ¶
func (r *LookupResponse) GetScoreMap() map[string]float64
type RequestDataFunc ¶
type RequestDataFunc func(string, interface{}) interface{}
Click to show internal directories.
Click to hide internal directories.