shredder

package
v0.18.2 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AfterFrame

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

func (*AfterFrame) Activate

func (f *AfterFrame) Activate()

func (*AfterFrame) After added in v0.13.14

func (f *AfterFrame) After() Frame

func (*AfterFrame) Run

func (f *AfterFrame) Run(ctx context.Context, r Runtime, fun func(bool))

func (*AfterFrame) Submit

func (f *AfterFrame) Submit(ctx context.Context, r Runtime, fun func(bool))

type Frame

type Frame interface {
	Run(ctx context.Context, r Runtime, fun func(bool))
	Submit(ctx context.Context, r Runtime, fun func(bool))
	// contains filtered or unexported methods
}

type FreeFrame

type FreeFrame struct{}

func (FreeFrame) Release added in v0.8.14

func (f FreeFrame) Release()

func (FreeFrame) Run

func (f FreeFrame) Run(ctx context.Context, r Runtime, fun func(bool))

func (FreeFrame) Submit

func (f FreeFrame) Submit(ctx context.Context, r Runtime, fun func(bool))

type Owner added in v0.12.15

type Owner interface {
	Logger() *slog.Logger
	Kill()
}

type ReadBlockingWriteThread added in v0.8.14

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

func (*ReadBlockingWriteThread) Read added in v0.8.14

func (*ReadBlockingWriteThread) Write added in v0.8.14

func (t *ReadBlockingWriteThread) Write() (write ReleaseFrame, read ReleaseFrame)

type ReadStarveWriteThread added in v0.8.14

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

func (*ReadStarveWriteThread) Read added in v0.8.14

func (*ReadStarveWriteThread) Write added in v0.8.14

type ReadWriteThread added in v0.8.14

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

func (*ReadWriteThread) Read added in v0.8.14

func (r *ReadWriteThread) Read() ReleaseFrame

func (*ReadWriteThread) Write added in v0.8.14

func (r *ReadWriteThread) Write() ReleaseFrame

type ReleaseFrame added in v0.16.0

type ReleaseFrame interface {
	Releaser
	Frame
}

func Join

func Join(ctx context.Context, frames ...frame) ReleaseFrame

func JoinRelease added in v0.16.0

func JoinRelease(ctx context.Context, frames ...frame) ReleaseFrame

type Releaser added in v0.16.0

type Releaser interface {
	Release()
}

type Runtime

type Runtime = *runtime

func NewRuntime

func NewRuntime(ctx context.Context, workerLimit int, killer Owner) Runtime

func (Runtime) Cancel

func (r Runtime) Cancel()

func (Runtime) Context

func (r Runtime) Context() context.Context

func (Runtime) Go

func (r Runtime) Go(ctx context.Context, fun func(ctx context.Context))

func (Runtime) Run

func (r Runtime) Run(ctx context.Context, fun func(bool), callback func(error))

func (Runtime) SafeHook

func (Runtime) Submit

func (r Runtime) Submit(ctx context.Context, fun func(bool), callback func(error))

type Thread

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

func (*Thread) Frame

func (s *Thread) Frame() ReleaseFrame

func (*Thread) Guard

func (s *Thread) Guard() Releaser

type ValveFrame

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

func (*ValveFrame) Activate

func (f *ValveFrame) Activate()

func (*ValveFrame) Run

func (f *ValveFrame) Run(ctx context.Context, s Runtime, fun func(bool))

func (*ValveFrame) Submit

func (f *ValveFrame) Submit(ctx context.Context, s Runtime, fun func(bool))

Jump to

Keyboard shortcuts

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