Documentation
¶
Overview ¶
Package common contains basic routines needed by other modules in go-dpdk package.
Index ¶
Constants ¶
View Source
const ( // Size of the void pointer. SizeOfCPtr = C.sizeof_struct_void_ptr )
View Source
const (
SocketIDAny = int(C.SOCKET_ID_ANY)
)
SocketIDAny represents selection for any NUMA socket.
Variables ¶
View Source
var ( ErrNoConfig = errors.New("Missing rte_config") ErrSecondary = errors.New("Operation not allowed in secondary processes") )
Functions ¶
func Assert ¶
Assert allows to perform one-lined tests and, optionally, print some diagnostic info if the test failed.
If fail is true, test failure will cause panic and cease test execution.
func Errno ¶
func Errno(n interface{}) error
Errno converts return value of C function into meaningful error.
If n is nil, then n = RteErrno() if n is not nil and not a signed integer, function panics.
Types ¶
type Registry ¶
type Registry interface {
Create(interface{}) ObjectID
Read(ObjectID) interface{}
Update(ObjectID, interface{})
Delete(ObjectID)
}
Registry implements CRUD operations to map ID and objects.
func NewRegistryArray ¶
func NewRegistryArray() Registry
func NewRegistryMap ¶
func NewRegistryMap() Registry
type Splitter ¶
type Splitter struct {
// True if rune is a white space.
IsSpace func(rune) bool
// True if rune is quote. Any rune embraced by the one of these
// pairs is considered a part of a token even if IsSpace returns
// true. A pairs must not contradict white space and another
// pair.
//
// If true, return closing quote rune.
IsQuote func(rune) (rune, bool)
// If true, final token is allowed not to contain closing quote.
// If false, ErrOpenQuote error will be returned if no closing
// quote found.
AllowOpenQuote bool
}
Click to show internal directories.
Click to hide internal directories.