// CloseContext frees resources and caches for the given context.
161930
func (cp *ChannelProvider) CloseContext(ctx fab.ClientContext) {
	key, err := newCtxtCacheKey(ctx)
	if err != nil {
		logger.Warnf("Unable to close context: %s", err)
		return
	}
	logger.Warnf("Deleting context cache...")
	cp.ctxtCaches.Delete(key)
}
50733
func (client *Client) DeleteWithContext(ctx context.Context, g Deletable) error {
	return g.Delete(ctx, client)
}
63890
func (s *SendUsersMessageRequest) SetContext(v map[string]*string) *SendUsersMessageRequest {
	s.Context = v
	return s
}
1030937
func (w *WriteContext) Close() error {
	if c, ok := w.writer.(io.Closer); ok {
		err := c.Close()
		if err != nil {
			return errors.WithStack(err)
		}
	}

	return nil
}
1048108
func (ctx *BatchedContext) Close() error {
	ctx.initialized = false
	return ctx.Context.Close()
}
667046
func (cp *CachePool) Close() error {
	err := cp.source.Close()
	if err != nil {
		return errors.WithStack(err)
	}

	err = cp.cache.Close()
	if err != nil {
		return errors.WithStack(err)
	}

	return nil
}
206568
func (s *StatusEvent) GetContext() string {
	if s == nil || s.Context == nil {
		return ""
	}
	return *s.Context
}
538329
func (ctx *Context) Close() {
	log.Info("shutting down IPVS context")

	// This will also shutdown the pulse notification sink goroutine.
	close(ctx.stopCh)

	for vsID := range ctx.services {
		ctx.RemoveService(vsID)
	}

	// This is not strictly required, as far as I know.
	ctx.ipvs.Exit()
}
769437
func (ctx *Context) Close() error {
	var empty C.cudnnHandle_t
	if ctx.internal == empty {
		return nil
	}

	if err := result(C.cudnnDestroy(ctx.internal)); err != nil {
		return err
	}
	ctx.internal = empty
	return nil
}
1055689
func (q *ModelQuery) WithContext(ctx context.Context) *ModelQuery {
	q.ctx = ctx
	return q
}
447282
func (o *DeletePolicyParams) WithContext(ctx context.Context) *DeletePolicyParams {
	o.SetContext(ctx)
	return o
}
337113
func (c *Client) WithContext(ctx context.Context) *Client {
	newC := *c
	newC.ctx = ctx
	return &newC
}
489845
func (o *DeleteTaskParams) WithContext(ctx context.Context) *DeleteTaskParams {
	o.SetContext(ctx)
	return o
}
1295770
func (p *Provisioner) StopContext() context.Context {
	p.stopOnce.Do(p.stopInit)
	return p.stopCtx
}
965969
func (call *UnlinkUserRichMenuCall) WithContext(ctx context.Context) *UnlinkUserRichMenuCall {
	call.ctx = ctx
	return call
}
339068
func (api *Client) CloseIMChannelContext(ctx context.Context, channel string) (bool, bool, error) {
	values := url.Values{
		"token":   {api.token},
		"channel": {channel},
	}

	response, err := api.imRequest(ctx, "im.close", values)
	if err != nil {
		return false, false, err
	}
	return response.NoOp, response.AlreadyClosed, nil
}
988292
func (s *AddressConfiguration) SetContext(v map[string]*string) *AddressConfiguration {
	s.Context = v
	return s
}