rdmamode

package
v1.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mode

func Mode(rdmaIP string, rcEnable bool) (v1, v2 bool)

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

func WrapBackendShutdownAfterRC(be backend.Backend, rc Closer) backend.Backend

WrapBackendShutdownAfterRC returns be with a Shutdown that closes rc first.

func WrapShutdownOnce

func WrapShutdownOnce(be backend.Backend) backend.Backend

WrapShutdownOnce returns be with an idempotent Shutdown.

Types

type BackendShutdownAfterRC

type BackendShutdownAfterRC struct {
	backend.Backend
	// contains filtered or unexported fields
}

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

type ShutdownOnceBackend struct {
	backend.Backend
	// contains filtered or unexported fields
}

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.

type V1Settings

type V1Settings struct {
	Port        uint
	RetryCount  uint
	PoolBufSize int
	PoolBufCnt  int
	TunablesSet bool
	NumDCIs     int
	CQDepth     uint
}

V1Settings carries the cuObject v1 tunings that are validated only while the v1 backend runs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL