@@ -20,48 +20,48 @@ import (
2020)
2121
2222type Fake struct {
23- getFn func (ctx context.Context , req * api.GetStateRequest ) (* api.StateResponse , error )
24- getBulkFn func (ctx context.Context , req * api.GetBulkStateRequest ) (api.BulkStateResponse , error )
25- transactionalStateOperationFn func (ctx context.Context , ignoreHosted bool , req * api.TransactionalRequest ) error
23+ getFn func (ctx context.Context , req * api.GetStateRequest , lock bool ) (* api.StateResponse , error )
24+ getBulkFn func (ctx context.Context , req * api.GetBulkStateRequest , lock bool ) (api.BulkStateResponse , error )
25+ transactionalStateOperationFn func (ctx context.Context , ignoreHosted bool , req * api.TransactionalRequest , lock bool ) error
2626}
2727
2828func New () * Fake {
2929 return & Fake {
30- getFn : func (ctx context.Context , req * api.GetStateRequest ) (* api.StateResponse , error ) {
30+ getFn : func (ctx context.Context , req * api.GetStateRequest , lock bool ) (* api.StateResponse , error ) {
3131 return nil , nil
3232 },
33- getBulkFn : func (ctx context.Context , req * api.GetBulkStateRequest ) (api.BulkStateResponse , error ) {
33+ getBulkFn : func (ctx context.Context , req * api.GetBulkStateRequest , lock bool ) (api.BulkStateResponse , error ) {
3434 return api.BulkStateResponse {}, nil
3535 },
36- transactionalStateOperationFn : func (ctx context.Context , ignoreHosted bool , req * api.TransactionalRequest ) error {
36+ transactionalStateOperationFn : func (ctx context.Context , ignoreHosted bool , req * api.TransactionalRequest , lock bool ) error {
3737 return nil
3838 },
3939 }
4040}
4141
42- func (f * Fake ) WithGetFn (fn func (ctx context.Context , req * api.GetStateRequest ) (* api.StateResponse , error )) * Fake {
42+ func (f * Fake ) WithGetFn (fn func (ctx context.Context , req * api.GetStateRequest , lock bool ) (* api.StateResponse , error )) * Fake {
4343 f .getFn = fn
4444 return f
4545}
4646
47- func (f * Fake ) WithGetBulkFn (fn func (ctx context.Context , req * api.GetBulkStateRequest ) (api.BulkStateResponse , error )) * Fake {
47+ func (f * Fake ) WithGetBulkFn (fn func (ctx context.Context , req * api.GetBulkStateRequest , lock bool ) (api.BulkStateResponse , error )) * Fake {
4848 f .getBulkFn = fn
4949 return f
5050}
5151
52- func (f * Fake ) WithTransactionalStateOperationFn (fn func (ctx context.Context , ignoreHosted bool , req * api.TransactionalRequest ) error ) * Fake {
52+ func (f * Fake ) WithTransactionalStateOperationFn (fn func (ctx context.Context , ignoreHosted bool , req * api.TransactionalRequest , lock bool ) error ) * Fake {
5353 f .transactionalStateOperationFn = fn
5454 return f
5555}
5656
57- func (f * Fake ) Get (ctx context.Context , req * api.GetStateRequest ) (* api.StateResponse , error ) {
58- return f .getFn (ctx , req )
57+ func (f * Fake ) Get (ctx context.Context , req * api.GetStateRequest , lock bool ) (* api.StateResponse , error ) {
58+ return f .getFn (ctx , req , lock )
5959}
6060
61- func (f * Fake ) GetBulk (ctx context.Context , req * api.GetBulkStateRequest ) (api.BulkStateResponse , error ) {
62- return f .getBulkFn (ctx , req )
61+ func (f * Fake ) GetBulk (ctx context.Context , req * api.GetBulkStateRequest , lock bool ) (api.BulkStateResponse , error ) {
62+ return f .getBulkFn (ctx , req , lock )
6363}
6464
65- func (f * Fake ) TransactionalStateOperation (ctx context.Context , ignoreHosted bool , req * api.TransactionalRequest ) error {
66- return f .transactionalStateOperationFn (ctx , ignoreHosted , req )
65+ func (f * Fake ) TransactionalStateOperation (ctx context.Context , ignoreHosted bool , req * api.TransactionalRequest , lock bool ) error {
66+ return f .transactionalStateOperationFn (ctx , ignoreHosted , req , lock )
6767}
0 commit comments