github.com/metacubex/gvisor@v0.0.0-20240320004321-933faba989ec/runsc/boot/boot_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 package boot 4 5 import ( 6 "context" 7 8 "github.com/metacubex/gvisor/pkg/state" 9 ) 10 11 func (f *sandboxNetstackCreator) StateTypeName() string { 12 return "runsc/boot.sandboxNetstackCreator" 13 } 14 15 func (f *sandboxNetstackCreator) StateFields() []string { 16 return []string{ 17 "clock", 18 "uniqueID", 19 "allowPacketEndpointWrite", 20 } 21 } 22 23 func (f *sandboxNetstackCreator) beforeSave() {} 24 25 // +checklocksignore 26 func (f *sandboxNetstackCreator) StateSave(stateSinkObject state.Sink) { 27 f.beforeSave() 28 stateSinkObject.Save(0, &f.clock) 29 stateSinkObject.Save(1, &f.uniqueID) 30 stateSinkObject.Save(2, &f.allowPacketEndpointWrite) 31 } 32 33 func (f *sandboxNetstackCreator) afterLoad(context.Context) {} 34 35 // +checklocksignore 36 func (f *sandboxNetstackCreator) StateLoad(ctx context.Context, stateSourceObject state.Source) { 37 stateSourceObject.Load(0, &f.clock) 38 stateSourceObject.Load(1, &f.uniqueID) 39 stateSourceObject.Load(2, &f.allowPacketEndpointWrite) 40 } 41 42 func init() { 43 state.Register((*sandboxNetstackCreator)(nil)) 44 }