Documentation
¶
Overview ¶
Package memif provides helper methods for the Mechanism memif
Index ¶
Constants ¶
View Source
const ( // MECHANISM string MECHANISM = "MEMIF" // SocketFilename - name of the memif socketfile SocketFilename = "socketfile" // SocketFileURL - file url for the memif socketfile SocketFileURL = common.InodeURL // SocketFileScheme - expected scheme of the SocketFileURL SocketFileScheme = "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 (file://socketPath)
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) GetParameters ¶
GetParameters returns the map of all parameters to the mechanism
func (*Mechanism) GetSocketFileURL ¶
GetSocketFileURL returns the SocketFileURL
func (*Mechanism) GetSocketFilename ¶
GetSocketFilename returns memif mechanism socket filename
func (*Mechanism) SetSocketFileURL ¶
SetSocketFileURL sets the NetNS URL - fmt.Sprintf("inode://%d/%d",dev,ino)
Click to show internal directories.
Click to hide internal directories.