connectionv1

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package connectionv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var ConnectionsService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "connection.v1.ConnectionsService",
	HandlerType: (*ConnectionsServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetConnections",
			Handler:    _ConnectionsService_GetConnections_Handler,
		},
		{
			MethodName: "GetConnection",
			Handler:    _ConnectionsService_GetConnection_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "WatchConnectionStatus",
			Handler:       _ConnectionsService_WatchConnectionStatus_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "connection/v1/connection.proto",
}

ConnectionsService_ServiceDesc is the grpc.ServiceDesc for ConnectionsService 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_connection_v1_connection_proto protoreflect.FileDescriptor

Functions

func RegisterConnectionsServiceHandler

func RegisterConnectionsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterConnectionsServiceHandler registers the http handlers for service ConnectionsService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterConnectionsServiceHandlerClient

func RegisterConnectionsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ConnectionsServiceClient) error

RegisterConnectionsServiceHandlerClient registers the http handlers for service ConnectionsService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ConnectionsServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ConnectionsServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ConnectionsServiceClient" to call the correct interceptors.

func RegisterConnectionsServiceHandlerFromEndpoint

func RegisterConnectionsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterConnectionsServiceHandlerFromEndpoint is same as RegisterConnectionsServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterConnectionsServiceHandlerServer

func RegisterConnectionsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ConnectionsServiceServer) error

RegisterConnectionsServiceHandlerServer registers the http handlers for service ConnectionsService to "mux". UnaryRPC :call ConnectionsServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterConnectionsServiceHandlerFromEndpoint instead.

func RegisterConnectionsServiceServer

func RegisterConnectionsServiceServer(s grpc.ServiceRegistrar, srv ConnectionsServiceServer)

Types

type Connection

type Connection struct {
	Id            string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	IsAvailable   bool   `protobuf:"varint,2,opt,name=isAvailable,proto3" json:"isAvailable,omitempty"`
	IpAddress     string `protobuf:"bytes,3,opt,name=ipAddress,proto3" json:"ipAddress,omitempty"`
	SocketAddress string `protobuf:"bytes,4,opt,name=socketAddress,proto3" json:"socketAddress,omitempty"`
	// contains filtered or unexported fields
}

func (*Connection) Descriptor deprecated

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

Deprecated: Use Connection.ProtoReflect.Descriptor instead.

func (*Connection) GetId

func (x *Connection) GetId() string

func (*Connection) GetIpAddress

func (x *Connection) GetIpAddress() string

func (*Connection) GetIsAvailable

func (x *Connection) GetIsAvailable() bool

func (*Connection) GetSocketAddress

func (x *Connection) GetSocketAddress() string

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 ConnectionStatus

type ConnectionStatus struct {
	Connected bool `protobuf:"varint,1,opt,name=connected,proto3" json:"connected,omitempty"`
	// contains filtered or unexported fields
}

func (*ConnectionStatus) Descriptor deprecated

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

Deprecated: Use ConnectionStatus.ProtoReflect.Descriptor instead.

func (*ConnectionStatus) GetConnected

func (x *ConnectionStatus) GetConnected() bool

func (*ConnectionStatus) ProtoMessage

func (*ConnectionStatus) ProtoMessage()

func (*ConnectionStatus) ProtoReflect

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

func (*ConnectionStatus) Reset

func (x *ConnectionStatus) Reset()

func (*ConnectionStatus) String

func (x *ConnectionStatus) String() string

type ConnectionsServiceClient

type ConnectionsServiceClient interface {
	GetConnections(ctx context.Context, in *GenConnectionsRequest, opts ...grpc.CallOption) (*GetConnectionsResponse, error)
	GetConnection(ctx context.Context, in *GenConnectionRequest, opts ...grpc.CallOption) (*GetConnectionsResponse, error)
	WatchConnectionStatus(ctx context.Context, in *WatchConnectionStatusRequest, opts ...grpc.CallOption) (ConnectionsService_WatchConnectionStatusClient, error)
}

ConnectionsServiceClient is the client API for ConnectionsService 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 ConnectionsServiceServer

ConnectionsServiceServer is the server API for ConnectionsService service. All implementations should embed UnimplementedConnectionsServiceServer for forward compatibility

type ConnectionsService_WatchConnectionStatusClient

type ConnectionsService_WatchConnectionStatusClient interface {
	Recv() (*WatchConnectionStatusResponse, error)
	grpc.ClientStream
}

type ConnectionsService_WatchConnectionStatusServer

type ConnectionsService_WatchConnectionStatusServer interface {
	Send(*WatchConnectionStatusResponse) error
	grpc.ServerStream
}

type GenConnectionRequest

type GenConnectionRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GenConnectionRequest) Descriptor deprecated

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

Deprecated: Use GenConnectionRequest.ProtoReflect.Descriptor instead.

func (*GenConnectionRequest) GetId

func (x *GenConnectionRequest) GetId() string

func (*GenConnectionRequest) ProtoMessage

func (*GenConnectionRequest) ProtoMessage()

func (*GenConnectionRequest) ProtoReflect

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

func (*GenConnectionRequest) Reset

func (x *GenConnectionRequest) Reset()

func (*GenConnectionRequest) String

func (x *GenConnectionRequest) String() string

type GenConnectionsRequest

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

func (*GenConnectionsRequest) Descriptor deprecated

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

Deprecated: Use GenConnectionsRequest.ProtoReflect.Descriptor instead.

func (*GenConnectionsRequest) ProtoMessage

func (*GenConnectionsRequest) ProtoMessage()

func (*GenConnectionsRequest) ProtoReflect

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

func (*GenConnectionsRequest) Reset

func (x *GenConnectionsRequest) Reset()

func (*GenConnectionsRequest) String

func (x *GenConnectionsRequest) String() string

type GetConnectionResponse

type GetConnectionResponse struct {
	Connection *Connection `protobuf:"bytes,1,opt,name=connection,proto3" json:"connection,omitempty"`
	// contains filtered or unexported fields
}

func (*GetConnectionResponse) Descriptor deprecated

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

Deprecated: Use GetConnectionResponse.ProtoReflect.Descriptor instead.

func (*GetConnectionResponse) GetConnection

func (x *GetConnectionResponse) GetConnection() *Connection

func (*GetConnectionResponse) ProtoMessage

func (*GetConnectionResponse) ProtoMessage()

func (*GetConnectionResponse) ProtoReflect

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

func (*GetConnectionResponse) Reset

func (x *GetConnectionResponse) Reset()

func (*GetConnectionResponse) String

func (x *GetConnectionResponse) String() string

type GetConnectionsResponse

type GetConnectionsResponse struct {
	Connections []*Connection `protobuf:"bytes,1,rep,name=connections,proto3" json:"connections,omitempty"`
	// contains filtered or unexported fields
}

func (*GetConnectionsResponse) Descriptor deprecated

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

Deprecated: Use GetConnectionsResponse.ProtoReflect.Descriptor instead.

func (*GetConnectionsResponse) GetConnections

func (x *GetConnectionsResponse) GetConnections() []*Connection

func (*GetConnectionsResponse) ProtoMessage

func (*GetConnectionsResponse) ProtoMessage()

func (*GetConnectionsResponse) ProtoReflect

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

func (*GetConnectionsResponse) Reset

func (x *GetConnectionsResponse) Reset()

func (*GetConnectionsResponse) String

func (x *GetConnectionsResponse) String() string

type UnimplementedConnectionsServiceServer

type UnimplementedConnectionsServiceServer struct {
}

UnimplementedConnectionsServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedConnectionsServiceServer) GetConnection

func (UnimplementedConnectionsServiceServer) GetConnections

type UnsafeConnectionsServiceServer

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

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

type WatchConnectionStatusRequest

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

func (*WatchConnectionStatusRequest) Descriptor deprecated

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

Deprecated: Use WatchConnectionStatusRequest.ProtoReflect.Descriptor instead.

func (*WatchConnectionStatusRequest) ProtoMessage

func (*WatchConnectionStatusRequest) ProtoMessage()

func (*WatchConnectionStatusRequest) ProtoReflect

func (*WatchConnectionStatusRequest) Reset

func (x *WatchConnectionStatusRequest) Reset()

func (*WatchConnectionStatusRequest) String

type WatchConnectionStatusResponse

type WatchConnectionStatusResponse struct {
	ConnectionStatus *ConnectionStatus `protobuf:"bytes,1,opt,name=connectionStatus,proto3" json:"connectionStatus,omitempty"`
	// contains filtered or unexported fields
}

func (*WatchConnectionStatusResponse) Descriptor deprecated

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

Deprecated: Use WatchConnectionStatusResponse.ProtoReflect.Descriptor instead.

func (*WatchConnectionStatusResponse) GetConnectionStatus

func (x *WatchConnectionStatusResponse) GetConnectionStatus() *ConnectionStatus

func (*WatchConnectionStatusResponse) ProtoMessage

func (*WatchConnectionStatusResponse) ProtoMessage()

func (*WatchConnectionStatusResponse) ProtoReflect

func (*WatchConnectionStatusResponse) Reset

func (x *WatchConnectionStatusResponse) Reset()

func (*WatchConnectionStatusResponse) String

Jump to

Keyboard shortcuts

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