config

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProductConfig

type ProductConfig struct {
	AppId         string                   `json:"app_id"`
	HashStrategy  string                   `json:"hash_strategy"`
	ModifyTime    int                      `json:"modify_time"`
	LayerMap      map[string]et.Layer      `json:"layers"`
	ExperimentMap map[string]et.Experiment `json:"experiments"`
	FeatureMap    map[string]et.Feature    `json:"features"`

	// key:name, value:entity id
	ExperimentNameToIdMap map[string]string
	FeatureNameToIdMap    map[string]string

	// all cohort ids contained in experiment/feature
	ExpCohortIds     []string
	FeatureCohortIds []string
}

func (*ProductConfig) GetExperimentFromId

func (c *ProductConfig) GetExperimentFromId(experimentId string) (et.Experiment, error)

func (*ProductConfig) GetFeatureAllowList added in v1.0.4

func (c *ProductConfig) GetFeatureAllowList(featureId string) (map[string]et.Variant, error)

func (*ProductConfig) GetFeatureFromId

func (c *ProductConfig) GetFeatureFromId(featureId string) (et.Feature, error)

func (*ProductConfig) Init

func (c *ProductConfig) Init()

Init entity map and white list map for cache

Jump to

Keyboard shortcuts

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