gobase

package module
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: MIT Imports: 10 Imported by: 0

README

go-base

Documentation

Index

Constants

This section is empty.

Variables

View Source
var JsonLastError error

Functions

func OnShutdown added in v0.0.4

func OnShutdown(callback func())

not safe, can raise panics

func OverrideDns added in v0.0.9

func OverrideDns(ip string)

func ToJson added in v0.0.17

func ToJson(obj interface{}) string

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