zombie

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2022 License: MIT Imports: 6 Imported by: 2

README

zombie

Go Reference

TODO


Copyright (c) 2022 Archivage Numérique

Documentation

Overview

Package zombie TODO

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoFunc

type GoFunc func(context.Context, *Zombie) error

type GoTickerFunc

type GoTickerFunc func() error

type GoTimerFunc

type GoTimerFunc func() (time.Duration, error)

type Logger

type Logger interface {
	Trace(msg string, kv ...any)
	Error(err error, msg string, kv ...any)
}

type Option

type Option func(*Zombie)

func WithLogger

func WithLogger(logger Logger) Option

func WithName

func WithName(name string) Option

func WithPanicHandler

func WithPanicHandler(handler PanicHandler) Option

type PanicHandler

type PanicHandler func(label string, value any)

type Zombie

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

func Go

func Go(ctx context.Context, fn GoFunc, opts ...Option) *Zombie

func GoTicker

func GoTicker(ctx context.Context, d time.Duration, fn GoTickerFunc, opts ...Option) *Zombie

func GoTimer

func GoTimer(ctx context.Context, d time.Duration, fn GoTimerFunc, opts ...Option) *Zombie

func (*Zombie) Err

func (z *Zombie) Err() error

func (*Zombie) Stop

func (z *Zombie) Stop()

func (*Zombie) Ticker

func (z *Zombie) Ticker(ctx context.Context, d time.Duration, fn GoTickerFunc) error

func (*Zombie) Timer

func (z *Zombie) Timer(ctx context.Context, d time.Duration, fn GoTimerFunc) error

func (*Zombie) Wait

func (z *Zombie) Wait()

Jump to

Keyboard shortcuts

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