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