_context

package
v0.0.1-20230203-0002 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2023 License: MIT Imports: 2 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cancel

func Cancel()

Cancel This will terminate entirely the application where context it's being used!

func GetDefaultContext

func GetDefaultContext() context.Context

GetDefaultContext Get the ROOT Context

func GetRootContext

func GetRootContext() context.Context

Types

type CancelCtx

type CancelCtx struct {
	// contains filtered or unexported fields
}

func WithCancel

func WithCancel(parentCtx context.Context) *CancelCtx

WithCancel Parent ctx can be nil... if so, then we will set the main default context! We also return a simple structure of context

func (*CancelCtx) Cancel

func (c *CancelCtx) Cancel()

Cancel Signal!

func (*CancelCtx) Context

func (c *CancelCtx) Context() context.Context

Context returns the context itself

func (*CancelCtx) Done

func (c *CancelCtx) Done() <-chan struct{}

func (*CancelCtx) IsDone

func (c *CancelCtx) IsDone() bool

Jump to

Keyboard shortcuts

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