From 99af25653750b58c264f713774ffaec4884aec92 Mon Sep 17 00:00:00 2001 From: Mariem Baccari Date: Wed, 8 Jul 2026 15:31:45 +0200 Subject: [PATCH] [raft/store] Add IsReadOnly to handler --- pkg/store/store.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/store/store.go b/pkg/store/store.go index 6cb8448c1..86e8275f7 100644 --- a/pkg/store/store.go +++ b/pkg/store/store.go @@ -25,9 +25,10 @@ type OperationRequest interface { // OperationHandler holds the logic for the encoding and execution of a registered operation type OperationHandler[R any] struct { - Encode func(req OperationRequest) ([]byte, error) - Decode func(buf []byte) (OperationRequest, error) - Execute func(ctx context.Context, repo R, request OperationRequest) (any, error) + Encode func(req OperationRequest) ([]byte, error) + Decode func(buf []byte) (OperationRequest, error) + Execute func(ctx context.Context, repo R, request OperationRequest) (any, error) + IsReadOnly bool } // TransactWithResult wraps Store.Transact and casts the result to ResultType, avoiding a cast at every call site.