github.com/wasilibs/wazerox@v0.0.0-20240124024944-4923be63ab5f/internal/close/close.go (about)

     1  // Package close allows experimental.CloseNotifier without introducing a
     2  // package cycle.
     3  package close
     4  
     5  import "context"
     6  
     7  // NotifierKey is a context.Context Value key. Its associated value should be a
     8  // Notifier.
     9  type NotifierKey struct{}
    10  
    11  type Notifier interface {
    12  	CloseNotify(ctx context.Context, exitCode uint32)
    13  }