github.com/haraldrudell/parl@v0.4.176/pnet/message.go (about)

     1  /*
     2  © 2021–present Harald Rudell <harald.rudell@gmail.com> (https://haraldrudell.github.io/haraldrudell/)
     3  ISC License
     4  */
     5  
     6  package pnet
     7  
     8  import "fmt"
     9  
    10  // Message is a portable routing message emitted by the netlink socket or obtain via sysctl
    11  type Message interface {
    12  	Action() (action Action)
    13  	Dump() (dump string)
    14  	fmt.Stringer
    15  }
    16  
    17  // Callback allows for processing of routing message,eg. populating a map
    18  type Callback func(msg Message)