Documentation
¶
Overview ¶
Package hosts owns host enrollment, authentication, inventory, connector ownership, and durable host management work.
Index ¶
- Variables
- type ActiveAttempt
- type ConnectorCancellation
- type Detail
- type Enrollment
- type EnrollmentResult
- type Identity
- type InstallRequest
- type Service
- func (s *Service) AppendConnectorEvent(ctx context.Context, hostID, connectorID, jobID uuid.UUID, ...) error
- func (s *Service) AppendManagementEvent(ctx context.Context, hostID, jobID uuid.UUID, ...) (dbq.AppendHostManagementEventRow, error)
- func (s *Service) ApproveEnrollment(ctx context.Context, p authz.Principal, userCode string) (dbq.HostEnrollmentSession, error)
- func (s *Service) Authenticate(ctx context.Context, token string) (Identity, error)
- func (s *Service) BeginEnrollment(ctx context.Context, clientIP string, info protocol.HostInfo) (Enrollment, error)
- func (s *Service) Cancellations(ctx context.Context, hostID uuid.UUID) ([]ConnectorCancellation, error)
- func (s *Service) ClaimWork(ctx context.Context, hostID uuid.UUID, claimConnector bool) (*protocol.HostWork, error)
- func (s *Service) CompleteConnector(ctx context.Context, hostID, connectorID, jobID uuid.UUID, ...) (dbq.ConnectorJob, error)
- func (s *Service) CompleteEnrollment(ctx context.Context, deviceSecret string) (EnrollmentResult, error)
- func (s *Service) CompleteManagement(ctx context.Context, hostID, jobID uuid.UUID, ...) (dbq.HostManagementJob, error)
- func (s *Service) DenyEnrollment(ctx context.Context, p authz.Principal, userCode string) error
- func (s *Service) Get(ctx context.Context, p authz.Principal, hostID uuid.UUID) (Detail, error)
- func (s *Service) GetJob(ctx context.Context, p authz.Principal, jobID uuid.UUID) (dbq.HostManagementJob, []dbq.HostManagementEvent, error)
- func (s *Service) InspectEnrollment(ctx context.Context, p authz.Principal, userCode string) (dbq.HostEnrollmentSession, error)
- func (s *Service) List(ctx context.Context, p authz.Principal) ([]dbq.ListHostsRow, error)
- func (s *Service) ReconcileInventory(ctx context.Context, hostID uuid.UUID, ...) (protocol.HostConnectorInventoryMutationResponse, error)
- func (s *Service) RenewConnectorAttempts(ctx context.Context, hostID uuid.UUID, attempts []ActiveAttempt) error
- func (s *Service) RenewManagementAttempts(ctx context.Context, hostID uuid.UUID, attempts []ActiveAttempt) error
- func (s *Service) RequestInstall(ctx context.Context, p authz.Principal, hostID uuid.UUID, ...) (dbq.HostManagementJob, error)
- func (s *Service) RequestRemove(ctx context.Context, p authz.Principal, connectorID uuid.UUID, ...) (dbq.HostManagementJob, error)
- func (s *Service) RequestRollback(ctx context.Context, p authz.Principal, connectorID uuid.UUID, ...) (dbq.HostManagementJob, error)
- func (s *Service) RequestShell(ctx context.Context, p authz.Principal, hostID uuid.UUID, ...) (dbq.HostManagementJob, error)
- func (s *Service) RequestUpdate(ctx context.Context, p authz.Principal, connectorID, artifactFileID uuid.UUID, ...) (dbq.HostManagementJob, error)
- func (s *Service) Sync(ctx context.Context, hostID uuid.UUID, request protocol.HostSyncRequest) (dbq.Host, error)
- func (s *Service) WaitForWork(ctx context.Context, hostID uuid.UUID, claimConnector bool, ...) (*protocol.HostWork, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEnrollmentRateLimited = errors.New("host enrollment rate limit exceeded") ErrSlowDown = errors.New("host enrollment polling too quickly") )
Functions ¶
This section is empty.
Types ¶
type ConnectorCancellation ¶
type Detail ¶
type Detail struct {
Host dbq.Host
Capabilities []string
OwnerName string
Connectors []dbq.ConnectorResource
Jobs []dbq.HostManagementJob
}
type Enrollment ¶
type EnrollmentResult ¶
type InstallRequest ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) AppendConnectorEvent ¶
func (*Service) AppendManagementEvent ¶
func (s *Service) AppendManagementEvent(ctx context.Context, hostID, jobID uuid.UUID, event protocol.HostManagementEvent) (dbq.AppendHostManagementEventRow, error)
func (*Service) ApproveEnrollment ¶
func (*Service) Authenticate ¶
func (*Service) BeginEnrollment ¶
func (*Service) Cancellations ¶
func (*Service) CompleteConnector ¶
func (s *Service) CompleteConnector(ctx context.Context, hostID, connectorID, jobID uuid.UUID, completion protocol.JobCompletion) (dbq.ConnectorJob, error)
func (*Service) CompleteEnrollment ¶
func (*Service) CompleteManagement ¶
func (s *Service) CompleteManagement(ctx context.Context, hostID, jobID uuid.UUID, completion protocol.HostManagementCompletion) (dbq.HostManagementJob, error)
func (*Service) DenyEnrollment ¶
func (*Service) InspectEnrollment ¶
func (*Service) ReconcileInventory ¶
func (s *Service) ReconcileInventory(ctx context.Context, hostID uuid.UUID, request protocol.HostConnectorInventoryMutationRequest) (protocol.HostConnectorInventoryMutationResponse, error)
ReconcileInventory applies one durable installation mutation under the shared connector lock protocol documented by connectors.LockResources.
func (*Service) RenewConnectorAttempts ¶
func (*Service) RenewManagementAttempts ¶
func (*Service) RequestInstall ¶
func (*Service) RequestRemove ¶
func (*Service) RequestRollback ¶
func (*Service) RequestShell ¶
func (*Service) RequestUpdate ¶
Click to show internal directories.
Click to hide internal directories.