memif

package
v1.13.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 4 Imported by: 9

Documentation

Overview

Package memif provides helper methods for the Mechanism memif

Index

Constants

View Source
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

func (m *Mechanism) GetNetNSURL() string

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

func (m *Mechanism) GetParameters() map[string]string

GetParameters returns the map of all parameters to the mechanism

func (*Mechanism) GetSocketFileURL

func (m *Mechanism) GetSocketFileURL() string

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

func (m *Mechanism) GetSocketFilename() string

GetSocketFilename [abstract sockets case] returns memif mechanism socket filename

func (*Mechanism) SetNetNSURL added in v1.1.0

func (m *Mechanism) SetNetNSURL(urlString string)

SetNetNSURL [abstract sockets case] sets the NetNS URL - file:///proc/${pid}/ns/net

func (*Mechanism) SetSocketFileURL

func (m *Mechanism) SetSocketFileURL(urlString string)

SetSocketFileURL [FS sockets case] sets the memif socketfile URL.

func (*Mechanism) SetSocketFilename added in v1.1.0

func (m *Mechanism) SetSocketFilename(filename string)

SetSocketFilename [abstract sockets case] sets memif mechanism socket filename

Jump to

Keyboard shortcuts

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