Documentation
¶
Index ¶
- Variables
- func TrustBundleID(clientAuthorityID string, serverCAPEM []byte) (string, error)
- type AgentRegistry
- type AgentSessionValidator
- type BindingRegistry
- type CertificateSigner
- type GRPCService
- func (s *GRPCService) ConfigureCertificateRenewal(signer CertificateSigner, serverCAPEM []byte, trustBundleID string)
- func (s *GRPCService) ConfigureRuntimeQueries(broker *RuntimeQueryBroker)
- func (s *GRPCService) Connect(...) error
- func (s *GRPCService) OpenRuntimeQueryChannel(...) error
- func (s *GRPCService) RenewCertificate(ctx context.Context, request *clusteragentv1alpha1.RenewCertificateRequest) (*clusteragentv1alpha1.RenewCertificateResponse, error)
- type IssuedCertificate
- type RuntimeDispatcher
- type RuntimeObservability
- func (r *RuntimeObservability) CurrentEvents(ctx context.Context, scope observability.Scope, query observability.EventQuery) ([]observability.Event, bool, []string, error)
- func (r *RuntimeObservability) CurrentLogs(ctx context.Context, scope observability.Scope, since time.Time, search string, ...) (observability.LogBatch, error)
- func (r *RuntimeObservability) CurrentMetrics(ctx context.Context, scope observability.Scope, _ time.Time) (observability.MetricSnapshot, error)
- type RuntimeQueryBroker
- type RuntimeQueryResponse
- type Signer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRuntimeQueryRejected = errors.New("runtime query rejected") )
View Source
var ErrInvalidCSR = errors.New("agent certificate request is invalid")
View Source
var ErrPeerIdentityMismatch = errors.New("agent peer identity does not match")
Functions ¶
Types ¶
type AgentRegistry ¶
type AgentRegistry interface {
ActivateAgent(context.Context, string, []byte, string, string, string, []string, workspacecontract.ProvisioningMode, string, string, time.Time, audit.Event) (bool, error)
TouchAgent(context.Context, string, []byte, string, uint64, time.Time) error
RenewAgent(context.Context, string, []byte, string, []byte, time.Time, func(string) (store.AgentCertificate, error), audit.Event) (store.AgentCertificate, error)
ReconcileAgentObservations(context.Context, string, string, uint64, []store.RuntimeObservation, bool) error
ReconcileCapabilityObservations(context.Context, string, string, uint64, []capabilitycontract.Observation, bool, time.Time) error
}
type AgentSessionValidator ¶
type BindingRegistry ¶
type CertificateSigner ¶
type GRPCService ¶
type GRPCService struct {
clusteragentv1alpha1.UnimplementedClusterAgentServiceServer
// contains filtered or unexported fields
}
func NewGRPCService ¶
func NewGRPCService(registry AgentRegistry, dispatcher RuntimeDispatcher, heartbeatInterval time.Duration) *GRPCService
func (*GRPCService) ConfigureCertificateRenewal ¶
func (s *GRPCService) ConfigureCertificateRenewal(signer CertificateSigner, serverCAPEM []byte, trustBundleID string)
ConfigureCertificateRenewal enables authenticated key rotation. The server trust root returned to the Agent is deliberately distinct from the CA that signs Agent client identities.
func (*GRPCService) ConfigureRuntimeQueries ¶
func (s *GRPCService) ConfigureRuntimeQueries(broker *RuntimeQueryBroker)
func (*GRPCService) Connect ¶
func (s *GRPCService) Connect(stream grpc.BidiStreamingServer[clusteragentv1alpha1.ConnectRequest, clusteragentv1alpha1.ConnectResponse]) error
func (*GRPCService) OpenRuntimeQueryChannel ¶
func (s *GRPCService) OpenRuntimeQueryChannel(stream grpc.BidiStreamingServer[clusteragentv1alpha1.OpenRuntimeQueryChannelRequest, clusteragentv1alpha1.OpenRuntimeQueryChannelResponse]) error
func (*GRPCService) RenewCertificate ¶
func (s *GRPCService) RenewCertificate(ctx context.Context, request *clusteragentv1alpha1.RenewCertificateRequest) (*clusteragentv1alpha1.RenewCertificateResponse, error)
type IssuedCertificate ¶
type RuntimeDispatcher ¶
type RuntimeDispatcher interface {
NextCommand(context.Context, string) (*clusteragentv1alpha1.RuntimeCommand, bool, error)
HandleResult(context.Context, string, *clusteragentv1alpha1.RuntimeResult) error
Abandon(context.Context, string, string) error
}
type RuntimeObservability ¶
type RuntimeObservability struct {
// contains filtered or unexported fields
}
func NewRuntimeObservability ¶
func NewRuntimeObservability(broker *RuntimeQueryBroker) *RuntimeObservability
func (*RuntimeObservability) CurrentEvents ¶
func (r *RuntimeObservability) CurrentEvents(ctx context.Context, scope observability.Scope, query observability.EventQuery) ([]observability.Event, bool, []string, error)
func (*RuntimeObservability) CurrentLogs ¶
func (r *RuntimeObservability) CurrentLogs(ctx context.Context, scope observability.Scope, since time.Time, search string, limit int) (observability.LogBatch, error)
func (*RuntimeObservability) CurrentMetrics ¶
func (r *RuntimeObservability) CurrentMetrics(ctx context.Context, scope observability.Scope, _ time.Time) (observability.MetricSnapshot, error)
type RuntimeQueryBroker ¶
type RuntimeQueryBroker struct {
// contains filtered or unexported fields
}
func NewRuntimeQueryBroker ¶
func NewRuntimeQueryBroker(validator AgentSessionValidator) *RuntimeQueryBroker
func (*RuntimeQueryBroker) Query ¶
func (b *RuntimeQueryBroker) Query(ctx context.Context, installationID string, request *clusteragentv1alpha1.RuntimeQueryRequest) (RuntimeQueryResponse, error)
type RuntimeQueryResponse ¶
type RuntimeQueryResponse struct {
Chunks []*clusteragentv1alpha1.RuntimeQueryChunk
}
Click to show internal directories.
Click to hide internal directories.