Documentation ¶
Index ¶
Constants ¶
View Source
const ( Empty ObjectState = 0 New = 1 Init = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
Container manage all services
func NewContainer ¶
func NewContainer() *Container
type ContainerAware ¶
type ContainerAware interface { // SetContainer set the container to the service SetContainer(c *Container) }
ContainerAware provide the container to the service
type Disposable ¶
type Disposable interface {
Dispose() error
}
Disposable dispose a service that release all resources which used
type EventHandler ¶
type EventHandler interface { // Handle process the event Handle(event string, data interface{}) }
EventHandler process the event
type Factory ¶
type Factory interface {
// New a service instance
New() interface{}
}
Factory create a service
type Notify ¶
type Notify interface { // Emmit an event Emmit(event string, data interface{}) }
Notify events
type ObjectRef ¶
type ObjectRef struct {
// contains filtered or unexported fields
}
ObjectRef store the information of a object instance
type Observable ¶
type Observable interface { // Register a handler on the event On(event string, handler EventHandler) // Remove the handler on the event Off(event string, handler EventHandler) }
Click to show internal directories.
Click to hide internal directories.