// WithValue returns a copy of parent in which the value associated with key is
// val.
//
// Use context Values only for request-scoped data that transits processes and
// APIs, not for passing optional parameters to functions.
343762
func WithValue(parent Context, key interface{}, val interface{}) Context {
	return context.WithValue(parent, key, val)
}
240686
func (m *ContextManager) GetValue(key interface{}) (
	value interface{}, ok bool) {
	gid, ok := GetGoroutineId()
	if !ok {
		return nil, false
	}

	m.mtx.Lock()
	state, found := m.values[gid]
	m.mtx.Unlock()

	if !found {
		return nil, false
	}
	value, ok = state[key]
	return value, ok
}
697115
func (l Levels) With(keyvals ...interface{}) Levels {
	return Levels{
		logger:     log.With(l.logger, keyvals...),
		levelKey:   l.levelKey,
		debugValue: l.debugValue,
		infoValue:  l.infoValue,
		warnValue:  l.warnValue,
		errorValue: l.errorValue,
		critValue:  l.critValue,
	}
}
710197
func WithParent(context reqContext.Context) ReqContextOptions {
	return func(ctx *requestContextOpts) {
		ctx.parentContext = context
	}
}
913217
func (builder *FetchValueCommandBuilder) WithKey(key string) *FetchValueCommandBuilder {
	builder.protobuf.Key = []byte(key)
	return builder
}
1069829
func (e Entry) WithField(key string, value interface{}) Entry {
	ne := newEntry(e)
	ne.Fields = append(ne.Fields, Field{Key: key, Value: value})
	return ne
}
817792
func WithResponse(parent context.Context, value *Response) context.Context {
	return context.WithValue(contextOrBackground(parent), keyResponse, value)
}
136017
func WithVars(ctx context.Context, vars map[string]string) context.Context {
	return context.WithValue(ctx, varsKey, vars)
}
194357
func WithIgnoreRevisions(parent context.Context, value ...bool) context.Context {
	v := true
	if len(value) == 1 {
		v = value[0]
	}
	return context.WithValue(contextOrBackground(parent), keyIgnoreRevs, v)
}
376687
func (c *ctx) WithHeader(key, value string) Context {
	c.Header().Set(key, value)
	return c
}
117865
func WithIsSystem(parent context.Context, value bool) context.Context {
	return context.WithValue(contextOrBackground(parent), keyIsSystem, value)
}
558926
func (v *Object) GetValue(keys ...string) (*Value, error) {
	return v.getPath(keys)
}
920616
func (builder *StoreValueCommandBuilder) WithNVal(nval uint32) *StoreValueCommandBuilder {
	builder.protobuf.NVal = &nval
	return builder
}
684875
func (reader PluginConfigReaderWithError) HasValue(key string) bool {
	key = reader.config.registerKey(key)
	_, exists := reader.config.Settings.Value(key)
	return exists
}
1238873
func (b *Builder) AddKeyValue(key string, v Value) error {
	if err := b.addInternalKeyValue(key, v); err != nil {
		return WithStack(err)
	}
	return nil
}
773908
func (logger *Logger) WithField(key string, value interface{}) logging.LogWithLevel {
	return logger.withFields(logging.Fields{key: value}, 1)
}
681406
func (builder *DeleteValueCommandBuilder) WithKey(key string) *DeleteValueCommandBuilder {
	builder.protobuf.Key = []byte(key)
	return builder
}