multiplexerv1

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WatchGRPCServerResponse_Event_name = map[int32]string{
		0: "EVENT_UNSPECIFIED",
		1: "EVENT_CONNECTED",
		2: "EVENT_DISCONNECTED",
	}
	WatchGRPCServerResponse_Event_value = map[string]int32{
		"EVENT_UNSPECIFIED":  0,
		"EVENT_CONNECTED":    1,
		"EVENT_DISCONNECTED": 2,
	}
)

Enum value maps for WatchGRPCServerResponse_Event.

View Source
var DiscoveryService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "grpc.multiplexer.v1.DiscoveryService",
	HandlerType: (*DiscoveryServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListGRPCServer",
			Handler:    _DiscoveryService_ListGRPCServer_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "WatchGRPCServer",
			Handler:       _DiscoveryService_WatchGRPCServer_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "grpc/multiplexer/v1/discovery.proto",
}

DiscoveryService_ServiceDesc is the grpc.ServiceDesc for DiscoveryService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_grpc_multiplexer_v1_discovery_proto protoreflect.FileDescriptor

Functions

func RegisterDiscoveryServiceServer

func RegisterDiscoveryServiceServer(s grpc.ServiceRegistrar, srv DiscoveryServiceServer)

Types

type DiscoveryServiceClient

type DiscoveryServiceClient interface {
	// ListGRPCServer lists all gRPC server that are available through the multiplexer client connection.
	ListGRPCServer(ctx context.Context, in *ListGRPCServerRequest, opts ...grpc.CallOption) (*ListGRPCServerResponse, error)
	// ListGRPCServer watches event of connection & disconnection of gRPC server accessible through multiplexer client.
	WatchGRPCServer(ctx context.Context, in *WatchGRPCServerRequest, opts ...grpc.CallOption) (DiscoveryService_WatchGRPCServerClient, error)
}

DiscoveryServiceClient is the client API for DiscoveryService 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.

type DiscoveryServiceServer

type DiscoveryServiceServer interface {
	// ListGRPCServer lists all gRPC server that are available through the multiplexer client connection.
	ListGRPCServer(context.Context, *ListGRPCServerRequest) (*ListGRPCServerResponse, error)
	// ListGRPCServer watches event of connection & disconnection of gRPC server accessible through multiplexer client.
	WatchGRPCServer(*WatchGRPCServerRequest, DiscoveryService_WatchGRPCServerServer) error
	// contains filtered or unexported methods
}

DiscoveryServiceServer is the server API for DiscoveryService service. All implementations must embed UnimplementedDiscoveryServiceServer for forward compatibility

type DiscoveryService_WatchGRPCServerClient

type DiscoveryService_WatchGRPCServerClient interface {
	Recv() (*WatchGRPCServerResponse, error)
	grpc.ClientStream
}

type DiscoveryService_WatchGRPCServerServer

type DiscoveryService_WatchGRPCServerServer interface {
	Send(*WatchGRPCServerResponse) error
	grpc.ServerStream
}

type ListGRPCServerRequest

type ListGRPCServerRequest struct {
	// contains filtered or unexported fields
}

ListGRPCServerRequest is the request message for ListGRPCServer method.

func (*ListGRPCServerRequest) Descriptor deprecated

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

Deprecated: Use ListGRPCServerRequest.ProtoReflect.Descriptor instead.

func (*ListGRPCServerRequest) ProtoMessage

func (*ListGRPCServerRequest) ProtoMessage()

func (*ListGRPCServerRequest) ProtoReflect

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

func (*ListGRPCServerRequest) Reset

func (x *ListGRPCServerRequest) Reset()

func (*ListGRPCServerRequest) String

func (x *ListGRPCServerRequest) String() string

type ListGRPCServerResponse

type ListGRPCServerResponse struct {

	// The list of gRPC server client ID (represented by their multiplexer clients).
	Servers []string `protobuf:"bytes,1,rep,name=servers,proto3" json:"servers,omitempty"`
	// contains filtered or unexported fields
}

ListGRPCServerResponse is the response message for ListGRPCServer method.

func (*ListGRPCServerResponse) Descriptor deprecated

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

Deprecated: Use ListGRPCServerResponse.ProtoReflect.Descriptor instead.

func (*ListGRPCServerResponse) GetServers

func (x *ListGRPCServerResponse) GetServers() []string

func (*ListGRPCServerResponse) ProtoMessage

func (*ListGRPCServerResponse) ProtoMessage()

func (*ListGRPCServerResponse) ProtoReflect

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

func (*ListGRPCServerResponse) Reset

func (x *ListGRPCServerResponse) Reset()

func (*ListGRPCServerResponse) String

func (x *ListGRPCServerResponse) String() string

type UnimplementedDiscoveryServiceServer

type UnimplementedDiscoveryServiceServer struct {
}

UnimplementedDiscoveryServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedDiscoveryServiceServer) ListGRPCServer

type UnsafeDiscoveryServiceServer

type UnsafeDiscoveryServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeDiscoveryServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DiscoveryServiceServer will result in compilation errors.

type WatchGRPCServerRequest

type WatchGRPCServerRequest struct {
	// contains filtered or unexported fields
}

WatchGRPCServerRequest is the request message for WatchGRPCServer method.

func (*WatchGRPCServerRequest) Descriptor deprecated

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

Deprecated: Use WatchGRPCServerRequest.ProtoReflect.Descriptor instead.

func (*WatchGRPCServerRequest) ProtoMessage

func (*WatchGRPCServerRequest) ProtoMessage()

func (*WatchGRPCServerRequest) ProtoReflect

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

func (*WatchGRPCServerRequest) Reset

func (x *WatchGRPCServerRequest) Reset()

func (*WatchGRPCServerRequest) String

func (x *WatchGRPCServerRequest) String() string

type WatchGRPCServerResponse

type WatchGRPCServerResponse struct {

	// The client ID that represents the gRPC server.
	Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
	// Action event related to the gRPC server.
	Event WatchGRPCServerResponse_Event `protobuf:"varint,2,opt,name=event,proto3,enum=grpc.multiplexer.v1.WatchGRPCServerResponse_Event" json:"event,omitempty"`
	// contains filtered or unexported fields
}

WatchGRPCServerResponse is the response message for WatchGRPCServer method.

func (*WatchGRPCServerResponse) Descriptor deprecated

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

Deprecated: Use WatchGRPCServerResponse.ProtoReflect.Descriptor instead.

func (*WatchGRPCServerResponse) GetEvent

func (*WatchGRPCServerResponse) GetServer

func (x *WatchGRPCServerResponse) GetServer() string

func (*WatchGRPCServerResponse) ProtoMessage

func (*WatchGRPCServerResponse) ProtoMessage()

func (*WatchGRPCServerResponse) ProtoReflect

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

func (*WatchGRPCServerResponse) Reset

func (x *WatchGRPCServerResponse) Reset()

func (*WatchGRPCServerResponse) String

func (x *WatchGRPCServerResponse) String() string

type WatchGRPCServerResponse_Event

type WatchGRPCServerResponse_Event int32

List of possible event of WatchGRPCServerResponse

const (
	// Unspecified event, probably an issue with the request or the gRPC multiplexer.
	WatchGRPCServerResponse_EVENT_UNSPECIFIED WatchGRPCServerResponse_Event = 0
	// The multiplexer client has connected a new gRPC server.
	WatchGRPCServerResponse_EVENT_CONNECTED WatchGRPCServerResponse_Event = 1
	// The multiplexer client has disconnected an existing gRPC server.
	WatchGRPCServerResponse_EVENT_DISCONNECTED WatchGRPCServerResponse_Event = 2
)

func (WatchGRPCServerResponse_Event) Descriptor

func (WatchGRPCServerResponse_Event) Enum

func (WatchGRPCServerResponse_Event) EnumDescriptor deprecated

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

Deprecated: Use WatchGRPCServerResponse_Event.Descriptor instead.

func (WatchGRPCServerResponse_Event) Number

func (WatchGRPCServerResponse_Event) String

func (WatchGRPCServerResponse_Event) Type

Jump to

Keyboard shortcuts

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