Documentation
¶
Index ¶
- Constants
- func ValidRequestID(value string) bool
- func WithRequestID(ctx context.Context, requestID string) context.Context
- type Component
- type Config
- type ErrorCode
- type Event
- type Field
- func Attempt(value int) Field
- func ComponentField(value Component) Field
- func Duration(value time.Duration) Field
- func Enabled(value bool) Field
- func ErrorCodeField(value ErrorCode) Field
- func FailedCount(value int64) Field
- func Generation(value int64) Field
- func ItemCount(value int64) Field
- func Method(value string) Field
- func ModeField(value Mode) Field
- func OperationField(value Operation) Field
- func OutcomeField(value Outcome) Field
- func QueueField(value Queue) Field
- func RequestID(value string) Field
- func RequestSize(value int64) Field
- func ResponseSize(value int64) Field
- func RetriedCount(value int64) Field
- func Retryable(value bool) Field
- func Route(value string) Field
- func StatusClassField(value int) Field
- func StatusCode(value int) Field
- func WorkerCount(value int) Field
- func WorkerField(value Worker) Field
- type Level
- type Logger
- func (l *Logger) Debug(event Event, fields ...Field)
- func (l *Logger) Error(event Event, fields ...Field)
- func (l *Logger) Info(event Event, fields ...Field)
- func (l *Logger) Log(ctx context.Context, level Level, event Event, fields ...Field)
- func (l *Logger) StandardLogger(component Component, operation Operation) *log.Logger
- func (l *Logger) Warn(event Event, fields ...Field)
- type Mode
- type Operation
- type Outcome
- type Queue
- type StatusClass
- type Worker
Constants ¶
View Source
const MaxRecordBytes = 16 * 1024
Variables ¶
This section is empty.
Functions ¶
func ValidRequestID ¶ added in v0.32.0
Types ¶
type Component ¶ added in v0.32.0
type Component string
const ( ComponentProcess Component = "process" ComponentHTTP Component = "http" ComponentAuthentication Component = "authentication" ComponentWebhook Component = "webhook" ComponentEmail Component = "email" ComponentChallenge Component = "challenge" ComponentQueue Component = "queue" ComponentMaintenance Component = "maintenance" ComponentConfiguration Component = "configuration" ComponentDatabase Component = "database" ComponentCache Component = "cache" ComponentProvider Component = "provider" ComponentOperator Component = "operator" ComponentOther Component = "other" )
type ErrorCode ¶ added in v0.32.0
type ErrorCode string
const ( ErrorInvalidRequest ErrorCode = "invalid_request" ErrorInvalidCredentials ErrorCode = "invalid_credentials" ErrorAccessDenied ErrorCode = "access_denied" ErrorRateLimited ErrorCode = "rate_limited" ErrorConflict ErrorCode = "conflict" ErrorNotFound ErrorCode = "not_found" ErrorProviderRejected ErrorCode = "provider_rejected" ErrorDeliveryFailed ErrorCode = "delivery_failed" ErrorTimeout ErrorCode = "timeout" ErrorAttemptsExhausted ErrorCode = "attempts_exhausted" ErrorDeadlineExceeded ErrorCode = "deadline_exceeded" ErrorContractViolation ErrorCode = "contract_violation" ErrorConfigurationInvalid ErrorCode = "configuration_invalid" ErrorLeaseLost ErrorCode = "lease_lost" ErrorResourceCleanup ErrorCode = "resource_cleanup" ErrorInternalFailure ErrorCode = "internal_failure" ErrorOther ErrorCode = "other" )
type Event ¶ added in v0.32.0
type Event string
const ( EventProcessLifecycle Event = "process_lifecycle" EventConfigurationStatus Event = "configuration_status" EventRequestCompleted Event = "request_completed" EventAuthenticationOutcome Event = "authentication_outcome" EventWebhookDelivery Event = "webhook_delivery" EventQueueOutcome Event = "queue_outcome" EventWorkerOutcome Event = "worker_outcome" EventMaintenanceOutcome Event = "maintenance_outcome" EventInternalOperation Event = "internal_operation" EventLogRecordDropped Event = "log_record_dropped" )
type Field ¶ added in v0.32.0
type Field struct {
// contains filtered or unexported fields
}
func ComponentField ¶ added in v0.32.0
func ErrorCodeField ¶ added in v0.32.0
func FailedCount ¶ added in v0.32.0
func Generation ¶ added in v0.32.0
func OperationField ¶ added in v0.32.0
func OutcomeField ¶ added in v0.32.0
func QueueField ¶ added in v0.32.0
func RequestSize ¶ added in v0.32.0
func ResponseSize ¶ added in v0.32.0
func RetriedCount ¶ added in v0.32.0
func StatusClassField ¶ added in v0.32.0
func StatusCode ¶ added in v0.32.0
func WorkerCount ¶ added in v0.32.0
func WorkerField ¶ added in v0.32.0
type Logger ¶ added in v0.32.0
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) StandardLogger ¶ added in v0.32.0
StandardLogger safely adapts libraries that require the standard library logger. The library-controlled message is discarded rather than admitted as an unbounded field.
type Operation ¶ added in v0.32.0
type Operation string
const ( OperationStartup Operation = "startup" OperationShutdown Operation = "shutdown" OperationServeHTTP Operation = "serve_http" OperationRequest Operation = "request" OperationLogin Operation = "login" OperationSignup Operation = "signup" OperationReauthenticate Operation = "reauthenticate" OperationAccountRecovery Operation = "account_recovery" OperationAccountUpdate Operation = "account_update" OperationProviderLink Operation = "provider_link" OperationPasskey Operation = "passkey" OperationRateLimit Operation = "rate_limit" OperationContractValidation Operation = "contract_validation" OperationWebhookPublish Operation = "webhook_publish" OperationWebhookDeliver Operation = "webhook_deliver" OperationWebhookListen Operation = "webhook_listen" OperationClaim Operation = "claim" OperationDeliver Operation = "deliver" OperationRetry Operation = "retry" OperationRecover Operation = "recover" OperationCleanup Operation = "cleanup" OperationSnapshot Operation = "snapshot" OperationLease Operation = "lease" OperationConfiguration Operation = "configuration" OperationTransportSecurity Operation = "transport_security" OperationRevocation Operation = "revocation" OperationResourceClose Operation = "resource_close" OperationOther Operation = "other" )
type Outcome ¶ added in v0.32.0
type Outcome string
const ( OutcomeStarted Outcome = "started" OutcomeStopping Outcome = "stopping" OutcomeStopped Outcome = "stopped" OutcomeSucceeded Outcome = "succeeded" OutcomeDenied Outcome = "denied" OutcomeFailed Outcome = "failed" OutcomeDegraded Outcome = "degraded" OutcomeRetryScheduled Outcome = "retry_scheduled" OutcomeExhausted Outcome = "exhausted" OutcomeRecovered Outcome = "recovered" OutcomeSkipped Outcome = "skipped" OutcomeIncomplete Outcome = "incomplete" OutcomeClientError Outcome = "client_error" OutcomeServerError Outcome = "server_error" OutcomeOther Outcome = "other" )
type StatusClass ¶ added in v0.32.0
type StatusClass string
const ( StatusInformational StatusClass = "informational" StatusSuccess StatusClass = "success" StatusRedirect StatusClass = "redirect" StatusClientError StatusClass = "client_error" StatusServerError StatusClass = "server_error" StatusUnknown StatusClass = "unknown" )
Click to show internal directories.
Click to hide internal directories.