networkservice

package
v1.13.0 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: 15 Imported by: 247

Documentation

Overview

Package networkservice provides the Network Service Mesh API: NetworkService{Server,Client}.{Request,Close}

Index

Constants

View Source
const (
	// DNSConfigShouldNotBeNil -
	DNSConfigShouldNotBeNil = "dnsConfig should not be nil"
	// DNSServerIpsShouldHaveRecords -
	DNSServerIpsShouldHaveRecords = "dnsConfig should have records"
)

Variables

View Source
var (
	State_name = map[int32]string{
		0: "UP",
		1: "DOWN",
		2: "REFRESH_REQUESTED",
		3: "RESELECT_REQUESTED",
	}
	State_value = map[string]int32{
		"UP":                 0,
		"DOWN":               1,
		"REFRESH_REQUESTED":  2,
		"RESELECT_REQUESTED": 3,
	}
)

Enum value maps for State.

View Source
var (
	ConnectionEventType_name = map[int32]string{
		0: "INITIAL_STATE_TRANSFER",
		1: "UPDATE",
		2: "DELETE",
	}
	ConnectionEventType_value = map[string]int32{
		"INITIAL_STATE_TRANSFER": 0,
		"UPDATE":                 1,
		"DELETE":                 2,
	}
)

Enum value maps for ConnectionEventType.

View Source
var (
	IpFamily_Family_name = map[int32]string{
		0: "IPV4",
		1: "IPV6",
	}
	IpFamily_Family_value = map[string]int32{
		"IPV4": 0,
		"IPV6": 1,
	}
)

Enum value maps for IpFamily_Family.

View Source
var File_connection_proto protoreflect.FileDescriptor
View Source
var File_connectioncontext_proto protoreflect.FileDescriptor
View Source
var File_networkservice_proto protoreflect.FileDescriptor

Functions

func AddMechanism

func AddMechanism(mtype string, validator func(*Mechanism) error)

AddMechanism adds a Mechanism

func FilterMapOnManagerScopeSelector

func FilterMapOnManagerScopeSelector(c map[string]*Connection, selector *MonitorScopeSelector) map[string]*Connection

FilterMapOnManagerScopeSelector - Filters out of map[string]*Connection Connections not matching the selector

func RegisterMonitorConnectionServer

func RegisterMonitorConnectionServer(s *grpc.Server, srv MonitorConnectionServer)

func RegisterNetworkServiceServer

func RegisterNetworkServiceServer(s *grpc.Server, srv NetworkServiceServer)

func ServiceNames

func ServiceNames(impl interface{}, existingServiceNames ...string) []string

ServiceNames - returns grpc ServiceNames implemented by impl

Types

type Connection

type Connection struct {
	Id                         string             `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	NetworkService             string             `protobuf:"bytes,2,opt,name=network_service,json=networkService,proto3" json:"network_service,omitempty"`
	Mechanism                  *Mechanism         `protobuf:"bytes,3,opt,name=mechanism,proto3" json:"mechanism,omitempty"`
	Context                    *ConnectionContext `protobuf:"bytes,4,opt,name=context,proto3" json:"context,omitempty"`
	Labels                     map[string]string  `` /* 153-byte string literal not displayed */
	Path                       *Path              `protobuf:"bytes,6,opt,name=path,proto3" json:"path,omitempty"`
	NetworkServiceEndpointName string             `` /* 143-byte string literal not displayed */
	Payload                    string             `protobuf:"bytes,8,opt,name=payload,proto3" json:"payload,omitempty"`
	State                      State              `protobuf:"varint,9,opt,name=state,proto3,enum=connection.State" json:"state,omitempty"`
	// contains filtered or unexported fields
}

func (*Connection) Clone

func (x *Connection) Clone() *Connection

Clone clones connection

func (*Connection) Descriptor deprecated

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

Deprecated: Use Connection.ProtoReflect.Descriptor instead.

func (*Connection) Equals

func (x *Connection) Equals(connection protoreflect.ProtoMessage) bool

Equals returns if connection equals given connection

func (*Connection) GetContext

func (x *Connection) GetContext() *ConnectionContext

func (*Connection) GetCurrentPathSegment

func (x *Connection) GetCurrentPathSegment() *PathSegment

GetCurrentPathSegment - Get the current path segment of the connection

func (*Connection) GetDestinationNetworkServiceManagerName

func (x *Connection) GetDestinationNetworkServiceManagerName() string

GetDestinationNetworkServiceManagerName - return destination network service manager name

func (*Connection) GetId

func (x *Connection) GetId() string

func (*Connection) GetLabels

func (x *Connection) GetLabels() map[string]string

func (*Connection) GetMechanism

func (x *Connection) GetMechanism() *Mechanism

func (*Connection) GetNetworkService

func (x *Connection) GetNetworkService() string

func (*Connection) GetNetworkServiceEndpointName

func (x *Connection) GetNetworkServiceEndpointName() string

func (*Connection) GetNextPathSegment

func (x *Connection) GetNextPathSegment() *PathSegment

GetNextPathSegment - Get the next path segment of the connection

func (*Connection) GetPath

func (x *Connection) GetPath() *Path

func (*Connection) GetPayload

func (x *Connection) GetPayload() string

func (*Connection) GetPrevPathSegment

func (x *Connection) GetPrevPathSegment() *PathSegment

GetPrevPathSegment - Get the previous path segment of the connection

func (*Connection) GetSourceNetworkServiceManagerName

func (x *Connection) GetSourceNetworkServiceManagerName() string

GetSourceNetworkServiceManagerName - return source network service manager name

func (*Connection) GetState

func (x *Connection) GetState() State

func (*Connection) IsComplete

func (x *Connection) IsComplete() error

IsComplete checks if connection is complete valid

func (*Connection) IsRemote

func (x *Connection) IsRemote() bool

IsRemote returns if connection is remote

func (*Connection) IsValid

func (x *Connection) IsValid() error

IsValid checks if connection is minimally valid

func (*Connection) MatchesMonitorScopeSelector

func (x *Connection) MatchesMonitorScopeSelector(selector *MonitorScopeSelector) bool

MatchesMonitorScopeSelector - Returns true if the connection matches the selector

func (*Connection) ProtoMessage

func (*Connection) ProtoMessage()

func (*Connection) ProtoReflect

func (x *Connection) ProtoReflect() protoreflect.Message

func (*Connection) Reset

func (x *Connection) Reset()

func (*Connection) String

func (x *Connection) String() string

func (*Connection) UpdateContext

func (x *Connection) UpdateContext(context *ConnectionContext) error

UpdateContext checks and tries to set connection context

type ConnectionContext

type ConnectionContext struct {
	IpContext       *IPContext        `protobuf:"bytes,1,opt,name=ip_context,json=ipContext,proto3" json:"ip_context,omitempty"`    // IP related context
	DnsContext      *DNSContext       `protobuf:"bytes,2,opt,name=dns_context,json=dnsContext,proto3" json:"dns_context,omitempty"` // DNS related context
	EthernetContext *EthernetContext  `protobuf:"bytes,3,opt,name=ethernet_context,json=ethernetContext,proto3" json:"ethernet_context,omitempty"`
	ExtraContext    map[string]string `` // a k,v map for transfering arbitrary information from an NSE to an NSC or dataplane
	/* 185-byte string literal not displayed */
	MTU uint32 `protobuf:"varint,5,opt,name=MTU,proto3" json:"MTU,omitempty"`
	// contains filtered or unexported fields
}

func (*ConnectionContext) Descriptor deprecated

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

Deprecated: Use ConnectionContext.ProtoReflect.Descriptor instead.

func (*ConnectionContext) GetDnsContext

func (x *ConnectionContext) GetDnsContext() *DNSContext

func (*ConnectionContext) GetEthernetContext

func (x *ConnectionContext) GetEthernetContext() *EthernetContext

func (*ConnectionContext) GetExtraContext

func (x *ConnectionContext) GetExtraContext() map[string]string

func (*ConnectionContext) GetIpContext

func (x *ConnectionContext) GetIpContext() *IPContext

func (*ConnectionContext) GetMTU

func (x *ConnectionContext) GetMTU() uint32

func (*ConnectionContext) IsEthernetContextEmtpy

func (x *ConnectionContext) IsEthernetContextEmtpy() bool

IsEthernetContextEmtpy returns true if ethernet config is empty

func (*ConnectionContext) IsValid

func (x *ConnectionContext) IsValid() error

IsValid - checks ConnectionContext validation

func (*ConnectionContext) MeetsRequirements

func (x *ConnectionContext) MeetsRequirements(original *ConnectionContext) error

MeetsRequirements - checks required context parameters have bin set

func (*ConnectionContext) ProtoMessage

func (*ConnectionContext) ProtoMessage()

func (*ConnectionContext) ProtoReflect

func (x *ConnectionContext) ProtoReflect() protoreflect.Message

func (*ConnectionContext) Reset

func (x *ConnectionContext) Reset()

func (*ConnectionContext) String

func (x *ConnectionContext) String() string

type ConnectionEvent

type ConnectionEvent struct {
	Type        ConnectionEventType    `protobuf:"varint,1,opt,name=type,proto3,enum=connection.ConnectionEventType" json:"type,omitempty"`
	Connections map[string]*Connection `` /* 163-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ConnectionEvent) Clone

func (x *ConnectionEvent) Clone() *ConnectionEvent

Clone clones ConnectionEvents

func (*ConnectionEvent) Descriptor deprecated

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

Deprecated: Use ConnectionEvent.ProtoReflect.Descriptor instead.

func (*ConnectionEvent) GetConnections

func (x *ConnectionEvent) GetConnections() map[string]*Connection

func (*ConnectionEvent) GetType

func (x *ConnectionEvent) GetType() ConnectionEventType

func (*ConnectionEvent) ProtoMessage

func (*ConnectionEvent) ProtoMessage()

func (*ConnectionEvent) ProtoReflect

func (x *ConnectionEvent) ProtoReflect() protoreflect.Message

func (*ConnectionEvent) Reset

func (x *ConnectionEvent) Reset()

func (*ConnectionEvent) String

func (x *ConnectionEvent) String() string

type ConnectionEventType

type ConnectionEventType int32
const (
	ConnectionEventType_INITIAL_STATE_TRANSFER ConnectionEventType = 0
	ConnectionEventType_UPDATE                 ConnectionEventType = 1
	ConnectionEventType_DELETE                 ConnectionEventType = 2
)

func (ConnectionEventType) Descriptor

func (ConnectionEventType) Enum

func (ConnectionEventType) EnumDescriptor deprecated

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

Deprecated: Use ConnectionEventType.Descriptor instead.

func (ConnectionEventType) Number

func (ConnectionEventType) String

func (x ConnectionEventType) String() string

func (ConnectionEventType) Type

type DNSConfig

type DNSConfig struct {

	// ips of DNS Servers for this DNSConfig.  Any given IP may be IPv4 or IPv6
	DnsServerIps []string `protobuf:"bytes,1,rep,name=dns_server_ips,json=dnsServerIps,proto3" json:"dns_server_ips,omitempty"`
	// domains for which this DNSConfig provides resolution.  If empty, all domains.
	SearchDomains []string `protobuf:"bytes,2,rep,name=search_domains,json=searchDomains,proto3" json:"search_domains,omitempty"`
	// contains filtered or unexported fields
}

func (*DNSConfig) Descriptor deprecated

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

Deprecated: Use DNSConfig.ProtoReflect.Descriptor instead.

func (*DNSConfig) GetDnsServerIps

func (x *DNSConfig) GetDnsServerIps() []string

func (*DNSConfig) GetSearchDomains

func (x *DNSConfig) GetSearchDomains() []string

func (*DNSConfig) ProtoMessage

func (*DNSConfig) ProtoMessage()

func (*DNSConfig) ProtoReflect

func (x *DNSConfig) ProtoReflect() protoreflect.Message

func (*DNSConfig) Reset

func (x *DNSConfig) Reset()

func (*DNSConfig) String

func (x *DNSConfig) String() string

func (*DNSConfig) Validate

func (c *DNSConfig) Validate() error

Validate - checks DNSConfig and returns error if DNSConfig is not valid

type DNSContext

type DNSContext struct {
	Configs []*DNSConfig `protobuf:"bytes,1,rep,name=configs,proto3" json:"configs,omitempty"`
	// contains filtered or unexported fields
}

func (*DNSContext) Descriptor deprecated

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

Deprecated: Use DNSContext.ProtoReflect.Descriptor instead.

func (*DNSContext) GetConfigs

func (x *DNSContext) GetConfigs() []*DNSConfig

func (*DNSContext) ProtoMessage

func (*DNSContext) ProtoMessage()

func (*DNSContext) ProtoReflect

func (x *DNSContext) ProtoReflect() protoreflect.Message

func (*DNSContext) Reset

func (x *DNSContext) Reset()

func (*DNSContext) String

func (x *DNSContext) String() string

type EthernetContext

type EthernetContext struct {
	SrcMac  string `protobuf:"bytes,1,opt,name=src_mac,json=srcMac,proto3" json:"src_mac,omitempty"`
	DstMac  string `protobuf:"bytes,2,opt,name=dst_mac,json=dstMac,proto3" json:"dst_mac,omitempty"`
	VlanTag int32  `protobuf:"varint,3,opt,name=vlan_tag,json=vlanTag,proto3" json:"vlan_tag,omitempty"`
	// contains filtered or unexported fields
}

func (*EthernetContext) Descriptor deprecated

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

Deprecated: Use EthernetContext.ProtoReflect.Descriptor instead.

func (*EthernetContext) GetDstMac

func (x *EthernetContext) GetDstMac() string

func (*EthernetContext) GetSrcMac

func (x *EthernetContext) GetSrcMac() string

func (*EthernetContext) GetVlanTag

func (x *EthernetContext) GetVlanTag() int32

func (*EthernetContext) ProtoMessage

func (*EthernetContext) ProtoMessage()

func (*EthernetContext) ProtoReflect

func (x *EthernetContext) ProtoReflect() protoreflect.Message

func (*EthernetContext) Reset

func (x *EthernetContext) Reset()

func (*EthernetContext) String

func (x *EthernetContext) String() string

type ExtraPrefixRequest

type ExtraPrefixRequest struct {
	AddrFamily      *IpFamily `protobuf:"bytes,1,opt,name=addr_family,json=addrFamily,proto3" json:"addr_family,omitempty"`
	PrefixLen       uint32    `protobuf:"varint,2,opt,name=prefix_len,json=prefixLen,proto3" json:"prefix_len,omitempty"`
	RequiredNumber  uint32    `protobuf:"varint,3,opt,name=required_number,json=requiredNumber,proto3" json:"required_number,omitempty"`
	RequestedNumber uint32    `protobuf:"varint,4,opt,name=requested_number,json=requestedNumber,proto3" json:"requested_number,omitempty"`
	// contains filtered or unexported fields
}

func (*ExtraPrefixRequest) Descriptor deprecated

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

Deprecated: Use ExtraPrefixRequest.ProtoReflect.Descriptor instead.

func (*ExtraPrefixRequest) GetAddrFamily

func (x *ExtraPrefixRequest) GetAddrFamily() *IpFamily

func (*ExtraPrefixRequest) GetPrefixLen

func (x *ExtraPrefixRequest) GetPrefixLen() uint32

func (*ExtraPrefixRequest) GetRequestedNumber

func (x *ExtraPrefixRequest) GetRequestedNumber() uint32

func (*ExtraPrefixRequest) GetRequiredNumber

func (x *ExtraPrefixRequest) GetRequiredNumber() uint32

func (*ExtraPrefixRequest) IsValid

func (c *ExtraPrefixRequest) IsValid() error

IsValid - checks ExtraPrefixRequest validation

func (*ExtraPrefixRequest) ProtoMessage

func (*ExtraPrefixRequest) ProtoMessage()

func (*ExtraPrefixRequest) ProtoReflect

func (x *ExtraPrefixRequest) ProtoReflect() protoreflect.Message

func (*ExtraPrefixRequest) Reset

func (x *ExtraPrefixRequest) Reset()

func (*ExtraPrefixRequest) String

func (x *ExtraPrefixRequest) String() string

type IPContext

type IPContext struct {
	SrcIpAddrs         []string              `protobuf:"bytes,1,rep,name=src_ip_addrs,json=srcIpAddrs,proto3" json:"src_ip_addrs,omitempty"`                         // source ip address + prefix in format <address>/<prefix>
	DstIpAddrs         []string              `protobuf:"bytes,2,rep,name=dst_ip_addrs,json=dstIpAddrs,proto3" json:"dst_ip_addrs,omitempty"`                         // destination ip address + prefix in format <address>/<prefix>
	SrcIpRequired      bool                  `protobuf:"varint,3,opt,name=src_ip_required,json=srcIpRequired,proto3" json:"src_ip_required,omitempty"`               // if specified src_ip is required from NSE.
	DstIpRequired      bool                  `protobuf:"varint,4,opt,name=dst_ip_required,json=dstIpRequired,proto3" json:"dst_ip_required,omitempty"`               // if specified dst_ip is required from NSE
	SrcRoutes          []*Route              `protobuf:"bytes,5,rep,name=src_routes,json=srcRoutes,proto3" json:"src_routes,omitempty"`                              // a list of routes via src_ip_addr as gateway
	DstRoutes          []*Route              `protobuf:"bytes,6,rep,name=dst_routes,json=dstRoutes,proto3" json:"dst_routes,omitempty"`                              // a list of routes via dst_ip_addr as gateway
	ExcludedPrefixes   []string              `protobuf:"bytes,7,rep,name=excluded_prefixes,json=excludedPrefixes,proto3" json:"excluded_prefixes,omitempty"`         // a list of excluded passed to NSE
	IpNeighbors        []*IpNeighbor         `protobuf:"bytes,8,rep,name=ip_neighbors,json=ipNeighbors,proto3" json:"ip_neighbors,omitempty"`                        // A lists of ARP table neighbours addresses
	ExtraPrefixRequest []*ExtraPrefixRequest `protobuf:"bytes,9,rep,name=extra_prefix_request,json=extraPrefixRequest,proto3" json:"extra_prefix_request,omitempty"` // A request for NSE to provide extra prefixes
	ExtraPrefixes      []string              `protobuf:"bytes,10,rep,name=extra_prefixes,json=extraPrefixes,proto3" json:"extra_prefixes,omitempty"`                 // A list of extra prefixes requested
	Policies           []*PolicyRoute        `protobuf:"bytes,11,rep,name=policies,proto3" json:"policies,omitempty"`                                                // A list of route policies
	// contains filtered or unexported fields
}

func (*IPContext) Descriptor deprecated

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

Deprecated: Use IPContext.ProtoReflect.Descriptor instead.

func (*IPContext) GetDstIPNets

func (i *IPContext) GetDstIPNets() []*net.IPNet

GetDstIPNets - GetDstIpAddrs() converted to *net.IPNet or nil if empty or cannot be parsed

func (*IPContext) GetDstIPRoutes

func (i *IPContext) GetDstIPRoutes() (routes []*Route)

GetDstIPRoutes - returns routes for any DstIPs that are not contained in the prefixes of at least one SrcIP

func (*IPContext) GetDstIpAddrs

func (x *IPContext) GetDstIpAddrs() []string

func (*IPContext) GetDstIpRequired

func (x *IPContext) GetDstIpRequired() bool

func (*IPContext) GetDstRoutes

func (x *IPContext) GetDstRoutes() []*Route

func (*IPContext) GetDstRoutesWithExplicitNextHop

func (i *IPContext) GetDstRoutesWithExplicitNextHop() (routes []*Route)

GetDstRoutesWithExplicitNextHop - returns routes with the Route.NextHop explicitly set to the first IP address of the same address family (IPv4 or IPv6) from SrcIPAddrs if and only if Route.NextHop was initially nil and the Route.NextHop is not in DstIPAddrs

func (*IPContext) GetExcludedPrefixes

func (x *IPContext) GetExcludedPrefixes() []string

func (*IPContext) GetExcludedPrefixesIPNet

func (i *IPContext) GetExcludedPrefixesIPNet() []*net.IPNet

GetExcludedPrefixesIPNet - GetExcludedPrefixes() converted to []*net.IPNet prefixes that are empty or cannot be parsed are omitted

func (*IPContext) GetExtraPrefixRequest

func (x *IPContext) GetExtraPrefixRequest() []*ExtraPrefixRequest

func (*IPContext) GetExtraPrefixes

func (x *IPContext) GetExtraPrefixes() []string

func (*IPContext) GetGetExtraPrefixesIPNet

func (i *IPContext) GetGetExtraPrefixesIPNet() []*net.IPNet

GetGetExtraPrefixesIPNet - GetExtraPrefixes() converted to []*net.IPNet prefixes that are empty or cannot be parsed are omitted

func (*IPContext) GetIpNeighbors

func (x *IPContext) GetIpNeighbors() []*IpNeighbor

func (*IPContext) GetPolicies added in v1.2.0

func (x *IPContext) GetPolicies() []*PolicyRoute

func (*IPContext) GetSrcIPNets

func (i *IPContext) GetSrcIPNets() []*net.IPNet

GetSrcIPNets - GetSrcIpAddrs() converted to *net.IPNet or nil if empty or cannot be parsed

func (*IPContext) GetSrcIPRoutes

func (i *IPContext) GetSrcIPRoutes() (routes []*Route)

GetSrcIPRoutes - returns routes for any SrcIPs that are not contained in the prefixes of at least one DstIP

func (*IPContext) GetSrcIpAddrs

func (x *IPContext) GetSrcIpAddrs() []string

func (*IPContext) GetSrcIpRequired

func (x *IPContext) GetSrcIpRequired() bool

func (*IPContext) GetSrcRoutes

func (x *IPContext) GetSrcRoutes() []*Route

func (*IPContext) GetSrcRoutesWithExplicitNextHop

func (i *IPContext) GetSrcRoutesWithExplicitNextHop() (routes []*Route)

GetSrcRoutesWithExplicitNextHop - returns routes with the Route.NextHop explicitly set to the first IP address of the same address family (IPv4 or IPv6) from DstIPAddrs if and only if Route.NextHop was initially nil

func (*IPContext) ProtoMessage

func (*IPContext) ProtoMessage()

func (*IPContext) ProtoReflect

func (x *IPContext) ProtoReflect() protoreflect.Message

func (*IPContext) Reset

func (x *IPContext) Reset()

func (*IPContext) String

func (x *IPContext) String() string

type IpFamily

type IpFamily struct {
	Family IpFamily_Family `protobuf:"varint,1,opt,name=family,proto3,enum=connectioncontext.IpFamily_Family" json:"family,omitempty"`
	// contains filtered or unexported fields
}

func (*IpFamily) Descriptor deprecated

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

Deprecated: Use IpFamily.ProtoReflect.Descriptor instead.

func (*IpFamily) GetFamily

func (x *IpFamily) GetFamily() IpFamily_Family

func (*IpFamily) ProtoMessage

func (*IpFamily) ProtoMessage()

func (*IpFamily) ProtoReflect

func (x *IpFamily) ProtoReflect() protoreflect.Message

func (*IpFamily) Reset

func (x *IpFamily) Reset()

func (*IpFamily) String

func (x *IpFamily) String() string

type IpFamily_Family

type IpFamily_Family int32
const (
	IpFamily_IPV4 IpFamily_Family = 0
	IpFamily_IPV6 IpFamily_Family = 1
)

func (IpFamily_Family) Descriptor

func (IpFamily_Family) Enum

func (x IpFamily_Family) Enum() *IpFamily_Family

func (IpFamily_Family) EnumDescriptor deprecated

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

Deprecated: Use IpFamily_Family.Descriptor instead.

func (IpFamily_Family) Number

func (IpFamily_Family) String

func (x IpFamily_Family) String() string

func (IpFamily_Family) Type

type IpNeighbor

type IpNeighbor struct {
	Ip              string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
	HardwareAddress string `protobuf:"bytes,2,opt,name=hardware_address,json=hardwareAddress,proto3" json:"hardware_address,omitempty"`
	// contains filtered or unexported fields
}

func (*IpNeighbor) Descriptor deprecated

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

Deprecated: Use IpNeighbor.ProtoReflect.Descriptor instead.

func (*IpNeighbor) GetHardwareAddress

func (x *IpNeighbor) GetHardwareAddress() string

func (*IpNeighbor) GetIP

func (n *IpNeighbor) GetIP() net.IP

GetIP - GetIp() - converted to *net.IP or nil if empty or cannot be parsed

func (*IpNeighbor) GetIp

func (x *IpNeighbor) GetIp() string

func (*IpNeighbor) ProtoMessage

func (*IpNeighbor) ProtoMessage()

func (*IpNeighbor) ProtoReflect

func (x *IpNeighbor) ProtoReflect() protoreflect.Message

func (*IpNeighbor) Reset

func (x *IpNeighbor) Reset()

func (*IpNeighbor) String

func (x *IpNeighbor) String() string

type Mechanism

type Mechanism struct {
	Cls        string            `protobuf:"bytes,1,opt,name=cls,proto3" json:"cls,omitempty"`
	Type       string            `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	Parameters map[string]string `` /* 161-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Mechanism) Clone

func (x *Mechanism) Clone() *Mechanism

Clone clones mechanism

func (*Mechanism) Descriptor deprecated

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

Deprecated: Use Mechanism.ProtoReflect.Descriptor instead.

func (*Mechanism) Equals

func (x *Mechanism) Equals(mechanism protoreflect.ProtoMessage) bool

Equals returns if mechanism equals given mechanism

func (*Mechanism) GetCls

func (x *Mechanism) GetCls() string

func (*Mechanism) GetParameters

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

func (*Mechanism) GetType

func (x *Mechanism) GetType() string

func (*Mechanism) IsValid

func (x *Mechanism) IsValid() error

IsValid - is the Mechanism Valid?

func (*Mechanism) ProtoMessage

func (*Mechanism) ProtoMessage()

func (*Mechanism) ProtoReflect

func (x *Mechanism) ProtoReflect() protoreflect.Message

func (*Mechanism) Reset

func (x *Mechanism) Reset()

func (*Mechanism) String

func (x *Mechanism) String() string

type MonitorConnectionClient

type MonitorConnectionClient interface {
	MonitorConnections(ctx context.Context, in *MonitorScopeSelector, opts ...grpc.CallOption) (MonitorConnection_MonitorConnectionsClient, error)
}

MonitorConnectionClient is the client API for MonitorConnection service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type MonitorConnectionServer

type MonitorConnectionServer interface {
	MonitorConnections(*MonitorScopeSelector, MonitorConnection_MonitorConnectionsServer) error
}

MonitorConnectionServer is the server API for MonitorConnection service.

type MonitorConnection_MonitorConnectionsClient

type MonitorConnection_MonitorConnectionsClient interface {
	Recv() (*ConnectionEvent, error)
	grpc.ClientStream
}

type MonitorConnection_MonitorConnectionsServer

type MonitorConnection_MonitorConnectionsServer interface {
	Send(*ConnectionEvent) error
	grpc.ServerStream
}

type MonitorScopeSelector

type MonitorScopeSelector struct {
	PathSegments []*PathSegment `protobuf:"bytes,1,rep,name=path_segments,json=pathSegments,proto3" json:"path_segments,omitempty"`
	// contains filtered or unexported fields
}

func (*MonitorScopeSelector) Descriptor deprecated

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

Deprecated: Use MonitorScopeSelector.ProtoReflect.Descriptor instead.

func (*MonitorScopeSelector) GetPathSegments

func (x *MonitorScopeSelector) GetPathSegments() []*PathSegment

func (*MonitorScopeSelector) ProtoMessage

func (*MonitorScopeSelector) ProtoMessage()

func (*MonitorScopeSelector) ProtoReflect

func (x *MonitorScopeSelector) ProtoReflect() protoreflect.Message

func (*MonitorScopeSelector) Reset

func (x *MonitorScopeSelector) Reset()

func (*MonitorScopeSelector) String

func (x *MonitorScopeSelector) String() string

type NetworkServiceClient

type NetworkServiceClient interface {
	Request(ctx context.Context, in *NetworkServiceRequest, opts ...grpc.CallOption) (*Connection, error)
	Close(ctx context.Context, in *Connection, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

NetworkServiceClient is the client API for NetworkService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type NetworkServiceRequest

type NetworkServiceRequest struct {
	Connection           *Connection  `protobuf:"bytes,1,opt,name=connection,proto3" json:"connection,omitempty"`
	MechanismPreferences []*Mechanism `protobuf:"bytes,2,rep,name=mechanism_preferences,json=mechanismPreferences,proto3" json:"mechanism_preferences,omitempty"`
	// contains filtered or unexported fields
}

func (*NetworkServiceRequest) Clone

Clone clones request

func (*NetworkServiceRequest) Descriptor deprecated

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

Deprecated: Use NetworkServiceRequest.ProtoReflect.Descriptor instead.

func (*NetworkServiceRequest) GetConnection

func (x *NetworkServiceRequest) GetConnection() *Connection

func (*NetworkServiceRequest) GetMechanismPreferences

func (x *NetworkServiceRequest) GetMechanismPreferences() []*Mechanism

func (*NetworkServiceRequest) GetRequestConnection

func (x *NetworkServiceRequest) GetRequestConnection() *Connection

GetRequestConnection returns request connection

func (*NetworkServiceRequest) GetRequestMechanismPreferences

func (x *NetworkServiceRequest) GetRequestMechanismPreferences() []*Mechanism

GetRequestMechanismPreferences returns request mechanism preferences

func (*NetworkServiceRequest) IsValid

func (x *NetworkServiceRequest) IsValid() error

IsValid returns if request is valid

func (*NetworkServiceRequest) ProtoMessage

func (*NetworkServiceRequest) ProtoMessage()

func (*NetworkServiceRequest) ProtoReflect

func (x *NetworkServiceRequest) ProtoReflect() protoreflect.Message

func (*NetworkServiceRequest) Reset

func (x *NetworkServiceRequest) Reset()

func (*NetworkServiceRequest) SetRequestConnection

func (x *NetworkServiceRequest) SetRequestConnection(conn *Connection) *NetworkServiceRequest

SetRequestConnection sets request connection

func (*NetworkServiceRequest) SetRequestMechanismPreferences

func (x *NetworkServiceRequest) SetRequestMechanismPreferences(mechanismPreferences []*Mechanism)

SetRequestMechanismPreferences sets request mechanism preferences

func (*NetworkServiceRequest) String

func (x *NetworkServiceRequest) String() string

type NetworkServiceServer

type NetworkServiceServer interface {
	Request(context.Context, *NetworkServiceRequest) (*Connection, error)
	Close(context.Context, *Connection) (*emptypb.Empty, error)
}

NetworkServiceServer is the server API for NetworkService service.

type Path

type Path struct {
	Index        uint32         `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	PathSegments []*PathSegment `protobuf:"bytes,2,rep,name=path_segments,json=pathSegments,proto3" json:"path_segments,omitempty"`
	// contains filtered or unexported fields
}

func (*Path) Clone

func (x *Path) Clone() *Path

Clone clones

func (*Path) Descriptor deprecated

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

Deprecated: Use Path.ProtoReflect.Descriptor instead.

func (*Path) GetIndex

func (x *Path) GetIndex() uint32

func (*Path) GetPathSegments

func (x *Path) GetPathSegments() []*PathSegment

func (*Path) IsValid

func (x *Path) IsValid() error

IsValid returns true if Path p is Valid

func (*Path) ProtoMessage

func (*Path) ProtoMessage()

func (*Path) ProtoReflect

func (x *Path) ProtoReflect() protoreflect.Message

func (*Path) Reset

func (x *Path) Reset()

func (*Path) String

func (x *Path) String() string

type PathSegment

type PathSegment struct {
	Name    string                 `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Id      string                 `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	Token   string                 `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
	Expires *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=expires,proto3" json:"expires,omitempty"`
	Metrics map[string]string      `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*PathSegment) Clone

func (x *PathSegment) Clone() *PathSegment

Clone clones PathSegment

func (*PathSegment) Descriptor deprecated

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

Deprecated: Use PathSegment.ProtoReflect.Descriptor instead.

func (*PathSegment) Equal

Equal returns true if PathSegment m == p

func (*PathSegment) GetExpires

func (x *PathSegment) GetExpires() *timestamppb.Timestamp

func (*PathSegment) GetId

func (x *PathSegment) GetId() string

func (*PathSegment) GetMetrics

func (x *PathSegment) GetMetrics() map[string]string

func (*PathSegment) GetName

func (x *PathSegment) GetName() string

func (*PathSegment) GetToken

func (x *PathSegment) GetToken() string

func (*PathSegment) ProtoMessage

func (*PathSegment) ProtoMessage()

func (*PathSegment) ProtoReflect

func (x *PathSegment) ProtoReflect() protoreflect.Message

func (*PathSegment) Reset

func (x *PathSegment) Reset()

func (*PathSegment) String

func (x *PathSegment) String() string

type PolicyRoute added in v1.2.0

type PolicyRoute struct {
	From    string   `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`                      // source ip address. This must be an IP that NSM has placed on the nsm interface or empty (in which case it applies to all IPs NSM puts on the interface
	Proto   string   `protobuf:"bytes,2,opt,name=proto,proto3" json:"proto,omitempty"`                    // ip protocol number (https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)
	DstPort string   `protobuf:"bytes,3,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` // destination port (range in format start-end)
	SrcPort string   `protobuf:"bytes,4,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` // source port (range in format start-end)
	Routes  []*Route `protobuf:"bytes,5,rep,name=routes,proto3" json:"routes,omitempty"`                  // list of destination based routes, if empty becomes a default route, but only for things matching both from and proto
	// contains filtered or unexported fields
}

func (*PolicyRoute) Descriptor deprecated added in v1.2.0

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

Deprecated: Use PolicyRoute.ProtoReflect.Descriptor instead.

func (*PolicyRoute) GetDstPort added in v1.3.0

func (x *PolicyRoute) GetDstPort() string

func (*PolicyRoute) GetFrom added in v1.2.0

func (x *PolicyRoute) GetFrom() string

func (*PolicyRoute) GetProto added in v1.2.0

func (x *PolicyRoute) GetProto() string

func (*PolicyRoute) GetRoutes added in v1.2.0

func (x *PolicyRoute) GetRoutes() []*Route

func (*PolicyRoute) GetSrcPort added in v1.3.0

func (x *PolicyRoute) GetSrcPort() string

func (*PolicyRoute) ProtoMessage added in v1.2.0

func (*PolicyRoute) ProtoMessage()

func (*PolicyRoute) ProtoReflect added in v1.2.0

func (x *PolicyRoute) ProtoReflect() protoreflect.Message

func (*PolicyRoute) Reset added in v1.2.0

func (x *PolicyRoute) Reset()

func (*PolicyRoute) String added in v1.2.0

func (x *PolicyRoute) String() string

type PortRange added in v1.3.0

type PortRange struct {
	Start uint16
	End   uint16
}

PortRange represents source port / destination port range.

func ParsePortRange added in v1.3.0

func ParsePortRange(portRange string) (*PortRange, error)

ParsePortRange - parses port range in format "start-end" or "port".

type Route

type Route struct {
	Prefix  string `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` // destination address + prefix in format <address>/<prefix>
	NextHop string `protobuf:"bytes,2,opt,name=nextHop,proto3" json:"nextHop,omitempty"`
	// contains filtered or unexported fields
}

func (*Route) Clone

func (r *Route) Clone() *Route

Clone clones route

func (*Route) Descriptor deprecated

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

Deprecated: Use Route.ProtoReflect.Descriptor instead.

func (*Route) GetNextHop

func (x *Route) GetNextHop() string

func (*Route) GetNextHopIP

func (r *Route) GetNextHopIP() net.IP

GetNextHopIP - GetNextHop() converted to net.IP or nil if empty or cannot be parsed

func (*Route) GetPrefix

func (x *Route) GetPrefix() string

func (*Route) GetPrefixIPNet

func (r *Route) GetPrefixIPNet() *net.IPNet

GetPrefixIPNet - GetPrefix() converted to *net.IPNet or nil if empty or cannot be parsed

func (*Route) ProtoMessage

func (*Route) ProtoMessage()

func (*Route) ProtoReflect

func (x *Route) ProtoReflect() protoreflect.Message

func (*Route) Reset

func (x *Route) Reset()

func (*Route) String

func (x *Route) String() string

type State

type State int32
const (
	State_UP                 State = 0
	State_DOWN               State = 1
	State_REFRESH_REQUESTED  State = 2
	State_RESELECT_REQUESTED State = 3
)

func (State) Descriptor

func (State) Descriptor() protoreflect.EnumDescriptor

func (State) Enum

func (x State) Enum() *State

func (State) EnumDescriptor deprecated

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

Deprecated: Use State.Descriptor instead.

func (State) Number

func (x State) Number() protoreflect.EnumNumber

func (State) String

func (x State) String() string

func (State) Type

func (State) Type() protoreflect.EnumType

type UnimplementedMonitorConnectionServer

type UnimplementedMonitorConnectionServer struct {
}

UnimplementedMonitorConnectionServer can be embedded to have forward compatible implementations.

func (*UnimplementedMonitorConnectionServer) MonitorConnections

type UnimplementedNetworkServiceServer

type UnimplementedNetworkServiceServer struct {
}

UnimplementedNetworkServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedNetworkServiceServer) Close

func (*UnimplementedNetworkServiceServer) Request

Directories

Path Synopsis
labels
sriov
Package sriov holds constants which are used for SR-IOV related functionality
Package sriov holds constants which are used for SR-IOV related functionality
mechanisms
cls
Package cls provides simple constants to distinguish Mechanism.Cls es
Package cls provides simple constants to distinguish Mechanism.Cls es
common
Package common constants for Mechanism parameters shared between multiple Mechanism types
Package common constants for Mechanism parameters shared between multiple Mechanism types
ipsec
Package ipsec - constants and helper methods for IPSec remote mechanism
Package ipsec - constants and helper methods for IPSec remote mechanism
kernel
Package kernel - describe kernel mechanism
Package kernel - describe kernel mechanism
memif
Package memif provides helper methods for the Mechanism memif
Package memif provides helper methods for the Mechanism memif
noop
Package noop provides a Mechanism for noop mechanism connection
Package noop provides a Mechanism for noop mechanism connection
srv6
Package srv6 - parameters keys of SRV6 remote mechanism
Package srv6 - parameters keys of SRV6 remote mechanism
vfio
Package vfio provides a Mechanism for using vfio devices.
Package vfio provides a Mechanism for using vfio devices.
vlan
Package vlan provides helper methods for the Mechanism vlan
Package vlan provides helper methods for the Mechanism vlan
vxlan
Package vxlan provides helper methods for the Mechanism vxlan
Package vxlan provides helper methods for the Mechanism vxlan
wireguard
Package wireguard - constants and helper methods for Wireguard remote mechanism
Package wireguard - constants and helper methods for Wireguard remote mechanism
Package payload provides constants for NetworkService.Payload
Package payload provides constants for NetworkService.Payload

Jump to

Keyboard shortcuts

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