Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetEventRecorder ¶
func SetEventRecorder(r Recorder)
Types ¶
type APIEvent ¶
type APIEvent struct {
// Request metadata
RequestID string // Unique request identifier (X-Request-ID)
Method string // HTTP method (GET, POST, PUT, DELETE, PATCH)
Path string // API path (e.g., /api/recommend/{user-id})
// Response metadata
StatusCode int // HTTP response status code
ResponseTime int64 // Response time in milliseconds
Timestamp time.Time // Event timestamp
// Additional metadata
RemoteAddr string // Client remote address
}
APIEvent represents an API call event for billing purposes.
type NopRecorder ¶
type NopRecorder struct{}
func (*NopRecorder) RecordAPI ¶
func (n *NopRecorder) RecordAPI(ctx context.Context, event APIEvent)
func (*NopRecorder) RecordStorage ¶
func (n *NopRecorder) RecordStorage(ctx context.Context, event StorageEvent)
Click to show internal directories.
Click to hide internal directories.