Documentation
¶
Index ¶
- func ExtractJSONArgument(args []string, jsonIndex int) (string, bool)
- type ConcurrencyReleaseStore
- type ConnEnv
- type Env
- type Handler
- type InFlightSnapshotStore
- type Registry
- func (r *Registry) Execute(ctx context.Context, env Env, args []string) Reply
- func (r *Registry) RegisterDirect(command string, key string, handler Handler) error
- func (r *Registry) RegisterDynamic(command string, typeValue string, handler Handler) error
- func (r *Registry) SetDirectDefault(command string, handler Handler) error
- func (r *Registry) SetDynamicDefault(command string, handler Handler) error
- type Reply
- type ReplyKind
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConcurrencyReleaseStore ¶ added in v1.0.63
type ConcurrencyReleaseStore interface {
ApplyConcurrencyRelease(context.Context, cluster.ConcurrencyReleaseRequest) error
}
ConcurrencyReleaseStore atomically applies cumulative credential concurrency releases.
type ConnEnv ¶
type ConnEnv struct {
SubscribeConfigYAML func() (int64, error)
UnsubscribeConfigYAML func() (int64, error)
IsSubscribed func() bool
SubscribeMembership func(context.Context, int, int64) (cluster.ConnectionLifetime, error)
AttachSubscriptionLifetimeFunc func(cluster.ConnectionLifetime) error
FenceFingerprint func(context.Context, string) error
CloseLocalFingerprint func()
PrepareDispatchReply func() error
AccountedReplyFailure func() error
// contains filtered or unexported fields
}
func (*ConnEnv) AttachSubscriptionLifetime ¶ added in v1.0.63
func (e *ConnEnv) AttachSubscriptionLifetime(lifetime cluster.ConnectionLifetime) error
AttachSubscriptionLifetime records the lifetime attached to a subscription socket.
func (*ConnEnv) SubscriptionLifetime ¶ added in v1.0.63
func (e *ConnEnv) SubscriptionLifetime() (cluster.ConnectionLifetime, bool)
SubscriptionLifetime returns the attached subscription lifetime, when present.
type Env ¶
type Env struct {
Runtime *home.Runtime
Conn *ConnEnv
// InFlightStore persists in-flight observation frames.
InFlightStore InFlightSnapshotStore
// InFlightLimits bounds the in-flight observation frame accepted by InFlightStore.
InFlightLimits cluster.InFlightLimits
// ConcurrencyReleaseStore applies cumulative limiter releases from this connection.
ConcurrencyReleaseStore ConcurrencyReleaseStore
// ClientIP is the remote TCP client's IP address as resolved by the RESP server.
// It can be empty when the address cannot be resolved.
ClientIP string
// NodeID is the mTLS client certificate common name when available.
// It can be empty in unit tests or unauthenticated contexts.
NodeID string
// ClientCertificateFingerprint is the SHA-256 fingerprint of the mTLS leaf certificate.
ClientCertificateFingerprint string
// ConnectionLifetime is fixed when the connection is accepted and cannot be
// upgraded by a subscription performed on the same socket. Its fingerprint and
// connected time are the only in-flight snapshot ownership identity.
ConnectionLifetime cluster.ConnectionLifetime
}
type InFlightSnapshotStore ¶ added in v1.0.63
type InFlightSnapshotStore interface {
IngestInFlightFrame(context.Context, cluster.InFlightIngestIdentity, []byte, cluster.InFlightLimits) (cluster.InFlightIngestResult, error)
}
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func (*Registry) RegisterDirect ¶
RegisterDirect handles a register direct.
func (*Registry) RegisterDynamic ¶
RegisterDynamic handles a register dynamic.
func (*Registry) SetDirectDefault ¶
SetDirectDefault sets a direct default.
type Reply ¶
type Reply struct {
Kind ReplyKind
// SubscriptionLifetime is server-only metadata and is never serialized.
SubscriptionLifetime *cluster.ConnectionLifetime
SimpleString string
BulkString []byte
RedisError string
Integer int64
Array []Reply
Sensitive bool
AccountedAdmission bool
PreWriteError error
}
func SensitiveBulkString ¶ added in v1.0.63
func (*Reply) ClearSensitive ¶ added in v1.0.63
func (r *Reply) ClearSensitive()
Click to show internal directories.
Click to hide internal directories.