rcserver

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package rcserver binds the RC session server implementing the hipobj-rc-v2 two-phase transfer protocol. This file is a stub for platforms without RDMA support.

Index

Constants

View Source
const (
	SnapshotStatePrepared     = 0
	SnapshotStatePublishing   = 1
	SnapshotStateTransferring = 2
	SnapshotStateCompleting   = 3
	SnapshotStateReaping      = 4
	SnapshotReapPending       = 0x80
)

Snapshot state values mirrored from the cgo ABI.

View Source
const (
	ReadyOK         = 0
	ReadyBusy       = 1
	ReadyTimeout    = 2
	ReadyVerifyFail = 3
	ReadyWireFail   = 4
)

Ready outcome detail codes (see the linux build).

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviceOpts

type DeviceOpts struct {
	GidHint             string
	DevName             string
	Port                uint8
	GidIdx              int
	MaxSessions         uint32
	MaxStagingBytes     uint64
	MaxQPs              uint32
	MaxUserSessions     uint32
	MaxUserStagingBytes uint64
	MaxUserQPs          uint32
	TPrepMs             uint64
	TExecMs             uint64
	MaxReadySlots       uint32
	MaxStageSlots       uint32
	Debug               bool
}

DeviceOpts configures device selection and resource limits.

type Handle

type Handle struct {
	Epoch uint64
	Nonce uint64
}

Handle is an opaque consume-once lease identifier.

type PrepareRequest

type PrepareRequest struct {
	Principal   PrincipalID
	Op          uint8
	Target      string
	Offset      uint64
	Size        uint64
	ClientPsn   uint32
	Cookie      uint32
	ClientToken string
}

PrepareRequest carries the PREPARE wire parameters.

type PrepareResponse

type PrepareResponse struct {
	SessionID   string
	ServerQpn   uint32
	ServerPsn   uint32
	StagingAddr uint64
	StagingRkey uint32
	ReplyToken  string
}

PrepareResponse is the PREPARE reply.

type PrincipalID

type PrincipalID [32]byte

PrincipalID is the SHA-256 digest identifying the requester.

type PutView

type PutView struct {
	Buf    []byte
	Len    int
	Handle Handle
}

PutView is a borrowed PUT data view.

type RCSvc

type RCSvc struct{}

RCSvc owns the RC session server (stub).

func Init

func Init(opts DeviceOpts) (*RCSvc, error)

Init is a stub that always fails.

func (*RCSvc) BorrowStaging

func (s *RCSvc) BorrowStaging(sessionID string) (*StagingLease, error)

BorrowStaging is a stub.

func (*RCSvc) Cancel

func (s *RCSvc) Cancel(sessionID string, who PrincipalID) error

Cancel is a stub.

func (*RCSvc) Close

func (s *RCSvc) Close()

Close is a stub.

func (*RCSvc) FinishFinal

func (s *RCSvc) FinishFinal(sessionID string) error

FinishFinal is a stub.

func (*RCSvc) FinishPrepare

func (s *RCSvc) FinishPrepare(sessionID string, committed bool) error

FinishPrepare is a stub.

func (*RCSvc) FinishPut

func (s *RCSvc) FinishPut(view PutView, committed bool,
	etag, versionID string) error

FinishPut is a stub.

func (*RCSvc) FinishStaging

func (s *RCSvc) FinishStaging(lease StagingLease, ok bool,
	written int, etag, versionID string) error

FinishStaging is a stub.

func (*RCSvc) GetPutData

func (s *RCSvc) GetPutData(sessionID string) (*PutView, error)

GetPutData is a stub.

func (*RCSvc) Leave

func (s *RCSvc) Leave()

Leave is a stub.

func (*RCSvc) Prepare

func (s *RCSvc) Prepare(req PrepareRequest) (*PrepareResponse, error)

Prepare is a stub.

func (*RCSvc) ReadyTransfer

func (s *RCSvc) ReadyTransfer(req ReadyRequest) (*ReadyResponse, error)

ReadyTransfer is a stub.

func (*RCSvc) SessionInfo

func (s *RCSvc) SessionInfo(sessionID string, who PrincipalID) (*SessionInfo, error)

SessionInfo is a stub.

func (*RCSvc) SessionsSnapshot added in v1.9.0

func (s *RCSvc) SessionsSnapshot() ([]SessionSnapshot, error)

SessionsSnapshot is a stub.

func (*RCSvc) SetTerminalNotify added in v1.9.0

func (s *RCSvc) SetTerminalNotify(fn func(TerminalEvent))

SetTerminalNotify is a stub.

func (*RCSvc) TryEnter

func (s *RCSvc) TryEnter() bool

TryEnter is a stub.

type ReadyRequest

type ReadyRequest struct {
	Principal    PrincipalID
	SessionID    string
	Cookie       uint32
	ClientQpn    uint32
	ClientMrAddr uint64
	ClientMrRkey uint32
}

ReadyRequest carries the READY wire parameters.

type ReadyResponse

type ReadyResponse struct {
	BytesTransferred uint64
	CookieEcho       uint32
	// Outcome mirrors the RC_READY_* enum.
	Outcome   int
	Etag      string
	VersionID string
}

ReadyResponse is the READY reply.

type SessionInfo

type SessionInfo struct {
	Op     uint8
	Target string
}

SessionInfo describes a session for READY re-authorization.

type SessionSnapshot added in v1.9.0

type SessionSnapshot struct {
	SessionID    string
	Op           string
	Target       string
	State        uint8
	ReapPending  bool
	AgeMs        uint64
	StagingBytes uint64
}

SessionSnapshot describes a live RC session for observability.

type StagingLease

type StagingLease struct {
	Buf      []byte
	Capacity int
	Handle   Handle
}

StagingLease is a borrowed GET staging buffer.

type TerminalEvent added in v1.9.0

type TerminalEvent struct {
	SessionID string
	Outcome   int
	Bytes     uint64
}

TerminalEvent is a stub mirror of the linux record.

Jump to

Keyboard shortcuts

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