statistic

package
v0.3.1-beta.4 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

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

func (UnimplementedConnectionsServer) Statistic

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.

Jump to

Keyboard shortcuts

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