Documentation
¶
Overview ¶
Package memif provides helper methods for the Mechanism memif
Index ¶
- Constants
- func New(socketPath string) *networkservice.Mechanism
- func NewAbstract(netNSPath string) *networkservice.Mechanism
- type Mechanism
- func (m *Mechanism) GetNetNSURL() string
- func (m *Mechanism) GetParameters() map[string]string
- func (m *Mechanism) GetSocketFileURL() string
- func (m *Mechanism) GetSocketFilename() string
- func (m *Mechanism) SetNetNSURL(urlString string)
- func (m *Mechanism) SetSocketFileURL(urlString string)
- func (m *Mechanism) SetSocketFilename(filename string)
Constants ¶
const ( // MECHANISM string MECHANISM = "MEMIF" // SocketFilename - [abstract sockets case] name of the memif socketfile SocketFilename = "socketfile" // NetNSURL - [abstract sockets case] NetNS URL, it can be either: // * file:///proc/${pid}/ns/net - ${pid} process net NS // * inode://${dev}/${ino} - while transferring file between processes using grpcfd NetNSURL = common.InodeURL // SocketFileURL - [FS sockets case] memif socketfile URL, it can be either: // * file://${path} - memif socketfile // * inode://${dev}/${ino} - while transferring file between processes using grpcfd SocketFileURL = common.InodeURL // FileScheme - expected scheme of the NetNSURL, SocketFileURL FileScheme = "file" )
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(socketPath string) *networkservice.Mechanism
New returns *networkservice.Mechanism of type memif using the given socketPath
func NewAbstract ¶ added in v1.1.0
func NewAbstract(netNSPath string) *networkservice.Mechanism
NewAbstract returns *networkservice.Mechanism of type memif using the given netNSPath
Types ¶
type Mechanism ¶
type Mechanism struct {
*networkservice.Mechanism
}
Mechanism provides helper methods for mechanisms of type memif
func ToMechanism ¶
func ToMechanism(m *networkservice.Mechanism) *Mechanism
ToMechanism turns a networkservice.Mechanism into a version with helper methods for memif If Mechanism m is *not* of type memif.MECHANISM, it returns nil
func (*Mechanism) GetNetNSURL ¶ added in v1.1.0
GetNetNSURL [abstract sockets case] returns the NetNS URL, it can be either: * file:///proc/${pid}/ns/net - ${pid} process net NS * inode://${dev}/${ino} - while transferring file between processes using grpcfd
func (*Mechanism) GetParameters ¶
GetParameters returns the map of all parameters to the mechanism
func (*Mechanism) GetSocketFileURL ¶
GetSocketFileURL [FS sockets case] returns the memif socketfile URL, it can be either:
// * file://${path} - memif socketfile // * inode://${dev}/${ino} - while transferring file between processes using grpcfd
func (*Mechanism) GetSocketFilename ¶
GetSocketFilename [abstract sockets case] returns memif mechanism socket filename
func (*Mechanism) SetNetNSURL ¶ added in v1.1.0
SetNetNSURL [abstract sockets case] sets the NetNS URL - file:///proc/${pid}/ns/net
func (*Mechanism) SetSocketFileURL ¶
SetSocketFileURL [FS sockets case] sets the memif socketfile URL.
func (*Mechanism) SetSocketFilename ¶ added in v1.1.0
SetSocketFilename [abstract sockets case] sets memif mechanism socket filename