github.com/MerlinKodo/gvisor@v0.0.0-20231110090155-957f62ecf90e/pkg/tcpip/ports/ports_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 package ports 4 5 import ( 6 "github.com/MerlinKodo/gvisor/pkg/state" 7 ) 8 9 func (f *Flags) StateTypeName() string { 10 return "pkg/tcpip/ports.Flags" 11 } 12 13 func (f *Flags) StateFields() []string { 14 return []string{ 15 "MostRecent", 16 "LoadBalanced", 17 "TupleOnly", 18 } 19 } 20 21 func (f *Flags) beforeSave() {} 22 23 // +checklocksignore 24 func (f *Flags) StateSave(stateSinkObject state.Sink) { 25 f.beforeSave() 26 stateSinkObject.Save(0, &f.MostRecent) 27 stateSinkObject.Save(1, &f.LoadBalanced) 28 stateSinkObject.Save(2, &f.TupleOnly) 29 } 30 31 func (f *Flags) afterLoad() {} 32 33 // +checklocksignore 34 func (f *Flags) StateLoad(stateSourceObject state.Source) { 35 stateSourceObject.Load(0, &f.MostRecent) 36 stateSourceObject.Load(1, &f.LoadBalanced) 37 stateSourceObject.Load(2, &f.TupleOnly) 38 } 39 40 func init() { 41 state.Register((*Flags)(nil)) 42 }