Documentation ¶
Index ¶
- Constants
- type SceneModule
- type StrategyContext
- func (s *StrategyContext) AddTimeoutAction(actionName string)
- func (s *StrategyContext) AddToArray(arrayKey string, value interface{})
- func (s *StrategyContext) Get(key string) interface{}
- func (s *StrategyContext) GetArray(arrayKey string) ([]interface{}, error)
- func (s *StrategyContext) GetErrorMap() *sync.Map
- func (s *StrategyContext) GetTimeoutActions() []string
- func (s *StrategyContext) IsSkip() bool
- func (s *StrategyContext) Set(key string, value interface{})
- func (s *StrategyContext) SetDebug(actionName string, key string, value interface{})
- func (s *StrategyContext) SetError(actionId string, err error)
- func (s *StrategyContext) Skip(errNo int32, errMsg string)
Constants ¶
View Source
const (
KEY_TIMEOUT_ACTION = "timeout_action"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SceneModule ¶
type SceneModule struct { Id int64 `json:"id"` Name string `json:"name"` AppId int64 `json:"appid"` BucketType int `json:"bucketType"` //第一层key:维度id;第二层key:0-99的数字;value:workflowid DimensionMap map[int64]map[int]int64 `json:"dimensionMap"` /**第一层key:moduleName,如:“bonus.BonusStrategyAwareStrengthen” 第二层key:参数组合,如:“[p1=2&p2=9]” 第三层key:参数名称,如:“p1” value:每个参数对应的值,支持string类型 */ ModuleInfoMap map[string]map[string]map[string]string `json:"moduleInfoMap"` UpdateTime time.Time `json:"updateTime"` FlowType int `json:"flow_type"` //第一层key:维度id;第二层key:manualSlotId;value:workflowid ManualSlotIdsMap map[int64]map[int64]int64 `json:"manualSlotIdsMap"` GroupWorkflowMap map[string]int64 `json:"groupWorkflowMap"` }
func (*SceneModule) GetWorkflowId ¶
func (this *SceneModule) GetWorkflowId(dispatchExperimentName, groupName string) (int64, error)
type StrategyContext ¶
type StrategyContext struct { AppId int64 AppName string SceneId int64 FlowId int64 IsLimited bool IsDebug bool //CtxTrace *trace.DefaultTrace UserId string Phone string GroupName string ContextMap *sync.Map ActionResultMap map[string]map[string]string TC *timeutils.TimeCoster ErrNo int32 ErrMsg string // contains filtered or unexported fields }
func NewStrategyContext ¶
func NewStrategyContext(ctx context.Context) *StrategyContext
func (*StrategyContext) AddTimeoutAction ¶
func (s *StrategyContext) AddTimeoutAction(actionName string)
func (*StrategyContext) AddToArray ¶
func (s *StrategyContext) AddToArray(arrayKey string, value interface{})
func (*StrategyContext) Get ¶
func (s *StrategyContext) Get(key string) interface{}
func (*StrategyContext) GetArray ¶
func (s *StrategyContext) GetArray(arrayKey string) ([]interface{}, error)
func (*StrategyContext) GetErrorMap ¶
func (s *StrategyContext) GetErrorMap() *sync.Map
func (*StrategyContext) GetTimeoutActions ¶
func (s *StrategyContext) GetTimeoutActions() []string
func (*StrategyContext) IsSkip ¶
func (s *StrategyContext) IsSkip() bool
func (*StrategyContext) Set ¶
func (s *StrategyContext) Set(key string, value interface{})
func (*StrategyContext) SetDebug ¶
func (s *StrategyContext) SetDebug(actionName string, key string, value interface{})
func (*StrategyContext) SetError ¶
func (s *StrategyContext) SetError(actionId string, err error)
func (*StrategyContext) Skip ¶
func (s *StrategyContext) Skip(errNo int32, errMsg string)
Click to show internal directories.
Click to hide internal directories.