MCPcopy Create free account
hub / github.com/cloudfoundry/bosh-agent / SaveState

Method SaveState

platform/bootstrap_state.go:40–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38}
39
40func (s *BootstrapState) SaveState() (err error) {
41 jsonState, err := json.Marshal(*s)
42 if err != nil {
43 return bosherr.WrapError(err, "Marshalling bootstrap state")
44 }
45
46 err = s.fs.WriteFile(s.path, jsonState)
47 if err != nil {
48 return bosherr.WrapError(err, "Writing bootstrap state to file")
49 }
50
51 return
52}

Callers 2

SetupHostnameMethod · 0.45

Calls 1

MarshalMethod · 0.80

Tested by

no test coverage detected