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
- type DeviceOpts
- type Handle
- type PrepareRequest
- type PrepareResponse
- type PrincipalID
- type PutView
- type RCSvc
- func (s *RCSvc) BorrowStaging(sessionID string) (*StagingLease, error)
- func (s *RCSvc) Cancel(sessionID string, who PrincipalID) error
- func (s *RCSvc) Close()
- func (s *RCSvc) FinishFinal(sessionID string) error
- func (s *RCSvc) FinishPrepare(sessionID string, committed bool) error
- func (s *RCSvc) FinishPut(view PutView, committed bool, etag, versionID string) error
- func (s *RCSvc) FinishStaging(lease StagingLease, ok bool, written int, etag, versionID string) error
- func (s *RCSvc) GetPutData(sessionID string) (*PutView, error)
- func (s *RCSvc) Leave()
- func (s *RCSvc) Prepare(req PrepareRequest) (*PrepareResponse, error)
- func (s *RCSvc) ReadyTransfer(req ReadyRequest) (*ReadyResponse, error)
- func (s *RCSvc) SessionInfo(sessionID string, who PrincipalID) (*SessionInfo, error)
- func (s *RCSvc) SessionsSnapshot() ([]SessionSnapshot, error)
- func (s *RCSvc) SetTerminalNotify(fn func(TerminalEvent))
- func (s *RCSvc) TryEnter() bool
- type ReadyRequest
- type ReadyResponse
- type SessionInfo
- type SessionSnapshot
- type StagingLease
- type TerminalEvent
Constants ¶
const ( SnapshotStatePrepared = 0 SnapshotStatePublishing = 1 SnapshotStateTransferring = 2 SnapshotStateCompleting = 3 SnapshotStateReaping = 4 SnapshotReapPending = 0x80 )
Snapshot state values mirrored from the cgo ABI.
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 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 RCSvc ¶
type RCSvc struct{}
RCSvc owns the RC session server (stub).
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) FinishFinal ¶
FinishFinal is a stub.
func (*RCSvc) FinishPrepare ¶
FinishPrepare 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 ¶
GetPutData 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.
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 ¶
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 ¶
StagingLease is a borrowed GET staging buffer.
type TerminalEvent ¶ added in v1.9.0
TerminalEvent is a stub mirror of the linux record.