MCPcopy Create free account
hub / github.com/devspace-sh/devspace / copyState

Function copyState

helper/server/downstream.go:416–431  ·  view source on GitHub ↗
(state map[string]*remote.Change)

Source from the content-addressed store, hash-verified

414}
415
416func copyState(state map[string]*remote.Change) map[string]*remote.Change {
417 newState := make(map[string]*remote.Change, len(state))
418 for k, v := range state {
419 newState[k] = &remote.Change{
420 ChangeType: v.ChangeType,
421 Path: v.Path,
422 MtimeUnix: v.MtimeUnix,
423 MtimeUnixNano: v.MtimeUnixNano,
424 Size: v.Size,
425 Mode: v.Mode,
426 IsDir: v.IsDir,
427 }
428 }
429
430 return newState
431}
432
433func streamChanges(basePath string, oldState map[string]*remote.Change, newState map[string]*remote.Change, stream remote.Downstream_ChangesServer, throttle time.Duration) (int64, error) {
434 changeAmount := int64(0)

Callers 1

getWatchStateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected