Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultMetaUrl = "https://datarangers.com.cn/abmeta/v2/get_abtest_info?token=%s&sideType=%s" DefaultMetaPath = "/abmeta/v2/get_abtest_info?token=%s&sideType=%s" )
meta url
View Source
const ( DefaultUpdateInterval = 1 * time.Minute LastModified = "Modify_time" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DynamicMetaManager ¶
type DynamicMetaManager struct { LastModified int StaticMetaManager // contains filtered or unexported fields }
func NewDynamicMetaManager ¶
func NewDynamicMetaManager(token string, options ...MetaOptionFunc) *DynamicMetaManager
func NewDynamicMetaManager4Test ¶
func NewDynamicMetaManager4Test(meta string) *DynamicMetaManager
func (*DynamicMetaManager) GetFetchUrl ¶
func (d *DynamicMetaManager) GetFetchUrl() string
func (*DynamicMetaManager) SetFetchUrl ¶
func (d *DynamicMetaManager) SetFetchUrl(url string)
type MetaManager ¶
type MetaManager interface { SetConfig(meta []byte) GetConfig() *config.ProductConfig }
type MetaOptionFunc ¶ added in v1.0.3
type MetaOptionFunc func(*DynamicMetaManager)
func WithFetchInterval ¶
func WithFetchInterval(interval time.Duration) MetaOptionFunc
func WithMetaHost ¶
func WithMetaHost(host string) MetaOptionFunc
func WithRequester ¶
func WithRequester(requester *httper.HRequester) MetaOptionFunc
func WithTrackHost ¶
func WithTrackHost(host string) MetaOptionFunc
type StaticMetaManager ¶
type StaticMetaManager struct {
// contains filtered or unexported fields
}
func NewStaticMetaManager ¶
func NewStaticMetaManager(metafile []byte) *StaticMetaManager
func (*StaticMetaManager) GetConfig ¶
func (s *StaticMetaManager) GetConfig() *config.ProductConfig
func (*StaticMetaManager) SetConfig ¶
func (s *StaticMetaManager) SetConfig(metafile []byte)
Click to show internal directories.
Click to hide internal directories.