Documentation
¶
Index ¶
- Constants
- func GetParam(ctx context.Context, key string) (val any, ok bool)
- func PutConfigParam(ctx context.Context, key string, val any)
- func ReadConfigParam(ctx context.Context, key string) (val any, ok bool)
- func WithConfigScope(ctx context.Context) context.Context
- func WithParams(ctx context.Context, params ParamsMap) context.Context
- type ParamsMap
Constants ¶
View Source
const ( ParamKeyStableVersionServicePath = "stable_version_service_path" ParamKeyInventoryServicePath = "inventory_service_path" ParamKeySwarmingTaskID = "swarming_task_id" ParamKeySwarmingTaskTags = "swarming_task_tags" ParamKeyBuildbucketID = "buildbucket_id" ParamKeyCTRClient = "ctr_client" )
Variables ¶
This section is empty.
Functions ¶
func PutConfigParam ¶
PutConfigParam sets value to config scope to be available in the config context.
func ReadConfigParam ¶
ReadConfigParam read and returns value from config scope.
Also provide a bool if key is found or not.
func WithConfigScope ¶
WithConfigScope inits map to create scope for a configuration variables.
Types ¶
type ParamsMap ¶
ParamsMap is a special type to describe mapping of params of context
func GetParamCopy ¶
GetParamCopy returns a copy of params from the context. Please use the `GetParam` method if you need check for presence of a key or get its value.
Click to show internal directories.
Click to hide internal directories.