Documentation
¶
Overview ¶
Package rdmamode resolves which RDMA paths a gateway runs and orders their shutdown. It is deliberately free of cgo so the behavior is testable on any build platform.
Index ¶
- func Mode(rdmaIP string, rcEnable bool) (v1, v2 bool)
- func V1ValidationError(s V1Settings) string
- func WrapBackendShutdownAfterRC(be backend.Backend, rc Closer) backend.Backend
- func WrapShutdownOnce(be backend.Backend) backend.Backend
- type BackendShutdownAfterRC
- type Closer
- type ShutdownOnceBackend
- type V1Settings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Mode ¶
Mode resolves which RDMA paths run: the cuObject v1 backend follows the legacy --rdma-ip contract, and the hipobj-rc-v2 control routes follow --rdma-rc-enable. Neither flag implies the other.
func V1ValidationError ¶
func V1ValidationError(s V1Settings) string
V1ValidationError describes the first invalid v1 setting, or the empty string when every setting is valid. Stale v1 values in the environment must not block v2-only or plain-S3 startup, so the gateway consults this only when v1 is on.
func WrapBackendShutdownAfterRC ¶
WrapBackendShutdownAfterRC returns be with a Shutdown that closes rc first.
Types ¶
type BackendShutdownAfterRC ¶
BackendShutdownAfterRC forwards a backend and closes the RC service before the wrapped backend shuts down. The RC handlers reference the backend and IAM service, so the RC service must stop accepting and drain before either dependency is closed by the gateway lifecycle. The whole shutdown, including the delegated backend call, runs exactly once: several closers (the gateway lifecycle and a deferred rollback in the startup path) may call Shutdown on the same instance, and the wrapped backends are not guaranteed to be idempotent.
func (*BackendShutdownAfterRC) Shutdown ¶
func (b *BackendShutdownAfterRC) Shutdown()
Shutdown closes the RC service, then the wrapped backend, once.
type Closer ¶
type Closer interface{ Close() }
Closer is the close operation of the RC session service. It is idempotent.
type ShutdownOnceBackend ¶
ShutdownOnceBackend makes a backend Shutdown idempotent. The gateway startup path defers a rollback close while the gateway lifecycle also shuts its backend down; a bare backend has no idempotency guarantee of its own.
func (*ShutdownOnceBackend) Shutdown ¶
func (b *ShutdownOnceBackend) Shutdown()
Shutdown closes the wrapped backend at most once.