Documentation
¶
Overview ¶
Package rhiza provides the primary in-process Go API. HTTP is an optional adapter.
Index ¶
- Constants
- Variables
- func ValidateExecuteRequest(req ExecuteRequest) error
- type Config
- type DB
- func (db *DB) Close() error
- func (db *DB) Execute(ctx context.Context, req ExecuteRequest) (ExecuteResponse, error)
- func (db *DB) GraphChanges(ctx context.Context, req GraphStreamReadRequest) (GraphStreamReadResponse, error)
- func (db *DB) GraphExecute(ctx context.Context, req GraphCommand) (GraphExecuteResponse, error)
- func (db *DB) GraphQuery(ctx context.Context, req GraphQueryRequest) (GraphResult, error)
- func (db *DB) GraphStreamOffset(ctx context.Context, req GraphStreamOffsetRequest) (GraphStreamOffsetResponse, error)
- func (db *DB) GraphStreamRead(ctx context.Context, req GraphStreamReadRequest) (GraphStreamReadResponse, error)
- func (db *DB) Handler() http.Handler
- func (db *DB) KVCAS(ctx context.Context, req KVMutationRequest) (KVMutationResponse, error)
- func (db *DB) KVDelete(ctx context.Context, req KVMutationRequest) (KVMutationResponse, error)
- func (db *DB) KVGet(ctx context.Context, req KVGetRequest) (KVGetResponse, error)
- func (db *DB) KVPut(ctx context.Context, req KVMutationRequest) (KVMutationResponse, error)
- func (db *DB) NotificationDrops() uint64
- func (db *DB) NotifyPublish(ctx context.Context, req NotifyCommand) (MutationReceipt, error)
- func (db *DB) NotifySubscribe(topic string) (<-chan []byte, func(), error)
- func (db *DB) ObjectStoreStats() (ObjectStoreStats, bool)
- func (db *DB) Query(ctx context.Context, req QueryRequest) (QueryResponse, error)
- func (db *DB) Ready() bool
- func (db *DB) RequestStatus(ctx context.Context, req RequestStatusRequest) (RequestStatusResponse, error)
- func (db *DB) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (db *DB) SetGraphStreamOffset(ctx context.Context, req GraphStreamOffsetRequest) error
- func (db *DB) TrimGraphStream(ctx context.Context, req GraphStreamTrimRequest) error
- type ExecuteRequest
- type ExecuteResponse
- type GraphCommand
- type GraphExecuteResponse
- type GraphQueryRequest
- type GraphResult
- type GraphStreamEvent
- type GraphStreamOffsetRequest
- type GraphStreamOffsetResponse
- type GraphStreamReadRequest
- type GraphStreamReadResponse
- type GraphStreamRecord
- type GraphStreamTrimRequest
- type KVGetRequest
- type KVGetResponse
- type KVMutationRequest
- type KVMutationResponse
- type Member
- type MutationReceipt
- type NotifyCommand
- type ObjectStoreDurability
- type ObjectStoreStats
- type QueryRequest
- type QueryResponse
- type RequestStatusRequest
- type RequestStatusResponse
- type SQLStatement
Constants ¶
const ( ConsistencyLocal = "local" ConsistencyLinearizable = "linearizable" ObjectStoreDurabilityAsync = types.ObjectStoreDurabilityAsync ObjectStoreDurabilityBeforeAck = types.ObjectStoreDurabilityBeforeAck DefaultHedgeDelay = 5 * time.Millisecond // MaxReplicatedMutationBytes is the encoded consensus-value limit. MaxReplicatedMutationBytes = quepaxa.MaxReplicatedValueBytes // MaxHTTPBodyBytes is the optional HTTP adapter's larger JSON envelope limit. MaxHTTPBodyBytes = network.MaxRequestBodyBytes )
Variables ¶
var ( ErrNotReady = network.ErrNotReady ErrRequestConflict = network.ErrRequestConflict ErrInvalidRequest = network.ErrInvalidRequest ErrCommitUnknown = network.ErrCommitUnknown )
Functions ¶
func ValidateExecuteRequest ¶ added in v0.8.1
func ValidateExecuteRequest(req ExecuteRequest) error
ValidateExecuteRequest applies the replicated SQL contract and encoded-size limit without submitting the mutation.
Types ¶
type Config ¶
type Config struct {
ClusterID string
NodeID string
DataDir string
BindAddr string
PeerAddr string
AdminToken string
Members []Member
ObjStoreEndpoint string
ObjStoreBucket string
ObjStoreProvider string
ObjStoreDir string
ObjStorePrefix string
ObjStoreRegion string
ObjStoreInsecure bool
ObjStoreRetries int
ObjStoreAccessKey string
ObjStoreSecretKey string
ObjStoreSessionToken string
ObjStoreDurability ObjectStoreDurability
ObjStoreSyncInterval time.Duration
ObjStoreBatchDelay time.Duration
ObjStoreGCInterval time.Duration
ObjStoreGCGracePeriod time.Duration
CheckpointInterval time.Duration
CheckpointTailBytes int64
MaxWALBytes int64
// HedgeDelay delays each lower-priority proposer. Nil uses
// DefaultHedgeDelay; a pointer to zero explicitly enables eager hedging.
HedgeDelay *time.Duration
}
Config contains the durable local path, fixed membership, and peer endpoint.
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB owns one embedded Rhiza node and its private QUIC peer endpoint.
func (*DB) Execute ¶
func (db *DB) Execute(ctx context.Context, req ExecuteRequest) (ExecuteResponse, error)
func (*DB) GraphChanges ¶
func (db *DB) GraphChanges(ctx context.Context, req GraphStreamReadRequest) (GraphStreamReadResponse, error)
GraphChanges reads the node-local LatticeDB semantic graph changefeed.
func (*DB) GraphExecute ¶
func (db *DB) GraphExecute(ctx context.Context, req GraphCommand) (GraphExecuteResponse, error)
func (*DB) GraphQuery ¶
func (db *DB) GraphQuery(ctx context.Context, req GraphQueryRequest) (GraphResult, error)
func (*DB) GraphStreamOffset ¶
func (db *DB) GraphStreamOffset(ctx context.Context, req GraphStreamOffsetRequest) (GraphStreamOffsetResponse, error)
GraphStreamOffset returns a replicated durable consumer offset.
func (*DB) GraphStreamRead ¶
func (db *DB) GraphStreamRead(ctx context.Context, req GraphStreamReadRequest) (GraphStreamReadResponse, error)
GraphStreamRead reads a replicated named stream after its per-stream cursor.
func (*DB) KVCAS ¶
func (db *DB) KVCAS(ctx context.Context, req KVMutationRequest) (KVMutationResponse, error)
func (*DB) KVDelete ¶
func (db *DB) KVDelete(ctx context.Context, req KVMutationRequest) (KVMutationResponse, error)
func (*DB) KVGet ¶
func (db *DB) KVGet(ctx context.Context, req KVGetRequest) (KVGetResponse, error)
func (*DB) KVPut ¶
func (db *DB) KVPut(ctx context.Context, req KVMutationRequest) (KVMutationResponse, error)
func (*DB) NotificationDrops ¶
func (*DB) NotifyPublish ¶
func (db *DB) NotifyPublish(ctx context.Context, req NotifyCommand) (MutationReceipt, error)
func (*DB) NotifySubscribe ¶
func (*DB) ObjectStoreStats ¶
func (db *DB) ObjectStoreStats() (ObjectStoreStats, bool)
func (*DB) Query ¶
func (db *DB) Query(ctx context.Context, req QueryRequest) (QueryResponse, error)
func (*DB) Ready ¶ added in v0.8.1
Ready reports whether local recovery and catch-up completed. It is not a live quorum probe: an isolated peer may remain locally ready. Mutations and linearizable queries still fail closed when quorum is unavailable.
func (*DB) RequestStatus ¶
func (db *DB) RequestStatus(ctx context.Context, req RequestStatusRequest) (RequestStatusResponse, error)
func (*DB) SetGraphStreamOffset ¶
func (db *DB) SetGraphStreamOffset(ctx context.Context, req GraphStreamOffsetRequest) error
SetGraphStreamOffset stores a replicated durable consumer offset.
func (*DB) TrimGraphStream ¶
func (db *DB) TrimGraphStream(ctx context.Context, req GraphStreamTrimRequest) error
TrimGraphStream replicates deletion of records through the supplied sequence.
type ExecuteRequest ¶
type ExecuteRequest = network.ExecuteRequest
type ExecuteResponse ¶
type ExecuteResponse = network.ExecuteResponse
type GraphCommand ¶
type GraphCommand = types.GraphCommand
type GraphExecuteResponse ¶
type GraphExecuteResponse = network.GraphExecuteResponse
type GraphQueryRequest ¶
type GraphQueryRequest = network.GraphQueryRequest
type GraphResult ¶
type GraphResult = types.GraphCommandResult
type GraphStreamEvent ¶
type GraphStreamEvent = types.GraphStreamEvent
type GraphStreamOffsetRequest ¶
type GraphStreamOffsetRequest = network.GraphStreamOffsetRequest
type GraphStreamOffsetResponse ¶
type GraphStreamOffsetResponse = network.GraphStreamOffsetResponse
type GraphStreamReadRequest ¶
type GraphStreamReadRequest = network.GraphStreamReadRequest
type GraphStreamReadResponse ¶
type GraphStreamReadResponse = network.GraphStreamReadResponse
type GraphStreamRecord ¶
type GraphStreamRecord = types.GraphStreamRecord
type GraphStreamTrimRequest ¶
type GraphStreamTrimRequest = network.GraphStreamTrimRequest
type KVGetRequest ¶
type KVGetRequest = network.KVGetRequest
type KVGetResponse ¶
type KVGetResponse = network.KVGetResponse
type KVMutationRequest ¶
type KVMutationRequest = network.KVMutationRequest
type KVMutationResponse ¶
type KVMutationResponse = network.KVMutationResponse
type MutationReceipt ¶
type MutationReceipt = types.MutationReceipt
type NotifyCommand ¶
type NotifyCommand = types.NotifyCommand
type ObjectStoreDurability ¶
type ObjectStoreDurability = types.ObjectStoreDurability
type ObjectStoreStats ¶
type QueryRequest ¶
type QueryRequest = network.QueryRequest
type QueryResponse ¶
type QueryResponse = network.QueryResponse
type RequestStatusRequest ¶
type RequestStatusRequest = network.RequestStatusRequest
type RequestStatusResponse ¶
type RequestStatusResponse = network.RequestStatusResponse
type SQLStatement ¶
type SQLStatement = types.SQLStatement
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
rhiza
command
|
|
|
rhiza-bench
command
|
|
|
internal
|
|
|
pkg
|
|
|
quepaxa
Package quepaxa implements the crash-fault-tolerant QuePaxa Algorithm 3 recorder and Algorithm 4 proposer over a durable QLog.
|
Package quepaxa implements the crash-fault-tolerant QuePaxa Algorithm 3 recorder and Algorithm 4 proposer over a durable QLog. |