v1

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: Apache-2.0 Imports: 11 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
var File_api_ambassador_v1_tap_proto protoreflect.FileDescriptor

Functions

func ConduitFilter

func ConduitFilter(filter *Conduit, comparedTo *Conduit) bool

func RegisterTapServer

func RegisterTapServer(s *grpc.Server, srv TapServer)

func StreamFilter

func StreamFilter(filter *Stream, comparedTo *Stream) bool

func TrenchFilter

func TrenchFilter(filter *Trench, comparedTo *Trench) bool

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) Descriptor() ([]byte, []int)

Deprecated: Use Conduit.ProtoReflect.Descriptor instead.

func (*Conduit) Equals

func (c1 *Conduit) Equals(c2 *Conduit) bool

func (*Conduit) FullName

func (c *Conduit) FullName() string

func (*Conduit) GetName

func (x *Conduit) GetName() string

func (*Conduit) GetTrench

func (x *Conduit) GetTrench() *Trench

func (*Conduit) ProtoMessage

func (*Conduit) ProtoMessage()

func (*Conduit) ProtoReflect

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

func (*Conduit) Reset

func (x *Conduit) Reset()

func (*Conduit) String

func (x *Conduit) String() string

func (*Conduit) ToNSP

func (c *Conduit) ToNSP() *nspAPI.Conduit

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) Descriptor() ([]byte, []int)

Deprecated: Use Stream.ProtoReflect.Descriptor instead.

func (*Stream) Equals

func (s1 *Stream) Equals(s2 *Stream) bool

func (*Stream) FullName

func (s *Stream) FullName() string

func (*Stream) GetConduit

func (x *Stream) GetConduit() *Conduit

func (*Stream) GetName

func (x *Stream) GetName() string

func (*Stream) ProtoMessage

func (*Stream) ProtoMessage()

func (*Stream) ProtoReflect

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

func (*Stream) Reset

func (x *Stream) Reset()

func (*Stream) String

func (x *Stream) String() string

func (*Stream) ToNSP

func (s *Stream) ToNSP() *nspAPI.Stream

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) Enum

func (StreamStatus_Status) EnumDescriptor deprecated

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

Deprecated: Use StreamStatus_Status.Descriptor instead.

func (StreamStatus_Status) Number

func (StreamStatus_Status) String

func (x StreamStatus_Status) String() string

func (StreamStatus_Status) Type

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://godoc.org/google.golang.org/grpc#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
}

TapServer is the server API for Tap service.

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) Descriptor() ([]byte, []int)

Deprecated: Use Trench.ProtoReflect.Descriptor instead.

func (*Trench) Equals

func (t1 *Trench) Equals(t2 *Trench) bool

func (*Trench) FullName

func (t *Trench) FullName() string

func (*Trench) GetName

func (x *Trench) GetName() string

func (*Trench) ProtoMessage

func (*Trench) ProtoMessage()

func (*Trench) ProtoReflect

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

func (*Trench) Reset

func (x *Trench) Reset()

func (*Trench) String

func (x *Trench) String() string

func (*Trench) ToNSP

func (t *Trench) ToNSP() *nspAPI.Trench

type UnimplementedTapServer

type UnimplementedTapServer struct {
}

UnimplementedTapServer can be embedded to have forward compatible implementations.

func (*UnimplementedTapServer) Close

func (*UnimplementedTapServer) Open

func (*UnimplementedTapServer) Watch

Jump to

Keyboard shortcuts

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