finalcontext

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package finalcontext is used by Waypoint to create a "final" context that we'll use after the real context has been cancelled. This lets us do some last minute cleanup that may require a context.

For more detail in case that isn't clear: we use contexts everywhere for cancellation. Once cancelled, we may want to perform some cleanup, such as calling an RPC call to note we're cancelled. But this RPC itself requires a context and our context is already cancelled. We construct a "final" context that lets us do this.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Context

func Context(log hclog.Logger) (context.Context, func())

Context returns a final context. This context is set to timeout in some set amount of time (a few seconds) and will also cancel immediately if another interrupt is received.

Types

This section is empty.

Jump to

Keyboard shortcuts

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