base

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ServiceDispatcher = "dispatcher"
	DefaultBufSize    = 65535
)
View Source
const (
	ServiceTimer = "timer"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DispatcherHander

type DispatcherHander interface{}

type IScheduler

type IScheduler interface{}

task based on timetable

type IServiceDispatcher

type IServiceDispatcher interface {
	CreateDispatcher(dispatcherName string, params ...uint) error
	RemoveDispatcher(dispatcherName string) error
	Dispatch(dispatcherName string, data interface{}) error
	AddDispatcherHandler(dispatcherName string, handler DispatcherHander, handlerName ...string) error
	RemoveDispatcherHandler(dispatcherName string, handlerName string) error
}

async producer/consumer

type IServiceTimer

type IServiceTimer interface {
	CreateTimer(timerName string, handler TimerHander, itv ...time.Duration) error
	RemoveTimer(timerName string) error
}

loop task based on duration trigger

type TimerHander

type TimerHander func()

Jump to

Keyboard shortcuts

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