service

package
v0.3.1-rc.6 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

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

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) Descriptor() ([]byte, []int)

Deprecated: Use TotalFlow.ProtoReflect.Descriptor instead.

func (*TotalFlow) GetDownload

func (x *TotalFlow) GetDownload() uint64

func (*TotalFlow) GetUpload

func (x *TotalFlow) GetUpload() uint64

func (*TotalFlow) ProtoMessage

func (*TotalFlow) ProtoMessage()

func (*TotalFlow) ProtoReflect

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

func (*TotalFlow) Reset

func (x *TotalFlow) Reset()

func (*TotalFlow) String

func (x *TotalFlow) String() string

type UnimplementedConnectionsServer

type UnimplementedConnectionsServer struct {
}

UnimplementedConnectionsServer must be embedded to have forward compatible implementations.

func (UnimplementedConnectionsServer) CloseConn

func (UnimplementedConnectionsServer) Conns

func (UnimplementedConnectionsServer) Total

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