context2

package
v0.0.0-...-b81b7c8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 4 Imported by: 17

Documentation

Overview

Package context2 contains utilities for contexts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithCustomCancel

func WithCustomCancel(parent context.Context) (ctx context.Context, cancel func(error))

WithCustomCancel creates a new context that can be cancelled with a custom error.

func WithRetimeout

func WithRetimeout(ctx context.Context, duration time.Duration) (context.Context, context.CancelFunc)

WithRetimeout allows to create a new timeout for a potentially cancelled context.

func WithoutCancellation

func WithoutCancellation(ctx context.Context) context.Context

WithoutCancellation returns a context that does not propagate Done message down to children. However, Values are propagated.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL