protobuf

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pkg_monitor_protobuf_monitor_proto protoreflect.FileDescriptor
View Source
var Monitor_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "monitor.Monitor",
	HandlerType: (*MonitorServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetConfig",
			Handler:    _Monitor_GetConfig_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetTelemetry",
			Handler:       _Monitor_GetTelemetry_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "pkg/monitor/protobuf/monitor.proto",
}

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

Functions

func RegisterMonitorServer

func RegisterMonitorServer(s grpc.ServiceRegistrar, srv MonitorServer)

Types

type Config

type Config struct {
	Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetContent

func (x *Config) GetContent() string

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type Entity

type Entity struct {
	Count    int64                  `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	LastGc   *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=last_gc,json=lastGc,proto3" json:"last_gc,omitempty"`
	LastPull *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_pull,json=lastPull,proto3" json:"last_pull,omitempty"`
	NextGc   *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=next_gc,json=nextGc,proto3" json:"next_gc,omitempty"`
	NextPull *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=next_pull,json=nextPull,proto3" json:"next_pull,omitempty"`
	// contains filtered or unexported fields
}

func (*Entity) Descriptor deprecated

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

Deprecated: Use Entity.ProtoReflect.Descriptor instead.

func (*Entity) GetCount

func (x *Entity) GetCount() int64

func (*Entity) GetLastGc

func (x *Entity) GetLastGc() *timestamppb.Timestamp

func (*Entity) GetLastPull

func (x *Entity) GetLastPull() *timestamppb.Timestamp

func (*Entity) GetNextGc

func (x *Entity) GetNextGc() *timestamppb.Timestamp

func (*Entity) GetNextPull

func (x *Entity) GetNextPull() *timestamppb.Timestamp

func (*Entity) ProtoMessage

func (*Entity) ProtoMessage()

func (*Entity) ProtoReflect

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

func (*Entity) Reset

func (x *Entity) Reset()

func (*Entity) String

func (x *Entity) String() string

type MonitorClient

type MonitorClient interface {
	GetConfig(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Config, error)
	GetTelemetry(ctx context.Context, in *Empty, opts ...grpc.CallOption) (Monitor_GetTelemetryClient, error)
}

MonitorClient is the client API for Monitor 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 NewMonitorClient

func NewMonitorClient(cc grpc.ClientConnInterface) MonitorClient

type MonitorServer

type MonitorServer interface {
	GetConfig(context.Context, *Empty) (*Config, error)
	GetTelemetry(*Empty, Monitor_GetTelemetryServer) error
	// contains filtered or unexported methods
}

MonitorServer is the server API for Monitor service. All implementations must embed UnimplementedMonitorServer for forward compatibility

type Monitor_GetTelemetryClient

type Monitor_GetTelemetryClient interface {
	Recv() (*Telemetry, error)
	grpc.ClientStream
}

type Monitor_GetTelemetryServer

type Monitor_GetTelemetryServer interface {
	Send(*Telemetry) error
	grpc.ServerStream
}

type Telemetry

type Telemetry struct {
	GitlabApiUsage          float64 `protobuf:"fixed64,1,opt,name=gitlab_api_usage,json=gitlabApiUsage,proto3" json:"gitlab_api_usage,omitempty"`
	GitlabApiRequestsCount  uint64  `` /* 132-byte string literal not displayed */
	GitlabApiRateLimit      float64 `protobuf:"fixed64,3,opt,name=gitlab_api_rate_limit,json=gitlabApiRateLimit,proto3" json:"gitlab_api_rate_limit,omitempty"`
	GitlabApiLimitRemaining uint64  `` /* 135-byte string literal not displayed */
	TasksBufferUsage        float64 `protobuf:"fixed64,5,opt,name=tasks_buffer_usage,json=tasksBufferUsage,proto3" json:"tasks_buffer_usage,omitempty"`
	TasksExecutedCount      uint64  `protobuf:"varint,6,opt,name=tasks_executed_count,json=tasksExecutedCount,proto3" json:"tasks_executed_count,omitempty"`
	Projects                *Entity `protobuf:"bytes,7,opt,name=projects,proto3" json:"projects,omitempty"`
	Refs                    *Entity `protobuf:"bytes,8,opt,name=refs,proto3" json:"refs,omitempty"`
	Envs                    *Entity `protobuf:"bytes,9,opt,name=envs,proto3" json:"envs,omitempty"`
	Metrics                 *Entity `protobuf:"bytes,10,opt,name=metrics,proto3" json:"metrics,omitempty"`
	// contains filtered or unexported fields
}

func (*Telemetry) Descriptor deprecated

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

Deprecated: Use Telemetry.ProtoReflect.Descriptor instead.

func (*Telemetry) GetEnvs

func (x *Telemetry) GetEnvs() *Entity

func (*Telemetry) GetGitlabApiLimitRemaining

func (x *Telemetry) GetGitlabApiLimitRemaining() uint64

func (*Telemetry) GetGitlabApiRateLimit

func (x *Telemetry) GetGitlabApiRateLimit() float64

func (*Telemetry) GetGitlabApiRequestsCount

func (x *Telemetry) GetGitlabApiRequestsCount() uint64

func (*Telemetry) GetGitlabApiUsage

func (x *Telemetry) GetGitlabApiUsage() float64

func (*Telemetry) GetMetrics

func (x *Telemetry) GetMetrics() *Entity

func (*Telemetry) GetProjects

func (x *Telemetry) GetProjects() *Entity

func (*Telemetry) GetRefs

func (x *Telemetry) GetRefs() *Entity

func (*Telemetry) GetTasksBufferUsage

func (x *Telemetry) GetTasksBufferUsage() float64

func (*Telemetry) GetTasksExecutedCount

func (x *Telemetry) GetTasksExecutedCount() uint64

func (*Telemetry) ProtoMessage

func (*Telemetry) ProtoMessage()

func (*Telemetry) ProtoReflect

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

func (*Telemetry) Reset

func (x *Telemetry) Reset()

func (*Telemetry) String

func (x *Telemetry) String() string

type UnimplementedMonitorServer

type UnimplementedMonitorServer struct{}

UnimplementedMonitorServer must be embedded to have forward compatible implementations.

func (UnimplementedMonitorServer) GetConfig

func (UnimplementedMonitorServer) GetTelemetry

type UnsafeMonitorServer

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

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

Jump to

Keyboard shortcuts

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