Documentation ¶
Index ¶
- func InitServiceDiscovery()
- func IsServiceReachableFromExternal(service service.Service, sd ServiceDiscovery) bool
- func ValidateServiceBody(c *routing.Context) (service.Service, error)
- func ValidateServiceBodyAndServiceExists(c *routing.Context, serviceID string) (service.Service, int, error)
- func ValidateServiceExists(s service.Service) (service.Service, error)
- func ValidateServiceGroupBody(c *routing.Context) (servicegroup.ServiceGroup, error)
- type ServiceDiscovery
- func (serviceDisc *ServiceDiscovery) CreateService(s service.Service) (service.Service, error)
- func (serviceDisc *ServiceDiscovery) DeleteService(s service.Service) error
- func (serviceDisc *ServiceDiscovery) FindByIdentifierOrMatchingUri(identifier string, matchingURI string) (service.Service, error)
- func (serviceDisc *ServiceDiscovery) FindService(s service.Service) (service.Service, error)
- func (serviceDisc *ServiceDiscovery) FindServiceWithMatchingPrefix(uri string) (service.Service, error)
- func (serviceDisc *ServiceDiscovery) GetAllServices() ([]service.Service, error)
- func (serviceDisc *ServiceDiscovery) GetEndpointForUri(uri string) (service.Service, error)
- func (s *ServiceDiscovery) IsExternalRequest(requestContxt *routing.Context) bool
- func (serviceDisc *ServiceDiscovery) ListServices(page int, searchQuery string) []service.Service
- func (serviceDisc *ServiceDiscovery) NormalizeServices() error
- func (serviceDisc *ServiceDiscovery) SetRegisteredServices(rs []service.Service)
- func (serviceDisc *ServiceDiscovery) UpdateService(s service.Service) (service.Service, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitServiceDiscovery ¶
func InitServiceDiscovery()
InitServiceDiscovery initializes all components required for service discovery to work
func IsServiceReachableFromExternal ¶
func IsServiceReachableFromExternal(service service.Service, sd ServiceDiscovery) bool
IsServiceReachableFromExternal check if service is reachable from external
func ValidateServiceBody ¶
ValidateServiceBody validate service request body
func ValidateServiceBodyAndServiceExists ¶
func ValidateServiceBodyAndServiceExists(c *routing.Context, serviceID string) (service.Service, int, error)
ValidateServiceBodyAndServiceExists validates both request body and if service already exists
func ValidateServiceExists ¶
ValidateServiceExists validate if service already exists
func ValidateServiceGroupBody ¶
func ValidateServiceGroupBody(c *routing.Context) (servicegroup.ServiceGroup, error)
Types ¶
type ServiceDiscovery ¶
type ServiceDiscovery struct { User userModels.User // contains filtered or unexported fields }
ServiceDiscovery object with service discovery logic
func GetInternalServiceDiscoveryObject ¶
func GetInternalServiceDiscoveryObject() *ServiceDiscovery
GetInternalServiceDiscoveryObject return service discovery object with internal user
func GetServiceDiscoveryObject ¶
func GetServiceDiscoveryObject(user userModels.User) *ServiceDiscovery
GetServiceDiscoveryObject return service discovery object with request user context
func (*ServiceDiscovery) CreateService ¶
func (*ServiceDiscovery) DeleteService ¶
func (serviceDisc *ServiceDiscovery) DeleteService(s service.Service) error
func (*ServiceDiscovery) FindByIdentifierOrMatchingUri ¶
func (*ServiceDiscovery) FindService ¶
func (*ServiceDiscovery) FindServiceWithMatchingPrefix ¶
func (serviceDisc *ServiceDiscovery) FindServiceWithMatchingPrefix(uri string) (service.Service, error)
func (*ServiceDiscovery) GetAllServices ¶
func (serviceDisc *ServiceDiscovery) GetAllServices() ([]service.Service, error)
func (*ServiceDiscovery) GetEndpointForUri ¶
func (serviceDisc *ServiceDiscovery) GetEndpointForUri(uri string) (service.Service, error)
func (*ServiceDiscovery) IsExternalRequest ¶
func (s *ServiceDiscovery) IsExternalRequest(requestContxt *routing.Context) bool
func (*ServiceDiscovery) ListServices ¶
func (serviceDisc *ServiceDiscovery) ListServices(page int, searchQuery string) []service.Service
func (*ServiceDiscovery) NormalizeServices ¶
func (serviceDisc *ServiceDiscovery) NormalizeServices() error
func (*ServiceDiscovery) SetRegisteredServices ¶
func (serviceDisc *ServiceDiscovery) SetRegisteredServices(rs []service.Service)
func (*ServiceDiscovery) UpdateService ¶
Click to show internal directories.
Click to hide internal directories.