Documentation
¶
Overview ¶
Package agent provides application services for the agent
Index ¶
- Variables
- type Service
- func (s *Service) GetAgent(ctx context.Context, instanceUID uuid.UUID) (*v1agent.Agent, error)
- func (s *Service) ListAgents(ctx context.Context, options *model.ListOptions) (*v1agent.ListResponse, error)
- func (s *Service) RestartAgent(ctx context.Context, instanceUID uuid.UUID) error
- func (s *Service) SearchAgents(ctx context.Context, query string, options *model.ListOptions) (*v1agent.ListResponse, error)
- func (s *Service) SetNewInstanceUID(ctx context.Context, instanceUID uuid.UUID, newInstanceUID uuid.UUID) (*v1agent.Agent, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrRestartCapabilityNotSupported is returned when agent doesn't support restart capability. ErrRestartCapabilityNotSupported = errors.New("agent does not support restart capability") )
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a struct that implements the AgentManageUsecase interface.
func New ¶
func New( agentUsecase domainport.AgentUsecase, agentNotificationUsecase domainport.AgentNotificationUsecase, logger *slog.Logger, ) *Service
New creates a new instance of the Service struct.
func (*Service) ListAgents ¶
func (s *Service) ListAgents( ctx context.Context, options *model.ListOptions, ) (*v1agent.ListResponse, error)
ListAgents implements port.AgentManageUsecase.
func (*Service) RestartAgent ¶ added in v0.1.24
RestartAgent implements port.AgentManageUsecase.
func (*Service) SearchAgents ¶ added in v0.1.25
func (s *Service) SearchAgents( ctx context.Context, query string, options *model.ListOptions, ) (*v1agent.ListResponse, error)
SearchAgents implements port.AgentManageUsecase.
Click to show internal directories.
Click to hide internal directories.