Documentation ¶
Overview ¶
Package socketface implements UDP/TCP socket faces using Go net.Conn type.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GqlRxConnsType *graphql.Object GqlRxEpollType *graphql.Object )
GraphQL types.
Functions ¶
Types ¶
type Config ¶
type Config struct { iface.Config // sockettransport.Config fields. // See ndn-dpdk/ndn/sockettransport package for their semantics and defaults. RedialBackoffInitial nnduration.Milliseconds `json:"redialBackoffInitial,omitempty"` RedialBackoffMaximum nnduration.Milliseconds `json:"redialBackoffMaximum,omitempty"` }
Config contains socket face configuration.
type GlobalConfig ¶
type GlobalConfig struct { // Socket chooses a NUMA socket to create RX/TX threads for socket faces. // Default is the first NUMA socket. // If the specified NUMA socket does not exist, it uses the default. Socket eal.NumaSocket `json:"socket"` // RxConns configures net.Conn RX implementation. RxConns struct { // RingCapacity is the capacity of a ring buffer for packets that are received from net.Conn // but have not been picked up by C code. RingCapacity int `json:"ringCapacity"` } `json:"rxConns"` // RxEpoll configures epoll RX implementation, available for UDP sockets only. // If this is disabled, UDP sockets will use net.Conn RX implementation. RxEpoll struct { Disabled bool `json:"disabled"` } `json:"rxEpoll"` // TxSyscall configures syscall TX implementation, available for UDP sockets only. // If this is disabled, UDP sockets will use net.Conn TX implementation. TxSyscall struct { Disabled bool `json:"disabled"` } `json:"txSyscall"` }
GlobalConfig contains global options applied to all socket faces.
func (GlobalConfig) Apply ¶
func (cfg GlobalConfig) Apply()
type Locator ¶
type Locator struct { *Config Network string `json:"scheme"` Local string `json:"local,omitempty"` Remote string `json:"remote"` }
Locator describes network and addresses of a socket.
func (Locator) CreateFace ¶
CreateFace creates a face from this Locator.
func (Locator) WithSchemeField ¶
func (Locator) WithSchemeField()
WithSchemeField implements iface.locatorWithSchemeField interface.
Click to show internal directories.
Click to hide internal directories.