socketmask

package
v1.16.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IterateSocketMasks added in v1.16.0

func IterateSocketMasks(sockets []int, callback func(SocketMask))

IterateSocketMasks iterates all possible masks from a list of sockets, issuing a callback on each mask.

Types

type SocketMask

type SocketMask interface {
	Add(sockets ...int) error
	Remove(sockets ...int) error
	And(masks ...SocketMask)
	Or(masks ...SocketMask)
	Clear()
	Fill()
	IsEqual(mask SocketMask) bool
	IsEmpty() bool
	IsSet(socket int) bool
	IsNarrowerThan(mask SocketMask) bool
	String() string
	Count() int
	GetSockets() []int
}

SocketMask interface allows hint providers to create SocketMasks for TopologyHints

func And added in v1.16.0

func And(first SocketMask, masks ...SocketMask) SocketMask

And is a package level implementation of 'and' between first and masks

func NewEmptySocketMask added in v1.16.0

func NewEmptySocketMask() SocketMask

NewEmptySocketMask creates a new, empty SocketMask

func NewSocketMask

func NewSocketMask(sockets ...int) (SocketMask, error)

NewSocketMask creates a new SocketMask

func Or added in v1.16.0

func Or(first SocketMask, masks ...SocketMask) SocketMask

Or is a package level implementation of 'or' between first and masks

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL