Documentation ¶
Overview ¶
Package connection contains the API and helpers for the Network Service Mesh Connection
Index ¶
- Constants
- Variables
- func AddMechanism(mtype string, validator func(*Mechanism) error)
- func FilterMapOnManagerScopeSelector(c map[string]*Connection, selector *MonitorScopeSelector) map[string]*Connection
- func RegisterMonitorConnectionServer(s *grpc.Server, srv MonitorConnectionServer)
- type Connection
- func (c *Connection) Clone() *Connection
- func (*Connection) Descriptor() ([]byte, []int)
- func (c *Connection) Equals(connection *Connection) bool
- func (m *Connection) GetContext() *connectioncontext.ConnectionContext
- func (c *Connection) GetDestinationNetworkServiceManagerName() string
- func (m *Connection) GetId() string
- func (m *Connection) GetLabels() map[string]string
- func (m *Connection) GetMechanism() *Mechanism
- func (m *Connection) GetNetworkService() string
- func (m *Connection) GetNetworkServiceEndpointName() string
- func (m *Connection) GetPath() *Path
- func (c *Connection) GetSourceNetworkServiceManagerName() string
- func (m *Connection) GetState() State
- func (c *Connection) IsComplete() error
- func (c *Connection) IsRemote() bool
- func (c *Connection) IsValid() error
- func (c *Connection) MatchesMonitorScopeSelector(selector *MonitorScopeSelector) bool
- func (*Connection) ProtoMessage()
- func (m *Connection) Reset()
- func (m *Connection) String() string
- func (c *Connection) UpdateContext(context *connectioncontext.ConnectionContext) error
- func (m *Connection) XXX_DiscardUnknown()
- func (m *Connection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Connection) XXX_Merge(src proto.Message)
- func (m *Connection) XXX_Size() int
- func (m *Connection) XXX_Unmarshal(b []byte) error
- type ConnectionEvent
- func (*ConnectionEvent) Descriptor() ([]byte, []int)
- func (m *ConnectionEvent) GetConnections() map[string]*Connection
- func (m *ConnectionEvent) GetType() ConnectionEventType
- func (*ConnectionEvent) ProtoMessage()
- func (m *ConnectionEvent) Reset()
- func (m *ConnectionEvent) String() string
- func (m *ConnectionEvent) XXX_DiscardUnknown()
- func (m *ConnectionEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ConnectionEvent) XXX_Merge(src proto.Message)
- func (m *ConnectionEvent) XXX_Size() int
- func (m *ConnectionEvent) XXX_Unmarshal(b []byte) error
- type ConnectionEventType
- type Mechanism
- func (m *Mechanism) Clone() *Mechanism
- func (*Mechanism) Descriptor() ([]byte, []int)
- func (m *Mechanism) Equals(mechanism *Mechanism) bool
- func (m *Mechanism) GetCls() string
- func (m *Mechanism) GetParameters() map[string]string
- func (m *Mechanism) GetType() string
- func (m *Mechanism) IsValid() error
- func (*Mechanism) ProtoMessage()
- func (m *Mechanism) Reset()
- func (m *Mechanism) String() string
- func (m *Mechanism) XXX_DiscardUnknown()
- func (m *Mechanism) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Mechanism) XXX_Merge(src proto.Message)
- func (m *Mechanism) XXX_Size() int
- func (m *Mechanism) XXX_Unmarshal(b []byte) error
- type MonitorConnectionClient
- type MonitorConnectionServer
- type MonitorConnection_MonitorConnectionsClient
- type MonitorConnection_MonitorConnectionsServer
- type MonitorScopeSelector
- func (*MonitorScopeSelector) Descriptor() ([]byte, []int)
- func (m *MonitorScopeSelector) GetPathSegments() []*PathSegment
- func (*MonitorScopeSelector) ProtoMessage()
- func (m *MonitorScopeSelector) Reset()
- func (m *MonitorScopeSelector) String() string
- func (m *MonitorScopeSelector) XXX_DiscardUnknown()
- func (m *MonitorScopeSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MonitorScopeSelector) XXX_Merge(src proto.Message)
- func (m *MonitorScopeSelector) XXX_Size() int
- func (m *MonitorScopeSelector) XXX_Unmarshal(b []byte) error
- type Path
- func (m *Path) Clone() *Path
- func (*Path) Descriptor() ([]byte, []int)
- func (m *Path) GetIndex() uint32
- func (m *Path) GetPathSegments() []*PathSegment
- func (m *Path) IsValid() error
- func (*Path) ProtoMessage()
- func (m *Path) Reset()
- func (m *Path) String() string
- func (m *Path) XXX_DiscardUnknown()
- func (m *Path) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Path) XXX_Merge(src proto.Message)
- func (m *Path) XXX_Size() int
- func (m *Path) XXX_Unmarshal(b []byte) error
- type PathSegment
- func (*PathSegment) Descriptor() ([]byte, []int)
- func (m *PathSegment) GetExpires() *timestamp.Timestamp
- func (m *PathSegment) GetId() string
- func (m *PathSegment) GetName() string
- func (m *PathSegment) GetToken() string
- func (*PathSegment) ProtoMessage()
- func (m *PathSegment) Reset()
- func (m *PathSegment) String() string
- func (m *PathSegment) XXX_DiscardUnknown()
- func (m *PathSegment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PathSegment) XXX_Merge(src proto.Message)
- func (m *PathSegment) XXX_Size() int
- func (m *PathSegment) XXX_Unmarshal(b []byte) error
- type State
- type UnimplementedMonitorConnectionServer
Constants ¶
const ( // Workspace - NSM workspace location mechanism property key Workspace = "workspace" // PodNameKey - pod name a container is running in PodNameKey = "podName" // NamespaceKey - namespace a container is running in NamespaceKey = "namespace" )
Variables ¶
var ConnectionEventType_name = map[int32]string{
0: "INITIAL_STATE_TRANSFER",
1: "UPDATE",
2: "DELETE",
}
var ConnectionEventType_value = map[string]int32{
"INITIAL_STATE_TRANSFER": 0,
"UPDATE": 1,
"DELETE": 2,
}
var State_name = map[int32]string{
0: "UP",
1: "DOWN",
}
var State_value = map[string]int32{
"UP": 0,
"DOWN": 1,
}
Functions ¶
func AddMechanism ¶
AddMechanism adds a Mechanism
func FilterMapOnManagerScopeSelector ¶
func FilterMapOnManagerScopeSelector(c map[string]*Connection, selector *MonitorScopeSelector) map[string]*Connection
func RegisterMonitorConnectionServer ¶
func RegisterMonitorConnectionServer(s *grpc.Server, srv MonitorConnectionServer)
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.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 */ State State `protobuf:"varint,9,opt,name=state,proto3,enum=connection.State" json:"state,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Connection) Descriptor ¶
func (*Connection) Descriptor() ([]byte, []int)
func (*Connection) Equals ¶
func (c *Connection) Equals(connection *Connection) bool
Equals returns if connection equals given connection
func (*Connection) GetContext ¶
func (m *Connection) GetContext() *connectioncontext.ConnectionContext
func (*Connection) GetDestinationNetworkServiceManagerName ¶
func (c *Connection) GetDestinationNetworkServiceManagerName() string
GetDestinationNetworkServiceManagerName - return destination network service manager name
func (*Connection) GetId ¶
func (m *Connection) GetId() string
func (*Connection) GetLabels ¶
func (m *Connection) GetLabels() map[string]string
func (*Connection) GetMechanism ¶
func (m *Connection) GetMechanism() *Mechanism
func (*Connection) GetNetworkService ¶
func (m *Connection) GetNetworkService() string
func (*Connection) GetNetworkServiceEndpointName ¶
func (m *Connection) GetNetworkServiceEndpointName() string
func (*Connection) GetPath ¶
func (m *Connection) GetPath() *Path
func (*Connection) GetSourceNetworkServiceManagerName ¶
func (c *Connection) GetSourceNetworkServiceManagerName() string
GetSourceNetworkServiceManagerName - return source network service manager name
func (*Connection) GetState ¶
func (m *Connection) GetState() State
func (*Connection) IsComplete ¶
func (c *Connection) IsComplete() error
IsComplete checks if connection is complete valid
func (*Connection) IsRemote ¶
func (c *Connection) IsRemote() bool
IsRemote returns if connection is remote
func (*Connection) IsValid ¶
func (c *Connection) IsValid() error
IsValid checks if connection is minimally valid
func (*Connection) MatchesMonitorScopeSelector ¶
func (c *Connection) MatchesMonitorScopeSelector(selector *MonitorScopeSelector) bool
func (*Connection) ProtoMessage ¶
func (*Connection) ProtoMessage()
func (*Connection) Reset ¶
func (m *Connection) Reset()
func (*Connection) String ¶
func (m *Connection) String() string
func (*Connection) UpdateContext ¶
func (c *Connection) UpdateContext(context *connectioncontext.ConnectionContext) error
UpdateContext checks and tries to set connection context
func (*Connection) XXX_DiscardUnknown ¶
func (m *Connection) XXX_DiscardUnknown()
func (*Connection) XXX_Marshal ¶
func (m *Connection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Connection) XXX_Merge ¶
func (m *Connection) XXX_Merge(src proto.Message)
func (*Connection) XXX_Size ¶
func (m *Connection) XXX_Size() int
func (*Connection) XXX_Unmarshal ¶
func (m *Connection) XXX_Unmarshal(b []byte) error
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 */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ConnectionEvent) Descriptor ¶
func (*ConnectionEvent) Descriptor() ([]byte, []int)
func (*ConnectionEvent) GetConnections ¶
func (m *ConnectionEvent) GetConnections() map[string]*Connection
func (*ConnectionEvent) GetType ¶
func (m *ConnectionEvent) GetType() ConnectionEventType
func (*ConnectionEvent) ProtoMessage ¶
func (*ConnectionEvent) ProtoMessage()
func (*ConnectionEvent) Reset ¶
func (m *ConnectionEvent) Reset()
func (*ConnectionEvent) String ¶
func (m *ConnectionEvent) String() string
func (*ConnectionEvent) XXX_DiscardUnknown ¶
func (m *ConnectionEvent) XXX_DiscardUnknown()
func (*ConnectionEvent) XXX_Marshal ¶
func (m *ConnectionEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ConnectionEvent) XXX_Merge ¶
func (m *ConnectionEvent) XXX_Merge(src proto.Message)
func (*ConnectionEvent) XXX_Size ¶
func (m *ConnectionEvent) XXX_Size() int
func (*ConnectionEvent) XXX_Unmarshal ¶
func (m *ConnectionEvent) XXX_Unmarshal(b []byte) error
type ConnectionEventType ¶
type ConnectionEventType int32
const ( ConnectionEventType_INITIAL_STATE_TRANSFER ConnectionEventType = 0 ConnectionEventType_UPDATE ConnectionEventType = 1 ConnectionEventType_DELETE ConnectionEventType = 2 )
func (ConnectionEventType) EnumDescriptor ¶
func (ConnectionEventType) EnumDescriptor() ([]byte, []int)
func (ConnectionEventType) String ¶
func (x ConnectionEventType) 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 */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Mechanism) Descriptor ¶
func (*Mechanism) GetParameters ¶
func (*Mechanism) ProtoMessage ¶
func (*Mechanism) ProtoMessage()
func (*Mechanism) XXX_DiscardUnknown ¶
func (m *Mechanism) XXX_DiscardUnknown()
func (*Mechanism) XXX_Marshal ¶
func (*Mechanism) XXX_Unmarshal ¶
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*MonitorScopeSelector) Descriptor ¶
func (*MonitorScopeSelector) Descriptor() ([]byte, []int)
func (*MonitorScopeSelector) GetPathSegments ¶
func (m *MonitorScopeSelector) GetPathSegments() []*PathSegment
func (*MonitorScopeSelector) ProtoMessage ¶
func (*MonitorScopeSelector) ProtoMessage()
func (*MonitorScopeSelector) Reset ¶
func (m *MonitorScopeSelector) Reset()
func (*MonitorScopeSelector) String ¶
func (m *MonitorScopeSelector) String() string
func (*MonitorScopeSelector) XXX_DiscardUnknown ¶
func (m *MonitorScopeSelector) XXX_DiscardUnknown()
func (*MonitorScopeSelector) XXX_Marshal ¶
func (m *MonitorScopeSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MonitorScopeSelector) XXX_Merge ¶
func (m *MonitorScopeSelector) XXX_Merge(src proto.Message)
func (*MonitorScopeSelector) XXX_Size ¶
func (m *MonitorScopeSelector) XXX_Size() int
func (*MonitorScopeSelector) XXX_Unmarshal ¶
func (m *MonitorScopeSelector) XXX_Unmarshal(b []byte) error
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Path) Descriptor ¶
func (*Path) GetPathSegments ¶
func (m *Path) GetPathSegments() []*PathSegment
func (*Path) ProtoMessage ¶
func (*Path) ProtoMessage()
func (*Path) XXX_DiscardUnknown ¶
func (m *Path) XXX_DiscardUnknown()
func (*Path) XXX_Unmarshal ¶
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 *timestamp.Timestamp `protobuf:"bytes,4,opt,name=expires,proto3" json:"expires,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PathSegment) Descriptor ¶
func (*PathSegment) Descriptor() ([]byte, []int)
func (*PathSegment) GetExpires ¶
func (m *PathSegment) GetExpires() *timestamp.Timestamp
func (*PathSegment) GetId ¶
func (m *PathSegment) GetId() string
func (*PathSegment) GetName ¶
func (m *PathSegment) GetName() string
func (*PathSegment) GetToken ¶
func (m *PathSegment) GetToken() string
func (*PathSegment) ProtoMessage ¶
func (*PathSegment) ProtoMessage()
func (*PathSegment) Reset ¶
func (m *PathSegment) Reset()
func (*PathSegment) String ¶
func (m *PathSegment) String() string
func (*PathSegment) XXX_DiscardUnknown ¶
func (m *PathSegment) XXX_DiscardUnknown()
func (*PathSegment) XXX_Marshal ¶
func (m *PathSegment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PathSegment) XXX_Merge ¶
func (m *PathSegment) XXX_Merge(src proto.Message)
func (*PathSegment) XXX_Size ¶
func (m *PathSegment) XXX_Size() int
func (*PathSegment) XXX_Unmarshal ¶
func (m *PathSegment) XXX_Unmarshal(b []byte) error
type UnimplementedMonitorConnectionServer ¶
type UnimplementedMonitorConnectionServer struct { }
UnimplementedMonitorConnectionServer can be embedded to have forward compatible implementations.
func (*UnimplementedMonitorConnectionServer) MonitorConnections ¶
func (*UnimplementedMonitorConnectionServer) MonitorConnections(req *MonitorScopeSelector, srv MonitorConnection_MonitorConnectionsServer) error
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
mechanisms
|
|
kernel
Package kernel - describe kernel mechanism
|
Package kernel - describe kernel mechanism |
srv6
Package srv6 - parameters keys of SRV6 remote mechanism
|
Package srv6 - parameters keys of SRV6 remote mechanism |
wireguard
Package wireguard - constants and helper methods for Wireguard remote mechanism
|
Package wireguard - constants and helper methods for Wireguard remote mechanism |