ftp_context

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context = *ContextStruct

type ContextStruct

type ContextStruct struct {
	base.MutexedMap[any]
	// contains filtered or unexported fields
}

func CreateNewContext

func CreateNewContext() *ContextStruct

func CreateNewContextWithDeadline

func CreateNewContextWithDeadline(t time.Duration) (ctx *ContextStruct)

func CreateNewContextWithParent

func CreateNewContextWithParent(pctx context.Context) (ctx *ContextStruct)

func (*ContextStruct) Add

func (ctx *ContextStruct) Add() Context

adds new goroutine to waitgroup

func (*ContextStruct) Cancel

func (ctx *ContextStruct) Cancel()

func (*ContextStruct) CancelDeadline

func (ctx *ContextStruct) CancelDeadline() (ok bool)

func (*ContextStruct) Created

func (ctx *ContextStruct) Created() time.Time

func (*ContextStruct) Deadline

func (ctx *ContextStruct) Deadline() (t time.Time, ok bool)

func (*ContextStruct) Done

func (ctx *ContextStruct) Done() <-chan struct{}

func (*ContextStruct) Err

func (ctx *ContextStruct) Err() error

func (*ContextStruct) Finished

func (ctx *ContextStruct) Finished()

marks goroutine as finished

func (*ContextStruct) Get

func (ctx *ContextStruct) Get(key string) (it any, ok bool)

func (*ContextStruct) NewChild

func (ctx *ContextStruct) NewChild() Context

func (*ContextStruct) SetDeadline

func (ctx *ContextStruct) SetDeadline(t time.Duration) (deadline time.Time)

func (*ContextStruct) SetParent

func (ctx *ContextStruct) SetParent(key string, val any) error

Sets current context and parent context

func (*ContextStruct) Value

func (ctx *ContextStruct) Value(key any) any

func (*ContextStruct) Wait

func (ctx *ContextStruct) Wait()

does not unblock on cancel

Jump to

Keyboard shortcuts

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