// useGI adds a gae.GlobalInfo implementation to context, accessible // by gae.GetGI(c) func useGI(usrCtx context.Context) context.Context { probeCache := getProbeCache(usrCtx) if probeCache == nil { usrCtx = withProbeCache(usrCtx, probe(AEContext(usrCtx))) } return info.SetFactory(usrCtx, func(ci context.Context) info.Interface { return giImpl{ci, AEContext(ci)} }) }
// useGI adds a gae.GlobalInfo implementation to context, accessible // by gae.GetGI(c) func useGI(c context.Context) context.Context { probeCache := getProbeCache(c) if probeCache == nil { c = withProbeCache(c, probe(c)) } return info.SetFactory(c, func(ci context.Context) info.Interface { return giImpl{ci} }) }
// useGI adds a gae.GlobalInfo context, accessible // by gae.GetGI(c) func useGI(c context.Context, appID string) context.Context { return info.SetFactory(c, func(ic context.Context) info.Interface { return &giImpl{dummy.Info(), curGID(ic), ic} }) }