context

package
v2.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	RequestId string
	Param     IParam
	Config    *recconf.RecommendConfig
}

func NewContext

func NewContext() *Context

func (*Context) GetParameter

func (r *Context) GetParameter(name string) interface{}

type IParam

type IParam interface {
	GetParameter(name string) interface{}
}

type RecommendContext

type RecommendContext struct {
	Debug            bool
	Size             int
	Param            IParam
	Config           *recconf.RecommendConfig
	ExperimentResult *model.ExperimentResult
	RecommendId      string
	ExpId            string
	Log              []string
	// contains filtered or unexported fields
}

func NewRecommendContext

func NewRecommendContext() *RecommendContext

func (*RecommendContext) AddContextParam

func (r *RecommendContext) AddContextParam(name string, value interface{})

func (*RecommendContext) GetContextParam

func (r *RecommendContext) GetContextParam(name string) interface{}

func (*RecommendContext) GetParameter

func (r *RecommendContext) GetParameter(name string) interface{}

func (*RecommendContext) GetParameterByPath

func (r *RecommendContext) GetParameterByPath(path string) interface{}

func (*RecommendContext) LogDebug

func (r *RecommendContext) LogDebug(msg string)

func (*RecommendContext) LogError

func (r *RecommendContext) LogError(msg string)

func (*RecommendContext) LogInfo

func (r *RecommendContext) LogInfo(msg string)

func (*RecommendContext) LogWarning

func (r *RecommendContext) LogWarning(msg string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL