Documentation ¶
Overview ¶
Package connectionv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterConnectionsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterConnectionsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ConnectionsServiceClient) error
- func RegisterConnectionsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterConnectionsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ConnectionsServiceServer) error
- func RegisterConnectionsServiceServer(s grpc.ServiceRegistrar, srv ConnectionsServiceServer)
- type Connection
- func (*Connection) Descriptor() ([]byte, []int)deprecated
- func (x *Connection) GetId() string
- func (x *Connection) GetIpAddress() string
- func (x *Connection) GetIsAvailable() bool
- func (x *Connection) GetSocketAddress() string
- func (*Connection) ProtoMessage()
- func (x *Connection) ProtoReflect() protoreflect.Message
- func (x *Connection) Reset()
- func (x *Connection) String() string
- type ConnectionStatus
- type ConnectionsServiceClient
- type ConnectionsServiceServer
- type ConnectionsService_WatchConnectionStatusClient
- type ConnectionsService_WatchConnectionStatusServer
- type GenConnectionRequest
- func (*GenConnectionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GenConnectionRequest) GetId() string
- func (*GenConnectionRequest) ProtoMessage()
- func (x *GenConnectionRequest) ProtoReflect() protoreflect.Message
- func (x *GenConnectionRequest) Reset()
- func (x *GenConnectionRequest) String() string
- type GenConnectionsRequest
- type GetConnectionResponse
- func (*GetConnectionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetConnectionResponse) GetConnection() *Connection
- func (*GetConnectionResponse) ProtoMessage()
- func (x *GetConnectionResponse) ProtoReflect() protoreflect.Message
- func (x *GetConnectionResponse) Reset()
- func (x *GetConnectionResponse) String() string
- type GetConnectionsResponse
- func (*GetConnectionsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetConnectionsResponse) GetConnections() []*Connection
- func (*GetConnectionsResponse) ProtoMessage()
- func (x *GetConnectionsResponse) ProtoReflect() protoreflect.Message
- func (x *GetConnectionsResponse) Reset()
- func (x *GetConnectionsResponse) String() string
- type UnimplementedConnectionsServiceServer
- func (UnimplementedConnectionsServiceServer) GetConnection(context.Context, *GenConnectionRequest) (*GetConnectionsResponse, error)
- func (UnimplementedConnectionsServiceServer) GetConnections(context.Context, *GenConnectionsRequest) (*GetConnectionsResponse, error)
- func (UnimplementedConnectionsServiceServer) WatchConnectionStatus(*WatchConnectionStatusRequest, ConnectionsService_WatchConnectionStatusServer) error
- type UnsafeConnectionsServiceServer
- type WatchConnectionStatusRequest
- func (*WatchConnectionStatusRequest) Descriptor() ([]byte, []int)deprecated
- func (*WatchConnectionStatusRequest) ProtoMessage()
- func (x *WatchConnectionStatusRequest) ProtoReflect() protoreflect.Message
- func (x *WatchConnectionStatusRequest) Reset()
- func (x *WatchConnectionStatusRequest) String() string
- type WatchConnectionStatusResponse
- func (*WatchConnectionStatusResponse) Descriptor() ([]byte, []int)deprecated
- func (x *WatchConnectionStatusResponse) GetConnectionStatus() *ConnectionStatus
- func (*WatchConnectionStatusResponse) ProtoMessage()
- func (x *WatchConnectionStatusResponse) ProtoReflect() protoreflect.Message
- func (x *WatchConnectionStatusResponse) Reset()
- func (x *WatchConnectionStatusResponse) String() string
Constants ¶
This section is empty.
Variables ¶
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)
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.
func NewConnectionsServiceClient ¶
func NewConnectionsServiceClient(cc grpc.ClientConnInterface) ConnectionsServiceClient
type ConnectionsServiceServer ¶
type ConnectionsServiceServer interface { GetConnections(context.Context, *GenConnectionsRequest) (*GetConnectionsResponse, error) GetConnection(context.Context, *GenConnectionRequest) (*GetConnectionsResponse, error) WatchConnectionStatus(*WatchConnectionStatusRequest, ConnectionsService_WatchConnectionStatusServer) error }
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) GetConnection(context.Context, *GenConnectionRequest) (*GetConnectionsResponse, error)
func (UnimplementedConnectionsServiceServer) GetConnections ¶
func (UnimplementedConnectionsServiceServer) GetConnections(context.Context, *GenConnectionsRequest) (*GetConnectionsResponse, error)
func (UnimplementedConnectionsServiceServer) WatchConnectionStatus ¶
func (UnimplementedConnectionsServiceServer) WatchConnectionStatus(*WatchConnectionStatusRequest, ConnectionsService_WatchConnectionStatusServer) error
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 (x *WatchConnectionStatusRequest) ProtoReflect() protoreflect.Message
func (*WatchConnectionStatusRequest) Reset ¶
func (x *WatchConnectionStatusRequest) Reset()
func (*WatchConnectionStatusRequest) String ¶
func (x *WatchConnectionStatusRequest) String() 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 (x *WatchConnectionStatusResponse) ProtoReflect() protoreflect.Message
func (*WatchConnectionStatusResponse) Reset ¶
func (x *WatchConnectionStatusResponse) Reset()
func (*WatchConnectionStatusResponse) String ¶
func (x *WatchConnectionStatusResponse) String() string