Documentation ¶
Overview ¶
Package factory provides factory methods for common components configuration.
This factories require the use of package config structs.
This package is a work in progress and makes no API stability promises.
Index ¶
- Variables
- func APIAutoloader(cfg *config.APIServicesCfg, logger yalogi.Logger) (*apiservice.Autoloader, error)
- func APIServices(cfg *config.APIServicesCfg, logger yalogi.Logger) (*apiservice.Registry, error)
- func ClientConn(cfg *config.ClientCfg) (*grpc.ClientConn, error)
- func EventNotify(cfg *config.EventNotifyCfg, registry apiservice.Discover) (event.Notifier, error)
- func EventNotifyBuffer(cfg *config.EventNotifyCfg, registry apiservice.Discover, logger yalogi.Logger) (event.NotifyBuffer, error)
- func Health(cfg *config.HealthCfg, srv httphealth.Pingable, logger yalogi.Logger) (net.Listener, *httphealth.Server, error)
- func Logger(cfg *config.LoggerCfg, debug bool) (yalogi.Logger, error)
- func Server(cfg *config.ServerCfg) (net.Listener, *grpc.Server, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrURIServerExists = errors.New("uri server already exists")
ErrURIServerExists defines error when a server for the uri was created.
Functions ¶
func APIAutoloader ¶
func APIAutoloader(cfg *config.APIServicesCfg, logger yalogi.Logger) (*apiservice.Autoloader, error)
APIAutoloader is a factory of an APIService Autoloader .
func APIServices ¶
func APIServices(cfg *config.APIServicesCfg, logger yalogi.Logger) (*apiservice.Registry, error)
APIServices is a factory of an APIService Registry.
func ClientConn ¶
func ClientConn(cfg *config.ClientCfg) (*grpc.ClientConn, error)
ClientConn is a factory for a grpc dial collector.
func EventNotify ¶
func EventNotify(cfg *config.EventNotifyCfg, registry apiservice.Discover) (event.Notifier, error)
EventNotify is a factory for an event notifier.
func EventNotifyBuffer ¶
func EventNotifyBuffer(cfg *config.EventNotifyCfg, registry apiservice.Discover, logger yalogi.Logger) (event.NotifyBuffer, error)
EventNotifyBuffer is a factory for an event buffer.
func Health ¶
func Health(cfg *config.HealthCfg, srv httphealth.Pingable, logger yalogi.Logger) (net.Listener, *httphealth.Server, error)
Health is a factory for an http server.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.