public static ResponseParameters DecodeResponse(ClientMessage clientMessage)
        {
            using var iterator = clientMessage.GetEnumerator();
            var response = new ResponseParameters();

            iterator.Take(); // empty initial frame
            response.GroupId = RaftGroupIdCodec.Decode(iterator);
            return(response);
        }
        public static RequestParameters DecodeRequest(ClientMessage clientMessage)
        {
            using var iterator = clientMessage.GetEnumerator();
            var request = new RequestParameters();

            iterator.Take(); // empty initial frame
            request.GroupId = RaftGroupIdCodec.Decode(iterator);
            request.Name    = StringCodec.Decode(iterator);
            return(request);
        }
        public static RequestParameters DecodeRequest(ClientMessage clientMessage)
        {
            using var iterator = clientMessage.GetEnumerator();
            var request      = new RequestParameters();
            var initialFrame = iterator.Take();

            request.NewValue = initialFrame.Bytes.ReadLongL(RequestNewValueFieldOffset);
            request.GroupId  = RaftGroupIdCodec.Decode(iterator);
            request.Name     = StringCodec.Decode(iterator);
            return(request);
        }