context.go 340 B

1234567891011121314151617
  1. package context
  2. import "gitlab.alibaba-inc.com/pai_biz_arch/pairec/recconf"
  3. type Context struct {
  4. RequestId string
  5. Param IParam
  6. Config *recconf.RecommendConfig
  7. }
  8. func NewContext() *Context {
  9. context := Context{}
  10. return &context
  11. }
  12. func (r *Context) GetParameter(name string) interface{} {
  13. return r.Param.GetParameter(name)
  14. }