l3

package
v2.0.0-alpha+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// StaticArpKeyPrefix is a prefix used in ETCD to store configuration for Linux static ARPs.
	StaticArpKeyPrefix = "linux/config/v2/arp/"

	// StaticRouteKeyPrefix is a prefix used in ETCD to store configuration for Linux static routes.
	StaticRouteKeyPrefix = "linux/config/v2/route/"

	// StaticLinkLocalRouteKeyPrefix is a prefix for keys derived from link-local routes.
	StaticLinkLocalRouteKeyPrefix = "linux/link-local-route/"
)

Variables

View Source
var LinuxStaticRoute_Scope_name = map[int32]string{
	0: "UNDEFINED",
	1: "GLOBAL",
	2: "SITE",
	3: "LINK",
	4: "HOST",
}
View Source
var LinuxStaticRoute_Scope_value = map[string]int32{
	"UNDEFINED": 0,
	"GLOBAL":    1,
	"SITE":      2,
	"LINK":      3,
	"HOST":      4,
}

Functions

func ParseStaticArpKey

func ParseStaticArpKey(key string) (iface string, ipAddr net.IP, err error)

ParseStaticArpKey parses ARP entry from a key.

func ParseStaticLinkLocalRouteKey

func ParseStaticLinkLocalRouteKey(key string) (dstNetAddr *net.IPNet, outgoingInterface string, err error)

ParseStaticLinkLocalRouteKey parses route attributes from a key derived from link-local route.

func ParseStaticRouteKey

func ParseStaticRouteKey(key string) (dstNetAddr *net.IPNet, outgoingInterface string, err error)

ParseStaticRouteKey parses Linux route attributes from a key.

func StaticArpKey

func StaticArpKey(iface, ipAddr string) string

StaticArpKey returns the key used in ETCD to store configuration of a particular Linux ARP entry.

func StaticLinkLocalRouteKey

func StaticLinkLocalRouteKey(dstAddr, outgoingInterface string) string

StaticLinkLocalRouteKey returns a derived key used to represent link-local route.

func StaticRouteKey

func StaticRouteKey(dstAddr, outgoingInterface string) string

StaticRouteKey returns the key used in ETCD to store configuration of a particular Linux route.

Types

type LinuxStaticARPEntry

type LinuxStaticARPEntry struct {
	Interface            string   `protobuf:"bytes,1,opt,name=interface,proto3" json:"interface,omitempty"`
	IpAddress            string   `protobuf:"bytes,2,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"`
	HwAddress            string   `protobuf:"bytes,3,opt,name=hw_address,json=hwAddress,proto3" json:"hw_address,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*LinuxStaticARPEntry) Descriptor

func (*LinuxStaticARPEntry) Descriptor() ([]byte, []int)

func (*LinuxStaticARPEntry) GetHwAddress

func (m *LinuxStaticARPEntry) GetHwAddress() string

func (*LinuxStaticARPEntry) GetInterface

func (m *LinuxStaticARPEntry) GetInterface() string

func (*LinuxStaticARPEntry) GetIpAddress

func (m *LinuxStaticARPEntry) GetIpAddress() string

func (*LinuxStaticARPEntry) ProtoMessage

func (*LinuxStaticARPEntry) ProtoMessage()

func (*LinuxStaticARPEntry) Reset

func (m *LinuxStaticARPEntry) Reset()

func (*LinuxStaticARPEntry) String

func (m *LinuxStaticARPEntry) String() string

func (*LinuxStaticARPEntry) XXX_DiscardUnknown

func (m *LinuxStaticARPEntry) XXX_DiscardUnknown()

func (*LinuxStaticARPEntry) XXX_Marshal

func (m *LinuxStaticARPEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LinuxStaticARPEntry) XXX_Merge

func (dst *LinuxStaticARPEntry) XXX_Merge(src proto.Message)

func (*LinuxStaticARPEntry) XXX_Size

func (m *LinuxStaticARPEntry) XXX_Size() int

func (*LinuxStaticARPEntry) XXX_Unmarshal

func (m *LinuxStaticARPEntry) XXX_Unmarshal(b []byte) error

type LinuxStaticRoute

type LinuxStaticRoute struct {
	OutgoingInterface    string                 `protobuf:"bytes,1,opt,name=outgoing_interface,json=outgoingInterface,proto3" json:"outgoing_interface,omitempty"`
	Scope                LinuxStaticRoute_Scope `protobuf:"varint,2,opt,name=scope,proto3,enum=l3.LinuxStaticRoute_Scope" json:"scope,omitempty"`
	DstNetwork           string                 `protobuf:"bytes,3,opt,name=dst_network,json=dstNetwork,proto3" json:"dst_network,omitempty"`
	GwAddr               string                 `protobuf:"bytes,4,opt,name=gw_addr,json=gwAddr,proto3" json:"gw_addr,omitempty"`
	Metric               uint32                 `protobuf:"varint,5,opt,name=metric,proto3" json:"metric,omitempty"`
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

func (*LinuxStaticRoute) Descriptor

func (*LinuxStaticRoute) Descriptor() ([]byte, []int)

func (*LinuxStaticRoute) GetDstNetwork

func (m *LinuxStaticRoute) GetDstNetwork() string

func (*LinuxStaticRoute) GetGwAddr

func (m *LinuxStaticRoute) GetGwAddr() string

func (*LinuxStaticRoute) GetMetric

func (m *LinuxStaticRoute) GetMetric() uint32

func (*LinuxStaticRoute) GetOutgoingInterface

func (m *LinuxStaticRoute) GetOutgoingInterface() string

func (*LinuxStaticRoute) GetScope

func (*LinuxStaticRoute) ProtoMessage

func (*LinuxStaticRoute) ProtoMessage()

func (*LinuxStaticRoute) Reset

func (m *LinuxStaticRoute) Reset()

func (*LinuxStaticRoute) String

func (m *LinuxStaticRoute) String() string

func (*LinuxStaticRoute) XXX_DiscardUnknown

func (m *LinuxStaticRoute) XXX_DiscardUnknown()

func (*LinuxStaticRoute) XXX_Marshal

func (m *LinuxStaticRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LinuxStaticRoute) XXX_Merge

func (dst *LinuxStaticRoute) XXX_Merge(src proto.Message)

func (*LinuxStaticRoute) XXX_Size

func (m *LinuxStaticRoute) XXX_Size() int

func (*LinuxStaticRoute) XXX_Unmarshal

func (m *LinuxStaticRoute) XXX_Unmarshal(b []byte) error

type LinuxStaticRoute_Scope

type LinuxStaticRoute_Scope int32
const (
	LinuxStaticRoute_UNDEFINED LinuxStaticRoute_Scope = 0
	LinuxStaticRoute_GLOBAL    LinuxStaticRoute_Scope = 1
	LinuxStaticRoute_SITE      LinuxStaticRoute_Scope = 2
	LinuxStaticRoute_LINK      LinuxStaticRoute_Scope = 3
	LinuxStaticRoute_HOST      LinuxStaticRoute_Scope = 4
)

func (LinuxStaticRoute_Scope) EnumDescriptor

func (LinuxStaticRoute_Scope) EnumDescriptor() ([]byte, []int)

func (LinuxStaticRoute_Scope) String

func (x LinuxStaticRoute_Scope) String() string

Jump to

Keyboard shortcuts

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