Documentation ¶
Overview ¶
Package networkservice provides the Network Service Mesh API: NetworkService{Server,Client}.{Request,Close}
Index ¶
- Constants
- Variables
- func FilterMapOnManagerScopeSelector(c map[string]*Connection, selector *MonitorScopeSelector) map[string]*Connection
- func RegisterMonitorConnectionServer(s *grpc.Server, srv MonitorConnectionServer)
- func RegisterNetworkServiceServer(s *grpc.Server, srv NetworkServiceServer)
- func ServiceNames(impl interface{}, existingServiceNames ...string) []string
- type Connection
- func (x *Connection) Clone() *Connection
- func (*Connection) Descriptor() ([]byte, []int)deprecated
- func (x *Connection) Equals(connection protoreflect.ProtoMessage) bool
- func (x *Connection) GetContext() *ConnectionContext
- func (x *Connection) GetCurrentPathSegment() *PathSegment
- func (x *Connection) GetId() string
- func (x *Connection) GetLabels() map[string]string
- func (x *Connection) GetMechanism() *Mechanism
- func (x *Connection) GetNetworkService() string
- func (x *Connection) GetNetworkServiceEndpointName() string
- func (x *Connection) GetNextPathSegment() *PathSegment
- func (x *Connection) GetPath() *Path
- func (x *Connection) GetPayload() string
- func (x *Connection) GetPrevPathSegment() *PathSegment
- func (x *Connection) GetState() State
- func (x *Connection) MatchesMonitorScopeSelector(selector *MonitorScopeSelector) bool
- func (*Connection) ProtoMessage()
- func (x *Connection) ProtoReflect() protoreflect.Message
- func (x *Connection) Reset()
- func (x *Connection) String() string
- type ConnectionContext
- func (*ConnectionContext) Descriptor() ([]byte, []int)deprecated
- func (x *ConnectionContext) GetDnsContext() *DNSContext
- func (x *ConnectionContext) GetEthernetContext() *EthernetContext
- func (x *ConnectionContext) GetExtraContext() map[string]string
- func (x *ConnectionContext) GetIpContext() *IPContext
- func (x *ConnectionContext) GetMTU() uint32
- func (*ConnectionContext) ProtoMessage()
- func (x *ConnectionContext) ProtoReflect() protoreflect.Message
- func (x *ConnectionContext) Reset()
- func (x *ConnectionContext) String() string
- type ConnectionEvent
- func (x *ConnectionEvent) Clone() *ConnectionEvent
- func (*ConnectionEvent) Descriptor() ([]byte, []int)deprecated
- func (x *ConnectionEvent) GetConnections() map[string]*Connection
- func (x *ConnectionEvent) GetType() ConnectionEventType
- func (*ConnectionEvent) ProtoMessage()
- func (x *ConnectionEvent) ProtoReflect() protoreflect.Message
- func (x *ConnectionEvent) Reset()
- func (x *ConnectionEvent) String() string
- type ConnectionEventType
- func (ConnectionEventType) Descriptor() protoreflect.EnumDescriptor
- func (x ConnectionEventType) Enum() *ConnectionEventType
- func (ConnectionEventType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ConnectionEventType) Number() protoreflect.EnumNumber
- func (x ConnectionEventType) String() string
- func (ConnectionEventType) Type() protoreflect.EnumType
- type DNSConfig
- func (*DNSConfig) Descriptor() ([]byte, []int)deprecated
- func (x *DNSConfig) GetDnsServerIps() []string
- func (x *DNSConfig) GetSearchDomains() []string
- func (*DNSConfig) ProtoMessage()
- func (x *DNSConfig) ProtoReflect() protoreflect.Message
- func (x *DNSConfig) Reset()
- func (x *DNSConfig) String() string
- type DNSContext
- type EthernetContext
- func (*EthernetContext) Descriptor() ([]byte, []int)deprecated
- func (x *EthernetContext) GetDstMac() string
- func (x *EthernetContext) GetSrcMac() string
- func (x *EthernetContext) GetVlanTag() int32
- func (*EthernetContext) ProtoMessage()
- func (x *EthernetContext) ProtoReflect() protoreflect.Message
- func (x *EthernetContext) Reset()
- func (x *EthernetContext) String() string
- type ExtraPrefixRequest
- func (*ExtraPrefixRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ExtraPrefixRequest) GetAddrFamily() *IpFamily
- func (x *ExtraPrefixRequest) GetPrefixLen() uint32
- func (x *ExtraPrefixRequest) GetRequestedNumber() uint32
- func (x *ExtraPrefixRequest) GetRequiredNumber() uint32
- func (c *ExtraPrefixRequest) IsValid() error
- func (*ExtraPrefixRequest) ProtoMessage()
- func (x *ExtraPrefixRequest) ProtoReflect() protoreflect.Message
- func (x *ExtraPrefixRequest) Reset()
- func (x *ExtraPrefixRequest) String() string
- type IPContext
- func (*IPContext) Descriptor() ([]byte, []int)deprecated
- func (i *IPContext) GetDstIPNets() []*net.IPNet
- func (i *IPContext) GetDstIPRoutes() (routes []*Route)
- func (x *IPContext) GetDstIpAddrs() []string
- func (x *IPContext) GetDstIpRequired() bool
- func (x *IPContext) GetDstRoutes() []*Route
- func (i *IPContext) GetDstRoutesWithExplicitNextHop() (routes []*Route)
- func (x *IPContext) GetExcludedPrefixes() []string
- func (x *IPContext) GetExtraPrefixRequest() []*ExtraPrefixRequest
- func (x *IPContext) GetExtraPrefixes() []string
- func (x *IPContext) GetIpNeighbors() []*IpNeighbor
- func (x *IPContext) GetPolicies() []*PolicyRoute
- func (i *IPContext) GetSrcIPNets() []*net.IPNet
- func (i *IPContext) GetSrcIPRoutes() (routes []*Route)
- func (x *IPContext) GetSrcIpAddrs() []string
- func (x *IPContext) GetSrcIpRequired() bool
- func (x *IPContext) GetSrcRoutes() []*Route
- func (i *IPContext) GetSrcRoutesWithExplicitNextHop() (routes []*Route)
- func (*IPContext) ProtoMessage()
- func (x *IPContext) ProtoReflect() protoreflect.Message
- func (x *IPContext) Reset()
- func (x *IPContext) String() string
- type IpFamily
- type IpFamily_Family
- func (IpFamily_Family) Descriptor() protoreflect.EnumDescriptor
- func (x IpFamily_Family) Enum() *IpFamily_Family
- func (IpFamily_Family) EnumDescriptor() ([]byte, []int)deprecated
- func (x IpFamily_Family) Number() protoreflect.EnumNumber
- func (x IpFamily_Family) String() string
- func (IpFamily_Family) Type() protoreflect.EnumType
- type IpNeighbor
- type Mechanism
- func (x *Mechanism) Clone() *Mechanism
- func (*Mechanism) Descriptor() ([]byte, []int)deprecated
- func (x *Mechanism) Equals(mechanism protoreflect.ProtoMessage) bool
- func (x *Mechanism) GetCls() string
- func (x *Mechanism) GetParameters() map[string]string
- func (x *Mechanism) GetType() string
- func (*Mechanism) ProtoMessage()
- func (x *Mechanism) ProtoReflect() protoreflect.Message
- func (x *Mechanism) Reset()
- func (x *Mechanism) String() string
- type MonitorConnectionClient
- type MonitorConnectionServer
- type MonitorConnection_MonitorConnectionsClient
- type MonitorConnection_MonitorConnectionsServer
- type MonitorScopeSelector
- func (*MonitorScopeSelector) Descriptor() ([]byte, []int)deprecated
- func (x *MonitorScopeSelector) GetNetworkServices() []string
- func (x *MonitorScopeSelector) GetPathSegments() []*PathSegment
- func (*MonitorScopeSelector) ProtoMessage()
- func (x *MonitorScopeSelector) ProtoReflect() protoreflect.Message
- func (x *MonitorScopeSelector) Reset()
- func (x *MonitorScopeSelector) String() string
- type NetworkServiceClient
- type NetworkServiceRequest
- func (x *NetworkServiceRequest) Clone() *NetworkServiceRequest
- func (*NetworkServiceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *NetworkServiceRequest) GetConnection() *Connection
- func (x *NetworkServiceRequest) GetMechanismPreferences() []*Mechanism
- func (x *NetworkServiceRequest) GetRequestConnection() *Connection
- func (x *NetworkServiceRequest) GetRequestMechanismPreferences() []*Mechanism
- func (*NetworkServiceRequest) ProtoMessage()
- func (x *NetworkServiceRequest) ProtoReflect() protoreflect.Message
- func (x *NetworkServiceRequest) Reset()
- func (x *NetworkServiceRequest) String() string
- type NetworkServiceServer
- type Path
- type PathSegment
- func (x *PathSegment) Clone() *PathSegment
- func (*PathSegment) Descriptor() ([]byte, []int)deprecated
- func (x *PathSegment) Equal(p protoreflect.ProtoMessage) bool
- func (x *PathSegment) GetExpires() *timestamppb.Timestamp
- func (x *PathSegment) GetId() string
- func (x *PathSegment) GetMetrics() map[string]string
- func (x *PathSegment) GetName() string
- func (x *PathSegment) GetToken() string
- func (*PathSegment) ProtoMessage()
- func (x *PathSegment) ProtoReflect() protoreflect.Message
- func (x *PathSegment) Reset()
- func (x *PathSegment) String() string
- type PolicyRoute
- func (*PolicyRoute) Descriptor() ([]byte, []int)deprecated
- func (x *PolicyRoute) GetDstPort() string
- func (x *PolicyRoute) GetFrom() string
- func (x *PolicyRoute) GetProto() string
- func (x *PolicyRoute) GetRoutes() []*Route
- func (x *PolicyRoute) GetSrcPort() string
- func (*PolicyRoute) ProtoMessage()
- func (x *PolicyRoute) ProtoReflect() protoreflect.Message
- func (x *PolicyRoute) Reset()
- func (x *PolicyRoute) String() string
- type PortRange
- type Route
- func (r *Route) Clone() *Route
- func (*Route) Descriptor() ([]byte, []int)deprecated
- func (x *Route) GetNextHop() string
- func (r *Route) GetNextHopIP() net.IP
- func (x *Route) GetPrefix() string
- func (r *Route) GetPrefixIPNet() *net.IPNet
- func (*Route) ProtoMessage()
- func (x *Route) ProtoReflect() protoreflect.Message
- func (x *Route) Reset()
- func (x *Route) String() string
- type State
- type UnimplementedMonitorConnectionServer
- type UnimplementedNetworkServiceServer
Constants ¶
const ( // DNSConfigShouldNotBeNil - DNSConfigShouldNotBeNil = "dnsConfig should not be nil" // DNSServerIpsShouldHaveRecords - DNSServerIpsShouldHaveRecords = "dnsConfig should have records" )
Variables ¶
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.
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.
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.
var File_connection_proto protoreflect.FileDescriptor
var File_connectioncontext_proto protoreflect.FileDescriptor
var File_networkservice_proto protoreflect.FileDescriptor
Functions ¶
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 ¶
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) 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) 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) GetState ¶
func (x *Connection) GetState() State
func (*Connection) MatchesMonitorScopeSelector ¶
func (x *Connection) MatchesMonitorScopeSelector(selector *MonitorScopeSelector) bool
MatchesMonitorScopeSelector - Returns true of 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
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) 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 ( // INITIAL_STATE_TRANSFER - Monitor Connection Server immediately sends event // with this type to a client when the client makes MonitorConnections Request. // Event with this type contains all connections that Monitor Connection Server // currently has. ConnectionEventType_INITIAL_STATE_TRANSFER ConnectionEventType = 0 // UPDATE - Monitor Connection Server sends event with this type when the // connection changes. For exapmle, when the state of the connection has been changed. ConnectionEventType_UPDATE ConnectionEventType = 1 // DELETE - Monitor Connection Server sends event with this type when the connection // has been closed. ConnectionEventType_DELETE ConnectionEventType = 2 )
func (ConnectionEventType) Descriptor ¶
func (ConnectionEventType) Descriptor() protoreflect.EnumDescriptor
func (ConnectionEventType) Enum ¶
func (x ConnectionEventType) Enum() *ConnectionEventType
func (ConnectionEventType) EnumDescriptor
deprecated
func (ConnectionEventType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ConnectionEventType.Descriptor instead.
func (ConnectionEventType) Number ¶
func (x ConnectionEventType) Number() protoreflect.EnumNumber
func (ConnectionEventType) String ¶
func (x ConnectionEventType) String() string
func (ConnectionEventType) Type ¶
func (ConnectionEventType) Type() protoreflect.EnumType
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) GetDnsServerIps ¶
func (*DNSConfig) GetSearchDomains ¶
func (*DNSConfig) ProtoMessage ¶
func (*DNSConfig) ProtoMessage()
func (*DNSConfig) ProtoReflect ¶
func (x *DNSConfig) ProtoReflect() protoreflect.Message
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) GetDstIPNets ¶
GetDstIPNets - GetDstIpAddrs() converted to *net.IPNet or nil if empty or cannot be parsed
func (*IPContext) GetDstIPRoutes ¶
GetDstIPRoutes - returns routes for any DstIPs that are not contained in the prefixes of at least one SrcIP
func (*IPContext) GetDstIpAddrs ¶
func (*IPContext) GetDstIpRequired ¶
func (*IPContext) GetDstRoutes ¶
func (*IPContext) GetDstRoutesWithExplicitNextHop ¶
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 (*IPContext) GetExtraPrefixRequest ¶
func (x *IPContext) GetExtraPrefixRequest() []*ExtraPrefixRequest
func (*IPContext) GetExtraPrefixes ¶
func (*IPContext) GetIpNeighbors ¶
func (x *IPContext) GetIpNeighbors() []*IpNeighbor
func (*IPContext) GetPolicies ¶ added in v1.2.0
func (x *IPContext) GetPolicies() []*PolicyRoute
func (*IPContext) GetSrcIPNets ¶
GetSrcIPNets - GetSrcIpAddrs() converted to *net.IPNet or nil if empty or cannot be parsed
func (*IPContext) GetSrcIPRoutes ¶
GetSrcIPRoutes - returns routes for any SrcIPs that are not contained in the prefixes of at least one DstIP
func (*IPContext) GetSrcIpAddrs ¶
func (*IPContext) GetSrcIpRequired ¶
func (*IPContext) GetSrcRoutes ¶
func (*IPContext) GetSrcRoutesWithExplicitNextHop ¶
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
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) GetFamily ¶
func (x *IpFamily) GetFamily() IpFamily_Family
func (*IpFamily) ProtoMessage ¶
func (*IpFamily) ProtoMessage()
func (*IpFamily) ProtoReflect ¶
func (x *IpFamily) ProtoReflect() protoreflect.Message
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) Descriptor() protoreflect.EnumDescriptor
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 (x IpFamily_Family) Number() protoreflect.EnumNumber
func (IpFamily_Family) String ¶
func (x IpFamily_Family) String() string
func (IpFamily_Family) Type ¶
func (IpFamily_Family) Type() protoreflect.EnumType
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 (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) Descriptor
deprecated
func (*Mechanism) Equals ¶
func (x *Mechanism) Equals(mechanism protoreflect.ProtoMessage) bool
Equals returns if mechanism equals given mechanism
func (*Mechanism) GetParameters ¶
func (*Mechanism) ProtoMessage ¶
func (*Mechanism) ProtoMessage()
func (*Mechanism) ProtoReflect ¶
func (x *Mechanism) ProtoReflect() protoreflect.Message
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.
func NewMonitorConnectionClient ¶
func NewMonitorConnectionClient(cc grpc.ClientConnInterface) MonitorConnectionClient
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"` NetworkServices []string `protobuf:"bytes,2,rep,name=network_services,json=networkServices,proto3" json:"network_services,omitempty"` // contains filtered or unexported fields }
func (*MonitorScopeSelector) Descriptor
deprecated
func (*MonitorScopeSelector) Descriptor() ([]byte, []int)
Deprecated: Use MonitorScopeSelector.ProtoReflect.Descriptor instead.
func (*MonitorScopeSelector) GetNetworkServices ¶ added in v1.14.2
func (x *MonitorScopeSelector) GetNetworkServices() []string
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.
func NewNetworkServiceClient ¶
func NewNetworkServiceClient(cc grpc.ClientConnInterface) NetworkServiceClient
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 ¶
func (x *NetworkServiceRequest) Clone() *NetworkServiceRequest
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) ProtoMessage ¶
func (*NetworkServiceRequest) ProtoMessage()
func (*NetworkServiceRequest) ProtoReflect ¶
func (x *NetworkServiceRequest) ProtoReflect() protoreflect.Message
func (*NetworkServiceRequest) Reset ¶
func (x *NetworkServiceRequest) Reset()
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) Descriptor
deprecated
func (*Path) GetPathSegments ¶
func (x *Path) GetPathSegments() []*PathSegment
func (*Path) ProtoMessage ¶
func (*Path) ProtoMessage()
func (*Path) ProtoReflect ¶
func (x *Path) ProtoReflect() protoreflect.Message
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) Descriptor
deprecated
func (*PathSegment) Descriptor() ([]byte, []int)
Deprecated: Use PathSegment.ProtoReflect.Descriptor instead.
func (*PathSegment) Equal ¶
func (x *PathSegment) Equal(p protoreflect.ProtoMessage) bool
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
PortRange represents source port / destination port range.
func ParsePortRange ¶ added in v1.3.0
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) Descriptor
deprecated
func (*Route) GetNextHop ¶
func (*Route) GetNextHopIP ¶
GetNextHopIP - GetNextHop() converted to net.IP or nil if empty or cannot be parsed
func (*Route) GetPrefixIPNet ¶
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
type State ¶
type State int32
const ( // UP - Endpoint sets the connection state to UP when it successfully // establishes the connection. State_UP State = 0 // DOWN - Monitor Connection Server sets the connection state to DOWN // when the connection is broken (for example, one of the NSM components is dead). // Monitor Connection Server also sets the DOWN state for the deleted connections. State_DOWN State = 1 // REFRESH_REQUESTED - This state indicates the server's connection parameters have // been changed and the client should make a refresh to get them. State_REFRESH_REQUESTED State = 2 // RESELECT_REQUESTED - This state indicates the client wants to use another endpoint // for the connection. The client can set this state when it loses the connection. State_RESELECT_REQUESTED State = 3 )
func (State) Descriptor ¶
func (State) Descriptor() protoreflect.EnumDescriptor
func (State) EnumDescriptor
deprecated
func (State) Number ¶
func (x State) Number() protoreflect.EnumNumber
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 ¶
func (*UnimplementedMonitorConnectionServer) MonitorConnections(*MonitorScopeSelector, MonitorConnection_MonitorConnectionsServer) error
type UnimplementedNetworkServiceServer ¶
type UnimplementedNetworkServiceServer struct { }
UnimplementedNetworkServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedNetworkServiceServer) Close ¶
func (*UnimplementedNetworkServiceServer) Close(context.Context, *Connection) (*emptypb.Empty, error)
func (*UnimplementedNetworkServiceServer) Request ¶
func (*UnimplementedNetworkServiceServer) Request(context.Context, *NetworkServiceRequest) (*Connection, error)
Source Files ¶
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 |