mediator

package
v1.9.18 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Component = &app.Component{
	Dependencies: app.Components{
		runner.Component,
	},
	Constructor: app.Constructor(func(container container.Container) error {
		return container.Provides(
			newMediator,
			func(mediator *mediator) Mediator { return mediator },
		)
	}),
	Run: app.Run(func(container container.Container) error {
		return container.Invoke(func(
			mediator *mediator,
			runner runner.Runner,
		) error {
			return runner.AddProcesses(mediator)
		})
	}),
}

Functions

This section is empty.

Types

type Callback

type Callback func(data any)

type Mediator

type Mediator interface {
	Subscribe(channel string, callback Callback)
	Send(channel string, data any)
}

Jump to

Keyboard shortcuts

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