package util

import "github.com/kubernetes-incubator/cri-containerd/pkg/containerd/util"

Index

Functions

func DeferContext

func DeferContext() (context.Context, context.CancelFunc)

DeferContext returns a context for containerd cleanup operations in defer. A default timeout is applied to avoid cleanup operation pending forever.

func NamespacedContext

func NamespacedContext() context.Context

NamespacedContext returns a context with kubernetes namespace set.

func WithNamespace

func WithNamespace(ctx context.Context) context.Context

WithNamespace adds kubernetes namespace to the context.

Source Files

util.go

Version
v1.19.0 (latest)
Published
Aug 20, 2020
Platform
linux/amd64
Imports
4 packages
Last checked
2 hours ago

Tools for package owners.