NewStateBackend 创建 StateBackend 实例
()
| 28 | |
| 29 | // NewStateBackend 创建 StateBackend 实例 |
| 30 | func NewStateBackend() *StateBackend { |
| 31 | return &StateBackend{ |
| 32 | files: make(map[string]*FileData), |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | // ListInfo 实现 BackendProtocol.ListInfo |
| 37 | func (b *StateBackend) ListInfo(ctx context.Context, path string) ([]FileInfo, error) { |
no outgoing calls