lnet

package
v0.0.0-...-7bde1eb Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2016 License: MIT Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SupportedDrivers

func SupportedDrivers() []string

SupportedDrivers returns a list of supported LND names

Types

type IbNid

type IbNid struct {
	IPAddress net.IP
	// contains filtered or unexported fields
}

IbNid is an Infiniband LND NID

func (*IbNid) Address

func (t *IbNid) Address() interface{}

Address returns the underlying net.IP NB: This address is used for identification at the LND level, using the HCA port's IPoIB address.

func (*IbNid) Driver

func (t *IbNid) Driver() string

Driver returns the driver name

func (*IbNid) LNet

func (t *IbNid) LNet() string

LNet returns a string representation of the driver name and instance

type LoopbackNid

type LoopbackNid struct{}

LoopbackNid is a Loopback LND NID. It will only ever be 0@lo.

func (*LoopbackNid) Address

func (t *LoopbackNid) Address() interface{}

Address returns the underlying net.IP

func (*LoopbackNid) Driver

func (t *LoopbackNid) Driver() string

Driver returns the LND name

func (*LoopbackNid) LNet

func (t *LoopbackNid) LNet() string

LNet returns a string representation of the driver name and instance

type Nid

type Nid struct {
	// contains filtered or unexported fields
}

Nid is a container for RawNid and holds methods for serializing to/from JSON.

func NidFromString

func NidFromString(inString string) (*Nid, error)

NidFromString takes a string representation of a Nid and returns an *Nid.

func (*Nid) Address

func (nid *Nid) Address() interface{}

Address returns the underlying Nid address (e.g. a net.IP, string, etc.)

func (*Nid) Driver

func (nid *Nid) Driver() string

Driver returns the name of the Nid's LND

func (*Nid) MarshalJSON

func (nid *Nid) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*Nid) String

func (nid *Nid) String() string

func (*Nid) UnmarshalJSON

func (nid *Nid) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type NidList

type NidList []*Nid

NidList is a list of NIDs for a server

func (NidList) String

func (n NidList) String() string

type RawNid

type RawNid interface {
	Driver() string
	Address() interface{}
	LNet() string
}

RawNid represents the actual Nid implementation (tcp, o2ib, etc)

type TCPNid

type TCPNid struct {
	IPAddress net.IP
	// contains filtered or unexported fields
}

TCPNid is a TCP LND NID

func (*TCPNid) Address

func (t *TCPNid) Address() interface{}

Address returns the underlying net.IP

func (*TCPNid) Driver

func (t *TCPNid) Driver() string

Driver returns the LND name

func (*TCPNid) LNet

func (t *TCPNid) LNet() string

LNet returns a string representation of the driver name and instance

type TargetSpec

type TargetSpec []NidList

TargetSpec is a list of NidLists -- any of the NIDs could be used to access this target on one of its servers

func (TargetSpec) String

func (l TargetSpec) String() string

Jump to

Keyboard shortcuts

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