Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IApplication ¶
type IApplication interface { // Background run the application in background, and wait for OS signal to terminate Background() // Run a runnable in a goroutine Start(runnable Runnable) // Stop the application Stop() // Run and wait all runnable stopped Wait() }
IApplication interface
func NewApplication ¶
func NewApplication(ctx context.Context) IApplication
NewApplication create a new application that can run in background
type IContextKey ¶
IContextKey interface
func NewContextKey ¶
func NewContextKey(name string) IContextKey
NewContextKey create a new context key
type IExecutor ¶
type IExecutor interface { // Submit a callable to be called later Submit(ctx context.Context, callable ICallable, data interface{}) // Execute a function later using the goroutine pool defined ExecuteLater(ctx context.Context, callable ICallable, data interface{}, delay time.Duration) // Shutdown the executors Shutdown() // Count number of task submitted + executeLater Count() int64 }
Click to show internal directories.
Click to hide internal directories.