Documentation
¶
Overview ¶
Package framework provides the Core DI/service framework. Import this package for cleaner access to the framework types.
Usage:
import "github.com/host-uk/core/pkg/framework"
app, _ := framework.New(
framework.WithServiceLock(),
)
Index ¶
- Variables
- func MustServiceFor[T any](c *Core, name string) T
- func ServiceFor[T any](c *Core, name string) (T, error)
- type ActionServiceShutdown
- type ActionServiceStartup
- type Config
- type Contract
- type Core
- type Display
- type Error
- type Features
- type Message
- type Option
- type Query
- type QueryHandler
- type Runtime
- type ServiceFactory
- type ServiceRuntime
- type Startable
- type Stoppable
- type Task
- type TaskHandler
- type WindowOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( New = core.New WithService = core.WithService WithName = core.WithName WithApp = core.WithApp WithAssets = core.WithAssets WithServiceLock = core.WithServiceLock App = core.App E = core.E NewRuntime = core.NewRuntime NewWithFactories = core.NewWithFactories )
Re-export core functions
Functions ¶
func MustServiceFor ¶
MustServiceFor retrieves a typed service or panics if not found.
Types ¶
type ServiceFactory ¶
type ServiceFactory = core.ServiceFactory
Re-export core types for cleaner imports
type ServiceRuntime ¶
type ServiceRuntime[T any] = core.ServiceRuntime[T]
Re-export core types for cleaner imports
func NewServiceRuntime ¶
func NewServiceRuntime[T any](c *Core, opts T) *ServiceRuntime[T]
NewServiceRuntime creates a new ServiceRuntime for a service.
Click to show internal directories.
Click to hide internal directories.