Documentation ¶
Index ¶
- type AddressConfiguration
- type BackendDeclaration
- type DBConfiguration
- type ElasticConfiguration
- type EndpointConfigdeprecated
- type EndpointDescriptor
- type GrpcError
- type Isolation
- func (i Isolation) GetApplicationId() (int32, error)
- func (i Isolation) GetDeviceId() (int64, error)
- func (i Isolation) GetDomainId() (int32, error)
- func (i Isolation) GetInstanceId() (string, error)
- func (i Isolation) GetServiceId() (int32, error)
- func (i Isolation) GetSystemId() (int32, error)
- func (i Isolation) GetUserId() (int64, error)
- func (i Isolation) GetUserToken() (string, error)
- type MetricAddress
- type MetricConfiguration
- type ModuleDependency
- type ModuleInfo
- type NatsConfig
- type RabbitConfig
- type RedisConfiguration
- type RedisSentinel
- type RoutingConfig
- type SocketConfiguration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressConfiguration ¶
type AddressConfiguration struct { Port string `json:"port" schema:"Порт"` IP string `json:"ip" schema:"Хост"` }
func (*AddressConfiguration) GetAddress ¶
func (addressConfiguration *AddressConfiguration) GetAddress() string
type BackendDeclaration ¶
type BackendDeclaration struct { ModuleName string `json:"moduleName"` Version string `json:"version"` LibVersion string `json:"libVersion"` Endpoints []EndpointDescriptor `json:"endpoints"` RequiredModules []ModuleDependency `json:"requiredModules"` Address AddressConfiguration `json:"address"` }
func (*BackendDeclaration) IsAddressEquals ¶
func (backedConfig *BackendDeclaration) IsAddressEquals(address AddressConfiguration) bool
func (*BackendDeclaration) IsIPAndPortEqual ¶
func (backedConfig *BackendDeclaration) IsIPAndPortEqual(ip string, port string) bool
func (*BackendDeclaration) IsPathsEqual ¶
func (backedConfig *BackendDeclaration) IsPathsEqual(paths []EndpointDescriptor) bool
type DBConfiguration ¶
type DBConfiguration struct { Address string `valid:"required~Required" schema:"Адрес"` Schema string `valid:"required~Required" schema:"Схема"` Database string `valid:"required~Required" schema:"Название базы данных"` Port string `valid:"required~Required" schema:"Порт"` Username string `schema:"Логин"` Password string `schema:"Пароль"` PoolSize int `` /* 137-byte string literal not displayed */ CreateSchema bool `` /* 130-byte string literal not displayed */ }
type ElasticConfiguration ¶
type ElasticConfiguration struct { URL string `schema:"Адрес"` Username string `schema:"Логин"` Password string `schema:"Пароль"` Sniff *bool `` /* 175-byte string literal not displayed */ Healthcheck *bool `schema:"Проверка работоспособности нод,если включено, пингует ноды"` }
func (*ElasticConfiguration) ConvertTo ¶
func (ec *ElasticConfiguration) ConvertTo(elasticConfigPtr interface{}) error
type EndpointConfig
deprecated
type EndpointDescriptor ¶
type EndpointDescriptor struct { Path string `valid:"required~Required" json:"path"` Inner bool `json:"inner"` UserAuthRequired bool Extra map[string]interface{} Handler interface{} `json:"-"` }
func DescriptorsWithPrefix ¶
func DescriptorsWithPrefix(prefix string, descriptors []EndpointDescriptor) []EndpointDescriptor
type Isolation ¶
func (Isolation) GetApplicationId ¶
func (Isolation) GetDeviceId ¶
func (Isolation) GetDomainId ¶
func (Isolation) GetInstanceId ¶
func (Isolation) GetServiceId ¶
func (Isolation) GetSystemId ¶
func (Isolation) GetUserToken ¶
type MetricAddress ¶
type MetricAddress struct { AddressConfiguration Path string `json:"path" schema:"Путь,путь, по которому доступны метрики"` }
type MetricConfiguration ¶
type MetricConfiguration struct { Address MetricAddress `json:"address" schema:"Адрес HTTP сервера для публикации метрик"` Gc bool `` /* 159-byte string literal not displayed */ CollectingGCPeriod int32 `` /* 292-byte string literal not displayed */ Memory bool `` /* 129-byte string literal not displayed */ CollectingMemoryPeriod int32 `` /* 268-byte string literal not displayed */ }
type ModuleDependency ¶ added in v2.5.0
type ModuleInfo ¶
type NatsConfig ¶
type NatsConfig struct { ClusterId string `valid:"required~Required" schema:"Идентификатор кластера"` Address AddressConfiguration `valid:"required~Required" schema:"Адрес Nats"` PingAttempts int `` /* 256-byte string literal not displayed */ PintIntervalSec int `` /* 186-byte string literal not displayed */ ClientId string `json:"-"` }
type RabbitConfig ¶
type RabbitConfig struct { Address AddressConfiguration `valid:"required~Required" schema:"Адрес RabbitMQ"` Vhost string `schema:"Виртуальный хост,для изоляции очередей"` User string `schema:"Логин"` Password string `schema:"Пароль"` }
func (RabbitConfig) GetUri ¶
func (rc RabbitConfig) GetUri() string
func (RabbitConfig) ReconnectionTimeout ¶
func (rc RabbitConfig) ReconnectionTimeout() time.Duration
type RedisConfiguration ¶
type RedisConfiguration struct { Address AddressConfiguration `schema:"Адрес Redis"` Username string `schema:"Логин"` Password string `schema:"Пароль"` DefaultDB int `schema:"База данных по умолчанию"` Sentinel *RedisSentinel `schema:"Настройки Sentinel"` }
type RedisSentinel ¶ added in v2.5.0
type RoutingConfig ¶
type RoutingConfig []BackendDeclaration
func (*RoutingConfig) AddAddressOrUpdate ¶
func (cfg *RoutingConfig) AddAddressOrUpdate(backendConfig BackendDeclaration) bool
func (RoutingConfig) ToJSON ¶
func (cfg RoutingConfig) ToJSON() ([]byte, error)
type SocketConfiguration ¶
type SocketConfiguration struct { Host string `schema:"Хост"` Port string `schema:"Порт"` Path string `schema:"Путь"` Secure bool `schema:"Защищенное соединение,если включено используется https"` UrlParams map[string]string `schema:"Параметры,"` ConnectionString string `schema:"Строка соединения"` ConnectionReadLimitKB int64 `` /* 179-byte string literal not displayed */ }
Click to show internal directories.
Click to hide internal directories.