Documentation ¶
Index ¶
- Variables
- func AddService(service interface{}) (err error)
- func GetService(s interface{}) (err error)
- func HasService(service interface{}) (hasService bool)
- func Log(err error, level log.Level)
- func NewContainer() (r service.Container)
- func NewHTTPClient(config *http.ClientConfig) (c *http.Client)
- func NewHTTPServer(config *http.ServerConfig, c service.Container) (s *http.Server, err error)
- func NewWebsocketClient(c service.Container) (*websocket.Client, error)
- func NewWebsocketServer(config *websocket.ServerConfig, c service.Container) (s *websocket.Server, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Container service.Container
Container global service container
Functions ¶
func AddService ¶
func AddService(service interface{}) (err error)
AddService a service to the container
func GetService ¶
func GetService(s interface{}) (err error)
GetService a service from the container
func HasService ¶
func HasService(service interface{}) (hasService bool)
HasService check if the service exists in the container
func Log ¶ added in v0.6.0
Log to the registered logger service. Does not do anything if no log.Logger is registered.
func NewHTTPClient ¶
func NewHTTPClient(config *http.ClientConfig) (c *http.Client)
NewHTTPClient constructor
func NewHTTPServer ¶
NewHTTPServer constructor
func NewWebsocketClient ¶
NewWebsocketClient constructor
func NewWebsocketServer ¶
func NewWebsocketServer(config *websocket.ServerConfig, c service.Container) (s *websocket.Server, err error)
NewWebsocketServer constructor
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.