(ctx context.Context, id int64, item *Item)
| 132 | } |
| 133 | |
| 134 | func (e *Example) Set(ctx context.Context, id int64, item *Item) error { |
| 135 | // enable write to new storage |
| 136 | // ... |
| 137 | if err := e.storeV1.Set(ctx, id, item); err != nil { |
| 138 | return fmt.Errorf("failed to store item: %w", err) |
| 139 | } |
| 140 | return nil |
| 141 | } |
| 142 | |
| 143 | func (e *Example) Get(ctx context.Context, id int64) (*Item, error) { |
| 144 | // 1. enable shadow read from new storage |