MCPcopy
hub / github.com/cilium/ebpf / Map

Struct Map

map.go:324–337  ·  view source on GitHub ↗

Map represents a Map file descriptor. It is not safe to close a Map which is used by other goroutines. Map operations taking `any` arguments are encoded using [sysenc.Marshal], which is zero-copy for fixed-size types without padding as well as slices of bytes, but may involve allocations for other

Source from the content-addressed store, hash-verified

322// Implement encoding.BinaryMarshaler or encoding.BinaryUnmarshaler if you
323// require custom encoding or decoding.
324type Map struct {
325 name string
326 fd *sys.FD
327 typ MapType
328 keySize uint32
329 valueSize uint32
330 maxEntries uint32
331 flags uint32
332 pinnedPath string
333 // Per CPU maps return values larger than the size in the spec
334 fullValueSize int
335
336 memory *Memory
337}
338
339// NewMapFromFD creates a [Map] around a raw fd.
340//

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected