Documentation
¶
Index ¶
Constants ¶
const ( ContextKeyAPIRequestInfo = "_api_request_info" ContextKeyAPIResponseInfo = "_api_response_info" ContextKeyAPIError = "_api_error" ContextKeyCredential = "_credential" ContextKeySession = "_session" ContextKeyNamespace = "_namespace" ContextKeyDB = "_db" ContextKeyTX = "_tx" ContextKeyLogger = "_logger" ContextKeyTrace = "_trace" ContextKeyConfig = "_config" )
const (
RedactMask = "REDACTED XXXX"
)
const (
TimeFormat = "2006-01-02 15:04:05.00"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Daemon ¶
Daemon may be started and stopped repeatedly on one instance. Stop refuses new work, cancels and awaits the rest (an earlier Stop's leftovers included) until ctx ends, then forces what it can and returns an error wrapping ctx's; it returns only after intake has stopped, and leftovers must not reach a later Start.
type Debuggable ¶
type Initializable ¶
Init runs on first startup and every restart: load dynamic config here.
type Liveness ¶ added in v0.3.0
Probes honour the caller's ctx deadline; an implementation may only tighten it.
type MessageHandler ¶ added in v0.2.16
MessageHandler's name is its subscription; it need not be a Service.
type MessageSender ¶ added in v0.2.16
type Pair ¶
type Pair[K comparable, V any] interface { SetKey(key K) SetValue(value V) GetKey() K GetValue() V String() string }
func NewPair ¶
func NewPair[K comparable, V any](key K, value V) Pair[K, V]
type RawMessageHandler ¶ added in v0.2.16
type RawMessageHandler interface {
Named
HandleRawMessage(ctx context.Context, kind string, payload any) error
}
RawMessageHandler receives every message, typed or raw.