Documentation
¶
Overview ¶
Package agent provides the Agent gRPC service implementation.
Index ¶
- type FileStatus
- type Options
- type PendingFile
- type PendingKeyRequest
- type ProtoFileStatus
- type Service
- func (s *Service) QueueFile(instanceID, filename string, content []byte)
- func (s *Service) ReceiveFiles(req *emptypb.Empty, stream proto.AgentService_ReceiveFilesServer) error
- func (s *Service) ReceiveKeyRequests(req *emptypb.Empty, stream proto.AgentService_ReceiveKeyRequestsServer) error
- func (s *Service) SubmitHealthReport(stream proto.AgentService_SubmitHealthReportServer) error
- func (s *Service) SubmitPublicKeys(ctx context.Context, req *proto.PublicKeysRequest) (*emptypb.Empty, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileStatus ¶
FileStatus represents the status of a file from health reports
type Options ¶
type Options struct {
Storage storage.Storage
ConfigLoader *config.Loader
LocalDB *localdb.DB
SecretsStore secrets.Store
CACertPEM []byte
CAKeyPEM []byte
Shard string
Provider infra.Provider
Logger *slog.Logger
OnSpotTermination func(instanceID string, notice *proto.TerminationNotice) error
OnReconcileRequested func(groupKey, reason string) error
OnInstanceDisconnect func(instanceID string, graceful bool) error
}
Options contains options for creating an AgentService
type PendingFile ¶
PendingFile represents a file waiting to be delivered to an agent
type PendingKeyRequest ¶
PendingKeyRequest represents a key generation request waiting to be delivered to an agent
type ProtoFileStatus ¶
type ProtoFileStatus struct {
// contains filtered or unexported fields
}
ProtoFileStatus adapts proto.FileStatus to FileStatus interface
func (*ProtoFileStatus) IsError ¶
func (p *ProtoFileStatus) IsError() bool
func (*ProtoFileStatus) IsMissing ¶
func (p *ProtoFileStatus) IsMissing() bool
type Service ¶
type Service struct {
proto.UnimplementedAgentServiceServer
// contains filtered or unexported fields
}
Service implements the AgentService gRPC service
func (*Service) ReceiveFiles ¶
func (s *Service) ReceiveFiles(req *emptypb.Empty, stream proto.AgentService_ReceiveFilesServer) error
ReceiveFiles provides a persistent stream of files to be sent to the agent
func (*Service) ReceiveKeyRequests ¶
func (s *Service) ReceiveKeyRequests(req *emptypb.Empty, stream proto.AgentService_ReceiveKeyRequestsServer) error
ReceiveKeyRequests provides a persistent stream of key generation requests from server to agent
func (*Service) SubmitHealthReport ¶
func (s *Service) SubmitHealthReport(stream proto.AgentService_SubmitHealthReportServer) error
SubmitHealthReport processes health reports from agents via persistent stream
func (*Service) SubmitPublicKeys ¶
func (s *Service) SubmitPublicKeys(ctx context.Context, req *proto.PublicKeysRequest) (*emptypb.Empty, error)
SubmitPublicKeys processes public key submissions by storing them transactionally