service

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Connections_Conns_FullMethodName         = "/yuhaiin.protos.statistic.service.connections/conns"
	Connections_CloseConn_FullMethodName     = "/yuhaiin.protos.statistic.service.connections/close_conn"
	Connections_Total_FullMethodName         = "/yuhaiin.protos.statistic.service.connections/total"
	Connections_Notify_FullMethodName        = "/yuhaiin.protos.statistic.service.connections/notify"
	Connections_FailedHistory_FullMethodName = "/yuhaiin.protos.statistic.service.connections/failed_history"
)

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,
		},
		{
			MethodName: "failed_history",
			Handler:    _Connections_FailedHistory_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "notify",
			Handler:       _Connections_Notify_Handler,
			ServerStreams: true,
		},
	},
	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) (*NotifyNewConnections, error)
	CloseConn(ctx context.Context, in *NotifyRemoveConnections, opts ...grpc.CallOption) (*emptypb.Empty, error)
	Total(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*TotalFlow, error)
	Notify(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[NotifyData], error)
	FailedHistory(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*FailedHistoryList, 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) (*NotifyNewConnections, error)
	CloseConn(context.Context, *NotifyRemoveConnections) (*emptypb.Empty, error)
	Total(context.Context, *emptypb.Empty) (*TotalFlow, error)
	Notify(*emptypb.Empty, grpc.ServerStreamingServer[NotifyData]) error
	FailedHistory(context.Context, *emptypb.Empty) (*FailedHistoryList, error)
	// contains filtered or unexported methods
}

ConnectionsServer is the server API for Connections service. All implementations must embed UnimplementedConnectionsServer for forward compatibility.

type Connections_NotifyClient

type Connections_NotifyClient = grpc.ServerStreamingClient[NotifyData]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Connections_NotifyServer

type Connections_NotifyServer = grpc.ServerStreamingServer[NotifyData]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type FailedHistory added in v0.3.7

type FailedHistory struct {
	Protocol string                 `protobuf:"bytes,1,opt,name=protocol,proto3" json:"protocol,omitempty"`
	Host     string                 `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"`
	Error    string                 `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	Process  string                 `protobuf:"bytes,4,opt,name=process,proto3" json:"process,omitempty"`
	Time     *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=time,proto3" json:"time,omitempty"`
	// contains filtered or unexported fields
}

func (*FailedHistory) Descriptor deprecated added in v0.3.7

func (*FailedHistory) Descriptor() ([]byte, []int)

Deprecated: Use FailedHistory.ProtoReflect.Descriptor instead.

func (*FailedHistory) GetError added in v0.3.7

func (x *FailedHistory) GetError() string

func (*FailedHistory) GetHost added in v0.3.7

func (x *FailedHistory) GetHost() string

func (*FailedHistory) GetProcess added in v0.3.7

func (x *FailedHistory) GetProcess() string

func (*FailedHistory) GetProtocol added in v0.3.7

func (x *FailedHistory) GetProtocol() string

func (*FailedHistory) GetTime added in v0.3.7

func (x *FailedHistory) GetTime() *timestamppb.Timestamp

func (*FailedHistory) ProtoMessage added in v0.3.7

func (*FailedHistory) ProtoMessage()

func (*FailedHistory) ProtoReflect added in v0.3.7

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

func (*FailedHistory) Reset added in v0.3.7

func (x *FailedHistory) Reset()

func (*FailedHistory) String added in v0.3.7

func (x *FailedHistory) String() string

type FailedHistoryList added in v0.3.7

type FailedHistoryList struct {
	Objects            []*FailedHistory `protobuf:"bytes,1,rep,name=objects,proto3" json:"objects,omitempty"`
	DumpProcessEnabled bool             `protobuf:"varint,2,opt,name=dump_process_enabled,proto3" json:"dump_process_enabled,omitempty"`
	// contains filtered or unexported fields
}

func (*FailedHistoryList) Descriptor deprecated added in v0.3.7

func (*FailedHistoryList) Descriptor() ([]byte, []int)

Deprecated: Use FailedHistoryList.ProtoReflect.Descriptor instead.

func (*FailedHistoryList) GetDumpProcessEnabled added in v0.3.7

func (x *FailedHistoryList) GetDumpProcessEnabled() bool

func (*FailedHistoryList) GetObjects added in v0.3.7

func (x *FailedHistoryList) GetObjects() []*FailedHistory

func (*FailedHistoryList) ProtoMessage added in v0.3.7

func (*FailedHistoryList) ProtoMessage()

func (*FailedHistoryList) ProtoReflect added in v0.3.7

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

func (*FailedHistoryList) Reset added in v0.3.7

func (x *FailedHistoryList) Reset()

func (*FailedHistoryList) String added in v0.3.7

func (x *FailedHistoryList) String() string

type NotifyData

type NotifyData struct {

	// Types that are assignable to Data:
	//
	//	*NotifyData_TotalFlow
	//	*NotifyData_NotifyNewConnections
	//	*NotifyData_NotifyRemoveConnections
	Data isNotifyData_Data `protobuf_oneof:"data"`
	// contains filtered or unexported fields
}

func (*NotifyData) Descriptor deprecated

func (*NotifyData) Descriptor() ([]byte, []int)

Deprecated: Use NotifyData.ProtoReflect.Descriptor instead.

func (*NotifyData) GetData

func (m *NotifyData) GetData() isNotifyData_Data

func (*NotifyData) GetNotifyNewConnections

func (x *NotifyData) GetNotifyNewConnections() *NotifyNewConnections

func (*NotifyData) GetNotifyRemoveConnections

func (x *NotifyData) GetNotifyRemoveConnections() *NotifyRemoveConnections

func (*NotifyData) GetTotalFlow

func (x *NotifyData) GetTotalFlow() *TotalFlow

func (*NotifyData) ProtoMessage

func (*NotifyData) ProtoMessage()

func (*NotifyData) ProtoReflect

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

func (*NotifyData) Reset

func (x *NotifyData) Reset()

func (*NotifyData) String

func (x *NotifyData) String() string

type NotifyData_NotifyNewConnections

type NotifyData_NotifyNewConnections struct {
	NotifyNewConnections *NotifyNewConnections `protobuf:"bytes,1,opt,name=notify_new_connections,json=notifyNewConnections,proto3,oneof"`
}

type NotifyData_NotifyRemoveConnections

type NotifyData_NotifyRemoveConnections struct {
	NotifyRemoveConnections *NotifyRemoveConnections `protobuf:"bytes,2,opt,name=notify_remove_connections,json=notifyRemoveConnections,proto3,oneof"`
}

type NotifyData_TotalFlow

type NotifyData_TotalFlow struct {
	TotalFlow *TotalFlow `protobuf:"bytes,3,opt,name=total_flow,json=totalFlow,proto3,oneof"`
}

type NotifyNewConnections

type NotifyNewConnections struct {
	Connections []*statistic.Connection `protobuf:"bytes,1,rep,name=connections,proto3" json:"connections,omitempty"`
	// contains filtered or unexported fields
}

func (*NotifyNewConnections) Descriptor deprecated

func (*NotifyNewConnections) Descriptor() ([]byte, []int)

Deprecated: Use NotifyNewConnections.ProtoReflect.Descriptor instead.

func (*NotifyNewConnections) GetConnections

func (x *NotifyNewConnections) GetConnections() []*statistic.Connection

func (*NotifyNewConnections) ProtoMessage

func (*NotifyNewConnections) ProtoMessage()

func (*NotifyNewConnections) ProtoReflect

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

func (*NotifyNewConnections) Reset

func (x *NotifyNewConnections) Reset()

func (*NotifyNewConnections) String

func (x *NotifyNewConnections) String() string

type NotifyRemoveConnections

type NotifyRemoveConnections struct {
	Ids []uint64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"`
	// contains filtered or unexported fields
}

func (*NotifyRemoveConnections) Descriptor deprecated

func (*NotifyRemoveConnections) Descriptor() ([]byte, []int)

Deprecated: Use NotifyRemoveConnections.ProtoReflect.Descriptor instead.

func (*NotifyRemoveConnections) GetIds

func (x *NotifyRemoveConnections) GetIds() []uint64

func (*NotifyRemoveConnections) ProtoMessage

func (*NotifyRemoveConnections) ProtoMessage()

func (*NotifyRemoveConnections) ProtoReflect

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

func (*NotifyRemoveConnections) Reset

func (x *NotifyRemoveConnections) Reset()

func (*NotifyRemoveConnections) String

func (x *NotifyRemoveConnections) String() string

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.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedConnectionsServer) CloseConn

func (UnimplementedConnectionsServer) Conns

func (UnimplementedConnectionsServer) FailedHistory added in v0.3.7

func (UnimplementedConnectionsServer) Notify

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