Documentation
¶
Index ¶
- Variables
- type AuditEvent
- type AuditLister
- type AuditSink
- type DiagnosticEvent
- type DiagnosticLister
- type DiagnosticsSink
- type ListAuditRequest
- type ListDiagnosticRequest
- type MemoryStore
- func (s *MemoryStore) AppendPluginAudit(_ context.Context, event AuditEvent) error
- func (s *MemoryStore) AppendPluginDiagnostic(_ context.Context, event DiagnosticEvent) error
- func (s *MemoryStore) ListPluginAudit(_ context.Context, req ListAuditRequest) ([]AuditEvent, error)
- func (s *MemoryStore) ListPluginDiagnostics(_ context.Context, req ListDiagnosticRequest) ([]DiagnosticEvent, error)
- type MemoryStoreOptions
- type SQLiteStore
- func (s *SQLiteStore) AppendPluginAudit(ctx context.Context, event AuditEvent) error
- func (s *SQLiteStore) AppendPluginDiagnostic(ctx context.Context, event DiagnosticEvent) error
- func (s *SQLiteStore) Close() error
- func (s *SQLiteStore) ListPluginAudit(ctx context.Context, req ListAuditRequest) ([]AuditEvent, error)
- func (s *SQLiteStore) ListPluginDiagnostics(ctx context.Context, req ListDiagnosticRequest) ([]DiagnosticEvent, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidEvent = errors.New("plugin observability event is invalid")
Functions ¶
This section is empty.
Types ¶
type AuditEvent ¶
type AuditEvent struct {
EventID string `json:"event_id,omitempty"`
Type string `json:"type"`
PluginID string `json:"plugin_id"`
PluginInstanceID string `json:"plugin_instance_id,omitempty"`
SurfaceID string `json:"surface_id,omitempty"`
SurfaceInstanceID string `json:"surface_instance_id,omitempty"`
RequestID string `json:"request_id,omitempty"`
Actor string `json:"actor,omitempty"`
OccurredAt time.Time `json:"occurred_at,omitempty"`
Details map[string]any `json:"details,omitempty"`
}
type AuditLister ¶
type AuditLister interface {
ListPluginAudit(ctx context.Context, req ListAuditRequest) ([]AuditEvent, error)
}
type AuditSink ¶
type AuditSink interface {
AppendPluginAudit(ctx context.Context, event AuditEvent) error
}
type DiagnosticEvent ¶
type DiagnosticEvent struct {
EventID string `json:"event_id,omitempty"`
Type string `json:"type"`
Severity string `json:"severity"`
Message string `json:"message"`
PluginID string `json:"plugin_id,omitempty"`
PluginInstanceID string `json:"plugin_instance_id,omitempty"`
SurfaceID string `json:"surface_id,omitempty"`
SurfaceInstanceID string `json:"surface_instance_id,omitempty"`
ActiveFingerprint string `json:"active_fingerprint,omitempty"`
RequestID string `json:"request_id,omitempty"`
OccurredAt time.Time `json:"occurred_at,omitempty"`
Details map[string]any `json:"details,omitempty"`
}
type DiagnosticLister ¶
type DiagnosticLister interface {
ListPluginDiagnostics(ctx context.Context, req ListDiagnosticRequest) ([]DiagnosticEvent, error)
}
type DiagnosticsSink ¶
type DiagnosticsSink interface {
AppendPluginDiagnostic(ctx context.Context, event DiagnosticEvent) error
}
type ListAuditRequest ¶
type ListDiagnosticRequest ¶
type ListDiagnosticRequest struct {
PluginID string `json:"plugin_id,omitempty"`
PluginInstanceID string `json:"plugin_instance_id,omitempty"`
SurfaceInstanceID string `json:"surface_instance_id,omitempty"`
Type string `json:"type,omitempty"`
Severity string `json:"severity,omitempty"`
Limit int `json:"limit,omitempty"`
}
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
func NewMemoryStore ¶
func NewMemoryStore(opts ...MemoryStoreOptions) *MemoryStore
func (*MemoryStore) AppendPluginAudit ¶
func (s *MemoryStore) AppendPluginAudit(_ context.Context, event AuditEvent) error
func (*MemoryStore) AppendPluginDiagnostic ¶
func (s *MemoryStore) AppendPluginDiagnostic(_ context.Context, event DiagnosticEvent) error
func (*MemoryStore) ListPluginAudit ¶
func (s *MemoryStore) ListPluginAudit(_ context.Context, req ListAuditRequest) ([]AuditEvent, error)
func (*MemoryStore) ListPluginDiagnostics ¶
func (s *MemoryStore) ListPluginDiagnostics(_ context.Context, req ListDiagnosticRequest) ([]DiagnosticEvent, error)
type MemoryStoreOptions ¶
type SQLiteStore ¶
type SQLiteStore struct {
// contains filtered or unexported fields
}
func NewSQLiteStore ¶
func NewSQLiteStore(ctx context.Context, path string, opts ...MemoryStoreOptions) (*SQLiteStore, error)
func (*SQLiteStore) AppendPluginAudit ¶
func (s *SQLiteStore) AppendPluginAudit(ctx context.Context, event AuditEvent) error
func (*SQLiteStore) AppendPluginDiagnostic ¶
func (s *SQLiteStore) AppendPluginDiagnostic(ctx context.Context, event DiagnosticEvent) error
func (*SQLiteStore) Close ¶
func (s *SQLiteStore) Close() error
func (*SQLiteStore) ListPluginAudit ¶
func (s *SQLiteStore) ListPluginAudit(ctx context.Context, req ListAuditRequest) ([]AuditEvent, error)
func (*SQLiteStore) ListPluginDiagnostics ¶
func (s *SQLiteStore) ListPluginDiagnostics(ctx context.Context, req ListDiagnosticRequest) ([]DiagnosticEvent, error)
Click to show internal directories.
Click to hide internal directories.