gobase

package module
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2021 License: MIT Imports: 7 Imported by: 0

README

go-base

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OnShutdown added in v0.0.4

func OnShutdown(callback func())

not safe, can raise panics

Types

type ManagedRoutine added in v0.0.6

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

func WithInterval added in v0.0.6

func WithInterval(ctx context.Context, duration time.Duration, task func()) *ManagedRoutine

func (*ManagedRoutine) After added in v0.0.6

func (r *ManagedRoutine) After(cb func()) *ManagedRoutine

func (ManagedRoutine) Run added in v0.0.6

func (r ManagedRoutine) Run()

type SafeExecutor

type SafeExecutor struct {
	errors.ErrorNotifier
}

func (SafeExecutor) Handle

func (handler SafeExecutor) Handle(executor func() error) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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