Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is a cache service
func (*Cache) Middleware ¶
func (cache *Cache) Middleware() echo.MiddlewareFunc
Middleware returns cache middleware
type Inventory ¶
type Inventory struct {
// contains filtered or unexported fields
}
Inventory service
func NewInventory ¶
NewInventory creates new inventory
func (*Inventory) AddUpdateListener ¶
func (*Inventory) Get ¶
Get one host by its identifier. Identifier could be: - host name - IP address - email - admin MXID
func (*Inventory) GetUpdatedAt ¶
GetUpdatedAt returns the last update timestamp
type InventoryService ¶
type InventoryService interface { GetUpdatedAt() time.Time Get(ctx context.Context, host string) *ansible.Host GetAll(ctx context.Context, group string) map[string]*ansible.Host }
InventoryService interface
type ServiceDiscovery ¶
type ServiceDiscovery struct {
// contains filtered or unexported fields
}
ServiceDiscovery for Prometheus
func NewServiceDiscovery ¶
func NewServiceDiscovery(inv InventoryService) *ServiceDiscovery
NewServiceDiscovery returns new prometheus service discovery service
func (*ServiceDiscovery) Get ¶
func (sd *ServiceDiscovery) Get(ctx context.Context, identifier, job string, singleOnly bool) []*models.ServiceDiscovery
Get service discovery, if identifier is empty it will return sd for all customers hosts
func (*ServiceDiscovery) GetUpdatedAt ¶
func (sd *ServiceDiscovery) GetUpdatedAt() time.Time
GetUpdatedAt returns the last updated at timestamp
Click to show internal directories.
Click to hide internal directories.