Documentation ¶
Index ¶
- Variables
- func RegisterConnectionsServer(s grpc.ServiceRegistrar, srv ConnectionsServer)
- type ConnectionsClient
- type ConnectionsId
- type ConnectionsInfo
- func (*ConnectionsInfo) Descriptor() ([]byte, []int)deprecated
- func (x *ConnectionsInfo) GetConnections() []*statistic.Connection
- func (*ConnectionsInfo) ProtoMessage()
- func (x *ConnectionsInfo) ProtoReflect() protoreflect.Message
- func (x *ConnectionsInfo) Reset()
- func (x *ConnectionsInfo) String() string
- type ConnectionsServer
- type TotalFlow
- type UnimplementedConnectionsServer
- func (UnimplementedConnectionsServer) CloseConn(context.Context, *ConnectionsId) (*emptypb.Empty, error)
- func (UnimplementedConnectionsServer) Conns(context.Context, *emptypb.Empty) (*ConnectionsInfo, error)
- func (UnimplementedConnectionsServer) Total(context.Context, *emptypb.Empty) (*TotalFlow, error)
- type UnsafeConnectionsServer
Constants ¶
This section is empty.
Variables ¶
var Connections_ServiceDesc = grpc.ServiceDesc{ ServiceName: "yuhaiin.protos.statistic.service.connections", HandlerType: (*ConnectionsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "conns", Handler: _Connections_Conns_Handler, }, { MethodName: "close_conn", Handler: _Connections_CloseConn_Handler, }, { MethodName: "total", Handler: _Connections_Total_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "statistic/grpc/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)
var File_statistic_grpc_config_proto protoreflect.FileDescriptor
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) (*ConnectionsInfo, error) CloseConn(ctx context.Context, in *ConnectionsId, opts ...grpc.CallOption) (*emptypb.Empty, error) Total(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*TotalFlow, 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 ConnectionsId ¶
type ConnectionsId struct { Ids []uint64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` // contains filtered or unexported fields }
func (*ConnectionsId) Descriptor
deprecated
func (*ConnectionsId) Descriptor() ([]byte, []int)
Deprecated: Use ConnectionsId.ProtoReflect.Descriptor instead.
func (*ConnectionsId) GetIds ¶
func (x *ConnectionsId) GetIds() []uint64
func (*ConnectionsId) ProtoMessage ¶
func (*ConnectionsId) ProtoMessage()
func (*ConnectionsId) ProtoReflect ¶
func (x *ConnectionsId) ProtoReflect() protoreflect.Message
func (*ConnectionsId) Reset ¶
func (x *ConnectionsId) Reset()
func (*ConnectionsId) String ¶
func (x *ConnectionsId) String() string
type ConnectionsInfo ¶
type ConnectionsInfo struct { Connections []*statistic.Connection `protobuf:"bytes,1,rep,name=connections,proto3" json:"connections,omitempty"` // contains filtered or unexported fields }
func (*ConnectionsInfo) Descriptor
deprecated
func (*ConnectionsInfo) Descriptor() ([]byte, []int)
Deprecated: Use ConnectionsInfo.ProtoReflect.Descriptor instead.
func (*ConnectionsInfo) GetConnections ¶
func (x *ConnectionsInfo) GetConnections() []*statistic.Connection
func (*ConnectionsInfo) ProtoMessage ¶
func (*ConnectionsInfo) ProtoMessage()
func (*ConnectionsInfo) ProtoReflect ¶
func (x *ConnectionsInfo) ProtoReflect() protoreflect.Message
func (*ConnectionsInfo) Reset ¶
func (x *ConnectionsInfo) Reset()
func (*ConnectionsInfo) String ¶
func (x *ConnectionsInfo) String() string
type ConnectionsServer ¶
type ConnectionsServer interface { Conns(context.Context, *emptypb.Empty) (*ConnectionsInfo, error) CloseConn(context.Context, *ConnectionsId) (*emptypb.Empty, error) Total(context.Context, *emptypb.Empty) (*TotalFlow, error) // contains filtered or unexported methods }
ConnectionsServer is the server API for Connections service. All implementations must embed UnimplementedConnectionsServer for forward compatibility
type TotalFlow ¶
type TotalFlow struct { Download uint64 `protobuf:"varint,1,opt,name=download,proto3" json:"download,omitempty"` Upload uint64 `protobuf:"varint,2,opt,name=upload,proto3" json:"upload,omitempty"` // contains filtered or unexported fields }
func (*TotalFlow) Descriptor
deprecated
func (*TotalFlow) GetDownload ¶
func (*TotalFlow) ProtoMessage ¶
func (*TotalFlow) ProtoMessage()
func (*TotalFlow) ProtoReflect ¶
func (x *TotalFlow) ProtoReflect() protoreflect.Message
type UnimplementedConnectionsServer ¶
type UnimplementedConnectionsServer struct { }
UnimplementedConnectionsServer must be embedded to have forward compatible implementations.
func (UnimplementedConnectionsServer) CloseConn ¶
func (UnimplementedConnectionsServer) CloseConn(context.Context, *ConnectionsId) (*emptypb.Empty, error)
func (UnimplementedConnectionsServer) Conns ¶
func (UnimplementedConnectionsServer) Conns(context.Context, *emptypb.Empty) (*ConnectionsInfo, 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.