broadcaster

package
v0.0.0-...-29b6922 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SysStatBroadcaster_Subscribe_FullMethodName = "/api.grpc.statistic.statistic_broadcaster.SysStatBroadcaster/Subscribe"
)

Variables

View Source
var File_api_grpc_statistic_broadcaster_proto protoreflect.FileDescriptor
View Source
var SysStatBroadcaster_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.grpc.statistic.statistic_broadcaster.SysStatBroadcaster",
	HandlerType: (*SysStatBroadcasterServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Subscribe",
			Handler:       _SysStatBroadcaster_Subscribe_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "api/grpc/statistic/broadcaster.proto",
}

SysStatBroadcaster_ServiceDesc is the grpc.ServiceDesc for SysStatBroadcaster service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterSysStatBroadcasterServer

func RegisterSysStatBroadcasterServer(s grpc.ServiceRegistrar, srv SysStatBroadcasterServer)

Types

type StatParams

type StatParams struct {
	SendingPeriod    *duration.Duration `protobuf:"bytes,1,opt,name=sending_period,json=sendingPeriod,proto3" json:"sending_period,omitempty"`          ///< Период отправки статистики
	CollectingPeriod *duration.Duration `protobuf:"bytes,2,opt,name=collecting_period,json=collectingPeriod,proto3" json:"collecting_period,omitempty"` ///< Период накопления статистики
	// contains filtered or unexported fields
}

! Параметры рассылки статистики

func (*StatParams) Descriptor deprecated

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

Deprecated: Use StatParams.ProtoReflect.Descriptor instead.

func (*StatParams) GetCollectingPeriod

func (x *StatParams) GetCollectingPeriod() *duration.Duration

func (*StatParams) GetSendingPeriod

func (x *StatParams) GetSendingPeriod() *duration.Duration

func (*StatParams) ProtoMessage

func (*StatParams) ProtoMessage()

func (*StatParams) ProtoReflect

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

func (*StatParams) Reset

func (x *StatParams) Reset()

func (*StatParams) String

func (x *StatParams) String() string

type SysStat

type SysStat struct {
	CpuUsage  *data.CPUUsage  `protobuf:"bytes,1,opt,name=cpu_usage,json=cpuUsage,proto3" json:"cpu_usage,omitempty"`    ///< Использование CPU
	DiskUsage *data.DiskUsage `protobuf:"bytes,2,opt,name=disk_usage,json=diskUsage,proto3" json:"disk_usage,omitempty"` ///< Использование дискового пространства
	IoStat    *data.IOStat    `protobuf:"bytes,3,opt,name=io_stat,json=ioStat,proto3" json:"io_stat,omitempty"`          ///< Статистика операций ввода/вывода
	LoadAvg   *data.LoadAvg   `protobuf:"bytes,4,opt,name=load_avg,json=loadAvg,proto3" json:"load_avg,omitempty"`       ///< Средняя нагрузка
	NodeUsage *data.NodeUsage `protobuf:"bytes,5,opt,name=node_usage,json=nodeUsage,proto3" json:"node_usage,omitempty"` ///< Использование inode
	// contains filtered or unexported fields
}

! Данные статистики

func (*SysStat) Descriptor deprecated

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

Deprecated: Use SysStat.ProtoReflect.Descriptor instead.

func (*SysStat) GetCpuUsage

func (x *SysStat) GetCpuUsage() *data.CPUUsage

func (*SysStat) GetDiskUsage

func (x *SysStat) GetDiskUsage() *data.DiskUsage

func (*SysStat) GetIoStat

func (x *SysStat) GetIoStat() *data.IOStat

func (*SysStat) GetLoadAvg

func (x *SysStat) GetLoadAvg() *data.LoadAvg

func (*SysStat) GetNodeUsage

func (x *SysStat) GetNodeUsage() *data.NodeUsage

func (*SysStat) ProtoMessage

func (*SysStat) ProtoMessage()

func (*SysStat) ProtoReflect

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

func (*SysStat) Reset

func (x *SysStat) Reset()

func (*SysStat) String

func (x *SysStat) String() string

type SysStatBroadcasterClient

type SysStatBroadcasterClient interface {
	// ! Подписа на рассылку статистики
	Subscribe(ctx context.Context, in *StatParams, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SysStat], error)
}

SysStatBroadcasterClient is the client API for SysStatBroadcaster 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.

! API сервера статистики

type SysStatBroadcasterServer

type SysStatBroadcasterServer interface {
	// ! Подписа на рассылку статистики
	Subscribe(*StatParams, grpc.ServerStreamingServer[SysStat]) error
	// contains filtered or unexported methods
}

SysStatBroadcasterServer is the server API for SysStatBroadcaster service. All implementations must embed UnimplementedSysStatBroadcasterServer for forward compatibility.

! API сервера статистики

type SysStatBroadcaster_SubscribeClient

type SysStatBroadcaster_SubscribeClient = grpc.ServerStreamingClient[SysStat]

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

type SysStatBroadcaster_SubscribeServer

type SysStatBroadcaster_SubscribeServer = grpc.ServerStreamingServer[SysStat]

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

type UnimplementedSysStatBroadcasterServer

type UnimplementedSysStatBroadcasterServer struct{}

UnimplementedSysStatBroadcasterServer 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 (UnimplementedSysStatBroadcasterServer) Subscribe

type UnsafeSysStatBroadcasterServer

type UnsafeSysStatBroadcasterServer interface {
	// contains filtered or unexported methods
}

UnsafeSysStatBroadcasterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SysStatBroadcasterServer will result in compilation errors.

Jump to

Keyboard shortcuts

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