Documentation ¶
Index ¶
- Variables
- func RegisterConnectionsServer(s grpc.ServiceRegistrar, srv ConnectionsServer)
- type ConnectionsClient
- type ConnectionsServer
- type Connections_StatisticClient
- type Connections_StatisticServer
- type UnimplementedConnectionsServer
- func (UnimplementedConnectionsServer) CloseConn(context.Context, *statistic.CloseConnsReq) (*emptypb.Empty, error)
- func (UnimplementedConnectionsServer) Conns(context.Context, *emptypb.Empty) (*statistic.ConnResp, error)
- func (UnimplementedConnectionsServer) Statistic(*emptypb.Empty, Connections_StatisticServer) error
- type UnsafeConnectionsServer
Constants ¶
This section is empty.
Variables ¶
var Connections_ServiceDesc = grpc.ServiceDesc{ ServiceName: "yuhaiin.protos.grpc.statistic.connections", HandlerType: (*ConnectionsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "conns", Handler: _Connections_Conns_Handler, }, { MethodName: "close_conn", Handler: _Connections_CloseConn_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "statistic", Handler: _Connections_Statistic_Handler, ServerStreams: true, }, }, Metadata: "grpc/statistic/config.proto", }
Connections_ServiceDesc is the grpc.ServiceDesc for Connections service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterConnectionsServer ¶
func RegisterConnectionsServer(s grpc.ServiceRegistrar, srv ConnectionsServer)
Types ¶
type ConnectionsClient ¶
type ConnectionsClient interface { Conns(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*statistic.ConnResp, error) CloseConn(ctx context.Context, in *statistic.CloseConnsReq, opts ...grpc.CallOption) (*emptypb.Empty, error) Statistic(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (Connections_StatisticClient, error) }
ConnectionsClient is the client API for Connections 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 NewConnectionsClient ¶
func NewConnectionsClient(cc grpc.ClientConnInterface) ConnectionsClient
type ConnectionsServer ¶
type ConnectionsServer interface { Conns(context.Context, *emptypb.Empty) (*statistic.ConnResp, error) CloseConn(context.Context, *statistic.CloseConnsReq) (*emptypb.Empty, error) Statistic(*emptypb.Empty, Connections_StatisticServer) error // contains filtered or unexported methods }
ConnectionsServer is the server API for Connections service. All implementations must embed UnimplementedConnectionsServer for forward compatibility
type Connections_StatisticClient ¶
type Connections_StatisticClient interface { Recv() (*statistic.RateResp, error) grpc.ClientStream }
type Connections_StatisticServer ¶
type Connections_StatisticServer interface { Send(*statistic.RateResp) error grpc.ServerStream }
type UnimplementedConnectionsServer ¶
type UnimplementedConnectionsServer struct { }
UnimplementedConnectionsServer must be embedded to have forward compatible implementations.
func (UnimplementedConnectionsServer) CloseConn ¶
func (UnimplementedConnectionsServer) CloseConn(context.Context, *statistic.CloseConnsReq) (*emptypb.Empty, error)
func (UnimplementedConnectionsServer) Statistic ¶
func (UnimplementedConnectionsServer) Statistic(*emptypb.Empty, Connections_StatisticServer) error
type UnsafeConnectionsServer ¶
type UnsafeConnectionsServer interface {
// contains filtered or unexported methods
}
UnsafeConnectionsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ConnectionsServer will result in compilation errors.