responseexecute

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package responseexecute applies control-plane-signed response commands behind an endpoint-local journal.

Index

Constants

This section is empty.

Variables

View Source
var ErrExecutionOutcomeUnknown = errors.New("response execution outcome unknown")

Functions

This section is empty.

Types

type Actuator

type Actuator = ports.ResponseActuator

Actuator and its outcome remain aliases for compatibility; the endpoint side-effect port lives in ports.

type ActuatorOutcome

type ActuatorOutcome = ports.ResponseActuatorOutcome

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(agentID, assetID shared.ID, keys ports.ResponseCommandKeyResolver, journal ports.ResponseExecutionJournal, actuator Actuator, clock ports.Clock) (*Service, error)

func (*Service) AcknowledgeResult

func (s *Service) AcknowledgeResult(ctx context.Context, attemptKey, commandDigest string) error

AcknowledgeResult durably closes one exact outbox item after the control plane accepts it.

func (*Service) Execute

func (s *Service) Execute(ctx context.Context, command fleetagent.ResponseCommand, leaseID string, leaseUntil time.Time) (fleetagent.ResponseExecutionResult, error)

func (*Service) ExecuteHaltCommand

func (s *Service) ExecuteHaltCommand(ctx context.Context, command fleetagent.ResponseHaltCommand, leaseID string, leaseUntil time.Time) error

ExecuteHaltCommand verifies a separately signed, addressed halt command before durably raising the endpoint-local monotonic fence. It carries no production-changing action payload.

func (*Service) Halt

func (s *Service) Halt(ctx context.Context, generation int64) error

Halt durably latches the local execution fence before returning. Clearing the latch requires a future separately governed resume protocol; an ordinary command cannot lower or clear it.

func (*Service) PendingResults

PendingResults returns terminal local outcomes that the control plane has not acknowledged yet.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL