github.com/noisysockets/netstack@v0.6.0/pkg/tcpip/link/channel/channel_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  package channel
     4  
     5  import (
     6  	"context"
     7  
     8  	"github.com/noisysockets/netstack/pkg/state"
     9  )
    10  
    11  func (n *NotificationHandle) StateTypeName() string {
    12  	return "pkg/tcpip/link/channel.NotificationHandle"
    13  }
    14  
    15  func (n *NotificationHandle) StateFields() []string {
    16  	return []string{
    17  		"n",
    18  	}
    19  }
    20  
    21  func (n *NotificationHandle) beforeSave() {}
    22  
    23  // +checklocksignore
    24  func (n *NotificationHandle) StateSave(stateSinkObject state.Sink) {
    25  	n.beforeSave()
    26  	stateSinkObject.Save(0, &n.n)
    27  }
    28  
    29  func (n *NotificationHandle) afterLoad(context.Context) {}
    30  
    31  // +checklocksignore
    32  func (n *NotificationHandle) StateLoad(ctx context.Context, stateSourceObject state.Source) {
    33  	stateSourceObject.Load(0, &n.n)
    34  }
    35  
    36  func init() {
    37  	state.Register((*NotificationHandle)(nil))
    38  }