memif

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 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 - 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

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 returns the SocketFileURL

func (*Mechanism) GetSocketFilename

func (m *Mechanism) GetSocketFilename() string

GetSocketFilename returns memif mechanism socket filename

func (*Mechanism) SetSocketFileURL

func (m *Mechanism) SetSocketFileURL(urlString string)

SetSocketFileURL sets the NetNS URL - fmt.Sprintf("inode://%d/%d",dev,ino)

Jump to

Keyboard shortcuts

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