Documentation
¶
Index ¶
- type Service
- func (s Service) CheckHealthEndpoint(ctx context.Context, healthEndpoint string) bool
- func (s *Service) CheckPreconditions()
- func (s *Service) DeregisterAllMicroservices(ctx context.Context) (bool, error)
- func (s *Service) DeregisterMicroservice(ctx context.Context, id string) (bool, error)
- func (s *Service) FindMicroserviceByID(ctx context.Context, id string) (*domain.Microservice, error)
- func (s *Service) ListMicroservices(ctx context.Context) ([]*domain.Microservice, error)
- func (s *Service) PollMicroservicesStatus(ctx context.Context) ([]*domain.MicroserviceStatus, error)
- func (s *Service) RegisterMicroservice(ctx context.Context, input domain.Microservice) (*domain.Microservice, error)
- type Usecase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is an admin tools service e.g for registering and deregistering micro-services
func NewService ¶
func NewService(ext extension.BaseExtension) *Service
NewService returns admin service
func (Service) CheckHealthEndpoint ¶
CheckHealthEndpoint Check if service is reachable
func (*Service) DeregisterAllMicroservices ¶
DeregisterAllMicroservices removes all services at once. This is called internally when running in CLI mode
func (*Service) DeregisterMicroservice ¶
DeregisterMicroservice removes a micro-service
func (*Service) FindMicroserviceByID ¶
func (s *Service) FindMicroserviceByID(ctx context.Context, id string) (*domain.Microservice, error)
FindMicroserviceByID retrieves a micro-service by it's ID
func (*Service) ListMicroservices ¶
ListMicroservices returns all registered micro-services
func (*Service) PollMicroservicesStatus ¶
func (s *Service) PollMicroservicesStatus(ctx context.Context) ([]*domain.MicroserviceStatus, error)
PollMicroservicesStatus checks if the registered microservices are serving HTTP requests/ healthy
func (*Service) RegisterMicroservice ¶
func (s *Service) RegisterMicroservice( ctx context.Context, input domain.Microservice, ) (*domain.Microservice, error)
RegisterMicroservice registers a micro-service
type Usecase ¶
type Usecase interface { RegisterMicroservice( ctx context.Context, input domain.Microservice, ) (*domain.Microservice, error) ListMicroservices(ctx context.Context) ([]*domain.Microservice, error) DeregisterMicroservice(ctx context.Context, id string) (bool, error) DeregisterAllMicroservices(ctx context.Context) (bool, error) FindMicroserviceByID(ctx context.Context, id string) (*domain.Microservice, error) PollMicroservicesStatus(ctx context.Context) ([]*domain.MicroserviceStatus, error) }
Usecase ...
Click to show internal directories.
Click to hide internal directories.