Documentation ¶
Index ¶
- Constants
- Variables
- func BlockExit(callback BlockExitEndCallback)
- func InitContextService[T any](appName string, settingsInst T, initFunction InitContextFunction, ...)
- func InitService(appName string, settingsInst interface{}, ...)
- func ServiceSettings[T any](creator settings.WatcherSettingsCreator[T], service ConsulService[T]) (result *settings.Configuration[T], err error)
- type BlockExitEndCallback
- type ConsulRemoveRegistration
- type ConsulService
- type Env
- type InitContextFunction
- type InitFunction
- type ServiceHealthCheck
- type ServiceInfo
Constants ¶
View Source
const CfgContext = "cfg"
Variables ¶
View Source
var ConsulClient *api.Client
ConsulClient - client for consul (if it is using)
Functions ¶
func InitContextService ¶ added in v2.1.0
func InitContextService[T any](appName string, settingsInst T, initFunction InitContextFunction, service ConsulService[T], version string)
func InitService ¶
func InitService(appName string, settingsInst interface{}, initFunction InitFunction[interface{}], service ConsulService[interface{}], version string)
func ServiceSettings ¶
func ServiceSettings[T any](creator settings.WatcherSettingsCreator[T], service ConsulService[T]) (result *settings.Configuration[T], err error)
ServiceSettings - setup micro-service configuration
Types ¶
type BlockExitEndCallback ¶
type BlockExitEndCallback func()
BlockExitEndCallback - callback function
type ConsulRemoveRegistration ¶ added in v2.1.1
type ConsulRemoveRegistration func()
type ConsulService ¶
type ConsulService[T any] interface { Init(config settings.Configuration[T]) GetServiceInfo() ServiceInfo GetServiceHealthCheck() []ServiceHealthCheck }
ConsulService - consul service
type InitContextFunction ¶ added in v2.1.0
type InitFunction ¶
type InitFunction[T any] func(config *appSettings.Configuration[T]) error
type ServiceHealthCheck ¶
ServiceHealthCheck - service health checker
Click to show internal directories.
Click to hide internal directories.