Documentation ¶
Index ¶
- Constants
- Variables
- func ConduitFilter(filter *Conduit, comparedTo *Conduit) bool
- func RegisterTapServer(s grpc.ServiceRegistrar, srv TapServer)
- func StreamFilter(filter *Stream, comparedTo *Stream) bool
- func TrenchFilter(filter *Trench, comparedTo *Trench) bool
- type Conduit
- func (*Conduit) Descriptor() ([]byte, []int)deprecated
- func (c1 *Conduit) Equals(c2 *Conduit) bool
- func (c *Conduit) FullName() string
- func (x *Conduit) GetName() string
- func (x *Conduit) GetTrench() *Trench
- func (*Conduit) ProtoMessage()
- func (x *Conduit) ProtoReflect() protoreflect.Message
- func (x *Conduit) Reset()
- func (x *Conduit) String() string
- func (c *Conduit) ToNSP() *nspAPI.Conduit
- type Stream
- func (*Stream) Descriptor() ([]byte, []int)deprecated
- func (s1 *Stream) Equals(s2 *Stream) bool
- func (s *Stream) FullName() string
- func (x *Stream) GetConduit() *Conduit
- func (x *Stream) GetName() string
- func (*Stream) ProtoMessage()
- func (x *Stream) ProtoReflect() protoreflect.Message
- func (x *Stream) Reset()
- func (x *Stream) String() string
- func (s *Stream) ToNSP() *nspAPI.Stream
- type StreamResponse
- type StreamStatus
- func (*StreamStatus) Descriptor() ([]byte, []int)deprecated
- func (x *StreamStatus) GetStatus() StreamStatus_Status
- func (x *StreamStatus) GetStream() *Stream
- func (*StreamStatus) ProtoMessage()
- func (x *StreamStatus) ProtoReflect() protoreflect.Message
- func (x *StreamStatus) Reset()
- func (x *StreamStatus) String() string
- type StreamStatus_Status
- func (StreamStatus_Status) Descriptor() protoreflect.EnumDescriptor
- func (x StreamStatus_Status) Enum() *StreamStatus_Status
- func (StreamStatus_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x StreamStatus_Status) Number() protoreflect.EnumNumber
- func (x StreamStatus_Status) String() string
- func (StreamStatus_Status) Type() protoreflect.EnumType
- type TapClient
- type TapServer
- type Tap_WatchClient
- type Tap_WatchServer
- type Trench
- func (*Trench) Descriptor() ([]byte, []int)deprecated
- func (t1 *Trench) Equals(t2 *Trench) bool
- func (t *Trench) FullName() string
- func (x *Trench) GetName() string
- func (*Trench) ProtoMessage()
- func (x *Trench) ProtoReflect() protoreflect.Message
- func (x *Trench) Reset()
- func (x *Trench) String() string
- func (t *Trench) ToNSP() *nspAPI.Trench
- type UnimplementedTapServer
- type UnsafeTapServer
Constants ¶
const ( Tap_Open_FullMethodName = "/ambassador.v1.Tap/Open" Tap_Close_FullMethodName = "/ambassador.v1.Tap/Close" Tap_Watch_FullMethodName = "/ambassador.v1.Tap/Watch" )
Variables ¶
var ( StreamStatus_Status_name = map[int32]string{ 0: "OPEN", 1: "PENDING", 2: "UNAVAILABLE", 3: "UNDEFINED", } StreamStatus_Status_value = map[string]int32{ "OPEN": 0, "PENDING": 1, "UNAVAILABLE": 2, "UNDEFINED": 3, } )
Enum value maps for StreamStatus_Status.
var File_api_ambassador_v1_tap_proto protoreflect.FileDescriptor
var Tap_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ambassador.v1.Tap", HandlerType: (*TapServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Open", Handler: _Tap_Open_Handler, }, { MethodName: "Close", Handler: _Tap_Close_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Watch", Handler: _Tap_Watch_Handler, ServerStreams: true, }, }, Metadata: "api/ambassador/v1/tap.proto", }
Tap_ServiceDesc is the grpc.ServiceDesc for Tap service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func ConduitFilter ¶
func RegisterTapServer ¶
func RegisterTapServer(s grpc.ServiceRegistrar, srv TapServer)
func StreamFilter ¶
func TrenchFilter ¶
Types ¶
type Conduit ¶
type Conduit struct { // Name of the conduit Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Trench the conduit belongs to Trench *Trench `protobuf:"bytes,2,opt,name=trench,proto3" json:"trench,omitempty"` // contains filtered or unexported fields }
func (*Conduit) Descriptor
deprecated
func (*Conduit) ProtoMessage ¶
func (*Conduit) ProtoMessage()
func (*Conduit) ProtoReflect ¶
func (x *Conduit) ProtoReflect() protoreflect.Message
type Stream ¶
type Stream struct { // Name of the stream Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Conduit the stream belongs to Conduit *Conduit `protobuf:"bytes,2,opt,name=conduit,proto3" json:"conduit,omitempty"` // contains filtered or unexported fields }
func (*Stream) Descriptor
deprecated
func (*Stream) GetConduit ¶
func (*Stream) ProtoMessage ¶
func (*Stream) ProtoMessage()
func (*Stream) ProtoReflect ¶
func (x *Stream) ProtoReflect() protoreflect.Message
type StreamResponse ¶
type StreamResponse struct { StreamStatus []*StreamStatus `protobuf:"bytes,1,rep,name=streamStatus,proto3" json:"streamStatus,omitempty"` // contains filtered or unexported fields }
func (*StreamResponse) Descriptor
deprecated
func (*StreamResponse) Descriptor() ([]byte, []int)
Deprecated: Use StreamResponse.ProtoReflect.Descriptor instead.
func (*StreamResponse) GetStreamStatus ¶
func (x *StreamResponse) GetStreamStatus() []*StreamStatus
func (*StreamResponse) ProtoMessage ¶
func (*StreamResponse) ProtoMessage()
func (*StreamResponse) ProtoReflect ¶
func (x *StreamResponse) ProtoReflect() protoreflect.Message
func (*StreamResponse) Reset ¶
func (x *StreamResponse) Reset()
func (*StreamResponse) String ¶
func (x *StreamResponse) String() string
type StreamStatus ¶
type StreamStatus struct { Status StreamStatus_Status `protobuf:"varint,1,opt,name=status,proto3,enum=ambassador.v1.StreamStatus_Status" json:"status,omitempty"` Stream *Stream `protobuf:"bytes,2,opt,name=stream,proto3" json:"stream,omitempty"` // contains filtered or unexported fields }
func (*StreamStatus) Descriptor
deprecated
func (*StreamStatus) Descriptor() ([]byte, []int)
Deprecated: Use StreamStatus.ProtoReflect.Descriptor instead.
func (*StreamStatus) GetStatus ¶
func (x *StreamStatus) GetStatus() StreamStatus_Status
func (*StreamStatus) GetStream ¶
func (x *StreamStatus) GetStream() *Stream
func (*StreamStatus) ProtoMessage ¶
func (*StreamStatus) ProtoMessage()
func (*StreamStatus) ProtoReflect ¶
func (x *StreamStatus) ProtoReflect() protoreflect.Message
func (*StreamStatus) Reset ¶
func (x *StreamStatus) Reset()
func (*StreamStatus) String ¶
func (x *StreamStatus) String() string
type StreamStatus_Status ¶
type StreamStatus_Status int32
const ( // Stream is open and ready to carry traffic StreamStatus_OPEN StreamStatus_Status = 0 // The stream is requested open, but a stable status is not known yet due to a lengthy transition StreamStatus_PENDING StreamStatus_Status = 1 // Stream is not reachable (NSP unreachable, under upgrade, failed etc.) StreamStatus_UNAVAILABLE StreamStatus_Status = 2 // The stream is requested open, but it is not defined on the Meridio side StreamStatus_UNDEFINED StreamStatus_Status = 3 )
func (StreamStatus_Status) Descriptor ¶
func (StreamStatus_Status) Descriptor() protoreflect.EnumDescriptor
func (StreamStatus_Status) Enum ¶
func (x StreamStatus_Status) Enum() *StreamStatus_Status
func (StreamStatus_Status) EnumDescriptor
deprecated
func (StreamStatus_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use StreamStatus_Status.Descriptor instead.
func (StreamStatus_Status) Number ¶
func (x StreamStatus_Status) Number() protoreflect.EnumNumber
func (StreamStatus_Status) String ¶
func (x StreamStatus_Status) String() string
func (StreamStatus_Status) Type ¶
func (StreamStatus_Status) Type() protoreflect.EnumType
type TapClient ¶
type TapClient interface { // Open a stream registers the target to the NSP, // If the trench or conduit is not connected to the target, then it will // be connected automatically before registering the target to the NSP. // If any property is not defined (empty name, nil trench/conduit...), // or, if another trench is already connected, an error will be returned. Open(ctx context.Context, in *Stream, opts ...grpc.CallOption) (*emptypb.Empty, error) // Close a stream unregisters the target from the NSP, disconnects // the target from the conduit if no more stream is connected to it, // and disconnects from the trench if no more conduit is connected to it. // If any property is not defined (empty name, nil trench/conduit...), // an error will be returned. Close(ctx context.Context, in *Stream, opts ...grpc.CallOption) (*emptypb.Empty, error) // WatchStream will return a list of stream status containing // the same properties as the one in parameter (nil properties // will be ignored). On any event (any stream created/deleted/updated) // the list will be sent again. Watch(ctx context.Context, in *Stream, opts ...grpc.CallOption) (Tap_WatchClient, error) }
TapClient is the client API for Tap service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewTapClient ¶
func NewTapClient(cc grpc.ClientConnInterface) TapClient
type TapServer ¶
type TapServer interface { // Open a stream registers the target to the NSP, // If the trench or conduit is not connected to the target, then it will // be connected automatically before registering the target to the NSP. // If any property is not defined (empty name, nil trench/conduit...), // or, if another trench is already connected, an error will be returned. Open(context.Context, *Stream) (*emptypb.Empty, error) // Close a stream unregisters the target from the NSP, disconnects // the target from the conduit if no more stream is connected to it, // and disconnects from the trench if no more conduit is connected to it. // If any property is not defined (empty name, nil trench/conduit...), // an error will be returned. Close(context.Context, *Stream) (*emptypb.Empty, error) // WatchStream will return a list of stream status containing // the same properties as the one in parameter (nil properties // will be ignored). On any event (any stream created/deleted/updated) // the list will be sent again. Watch(*Stream, Tap_WatchServer) error // contains filtered or unexported methods }
TapServer is the server API for Tap service. All implementations must embed UnimplementedTapServer for forward compatibility
type Tap_WatchClient ¶
type Tap_WatchClient interface { Recv() (*StreamResponse, error) grpc.ClientStream }
type Tap_WatchServer ¶
type Tap_WatchServer interface { Send(*StreamResponse) error grpc.ServerStream }
type Trench ¶
type Trench struct { // Name of the trench Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*Trench) Descriptor
deprecated
func (*Trench) ProtoMessage ¶
func (*Trench) ProtoMessage()
func (*Trench) ProtoReflect ¶
func (x *Trench) ProtoReflect() protoreflect.Message
type UnimplementedTapServer ¶
type UnimplementedTapServer struct { }
UnimplementedTapServer must be embedded to have forward compatible implementations.
func (UnimplementedTapServer) Watch ¶
func (UnimplementedTapServer) Watch(*Stream, Tap_WatchServer) error
type UnsafeTapServer ¶ added in v0.8.0
type UnsafeTapServer interface {
// contains filtered or unexported methods
}
UnsafeTapServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TapServer will result in compilation errors.