Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProviderFile ¶
type ProviderFile struct {
// contains filtered or unexported fields
}
ProviderFile provides static map of services from file
func NewProviderFile ¶
func NewProviderFile(config configuration.SLIExporterConfig) (*ProviderFile, error)
NewProviderFile returns new from-file provider instance
func (*ProviderFile) GetServiceByHost ¶
func (provider *ProviderFile) GetServiceByHost(host string) *Service
GetServiceByHost returns service from inner map by host, if any
func (*ProviderFile) Retrieve ¶
func (provider *ProviderFile) Retrieve() error
Retrieve does nothing in file provider
type ProviderK8SServices ¶
ProviderK8SServices serves to retrieve and provide data about K8S services leveraging K8S Api server through go-client
func NewProviderK8SServices ¶
func NewProviderK8SServices( client kubernetes.Interface, config configuration.SLIExporterConfig, logger logging.Logger) *ProviderK8SServices
NewProviderK8SServices is a constructor for ProviderK8SServices
func (*ProviderK8SServices) GetServiceByHost ¶
func (p *ProviderK8SServices) GetServiceByHost(host string) *Service
GetServiceByHost returns service from inner map by host, if any
func (*ProviderK8SServices) Retrieve ¶
func (p *ProviderK8SServices) Retrieve() error
Retrieve retrieves objects from k8s and refreshes inner mapping
type ProviderStub ¶
type ProviderStub struct{}
ProviderStub returns empty provider for test purposes and dry-run launches
func NewProviderStub ¶
func NewProviderStub() *ProviderStub
NewProviderStub is a constructor of ProviderStub
func (*ProviderStub) GetServiceByHost ¶
func (provider *ProviderStub) GetServiceByHost(host string) *Service
GetServiceByHost does nothing in stub
func (*ProviderStub) Retrieve ¶
func (provider *ProviderStub) Retrieve() error
Retrieve does nothing in stub
type Service ¶
Service is a structured "service" representation, containing service paths and domains for SLA metrics gathering
func CreateService ¶
func CreateService(config configuration.SLIExporterConfig, annotations map[string]string) (*Service, error)
CreateService tries to construct Service object from annotations dictionary
func (*Service) GetLabelByPath ¶
GetLabelByPath matches path to paths defined by regex group and returns regex group label
type ServicesProvider ¶
ServicesProvider is an interface that allows to get services for SLA metering