proto

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_sophokles_proto protoreflect.FileDescriptor
View Source
var MetricsService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "sophokles.MetricsService",
	HandlerType: (*MetricsServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "HealthCheck",
			Handler:    _MetricsService_HealthCheck_Handler,
		},
		{
			MethodName: "FetchMetrics",
			Handler:    _MetricsService_FetchMetrics_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/sophokles.proto",
}

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

Functions

func RegisterMetricsServiceServer

func RegisterMetricsServiceServer(s grpc.ServiceRegistrar, srv MetricsServiceServer)

Types

type ContainerMetrics

type ContainerMetrics struct {
	ContainerName                string `protobuf:"bytes,1,opt,name=container_name,json=containerName,proto3" json:"container_name,omitempty"`
	ContainerCpuRaw              int64  `protobuf:"varint,2,opt,name=container_cpu_raw,json=containerCpuRaw,proto3" json:"container_cpu_raw,omitempty"`
	ContainerMemoryRaw           int64  `protobuf:"varint,3,opt,name=container_memory_raw,json=containerMemoryRaw,proto3" json:"container_memory_raw,omitempty"`
	ContainerCpuHumanReadable    string `` /* 140-byte string literal not displayed */
	ContainerMemoryHumanReadable string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ContainerMetrics) Descriptor deprecated

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

Deprecated: Use ContainerMetrics.ProtoReflect.Descriptor instead.

func (*ContainerMetrics) GetContainerCpuHumanReadable

func (x *ContainerMetrics) GetContainerCpuHumanReadable() string

func (*ContainerMetrics) GetContainerCpuRaw

func (x *ContainerMetrics) GetContainerCpuRaw() int64

func (*ContainerMetrics) GetContainerMemoryHumanReadable

func (x *ContainerMetrics) GetContainerMemoryHumanReadable() string

func (*ContainerMetrics) GetContainerMemoryRaw

func (x *ContainerMetrics) GetContainerMemoryRaw() int64

func (*ContainerMetrics) GetContainerName

func (x *ContainerMetrics) GetContainerName() string

func (*ContainerMetrics) ProtoMessage

func (*ContainerMetrics) ProtoMessage()

func (*ContainerMetrics) ProtoReflect

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

func (*ContainerMetrics) Reset

func (x *ContainerMetrics) Reset()

func (*ContainerMetrics) String

func (x *ContainerMetrics) 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 HealthCheckResponse

type HealthCheckResponse struct {
	Healthy bool   `protobuf:"varint,1,opt,name=healthy,proto3" json:"healthy,omitempty"`
	Status  string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*HealthCheckResponse) Descriptor deprecated

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

Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead.

func (*HealthCheckResponse) GetHealthy added in v0.0.5

func (x *HealthCheckResponse) GetHealthy() bool

func (*HealthCheckResponse) GetStatus

func (x *HealthCheckResponse) GetStatus() string

func (*HealthCheckResponse) ProtoMessage

func (*HealthCheckResponse) ProtoMessage()

func (*HealthCheckResponse) ProtoReflect

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

func (*HealthCheckResponse) Reset

func (x *HealthCheckResponse) Reset()

func (*HealthCheckResponse) String

func (x *HealthCheckResponse) String() string

type MetricsResponse

type MetricsResponse struct {
	Pod         *PodMetrics `protobuf:"bytes,1,opt,name=pod,proto3" json:"pod,omitempty"`
	CpuUnits    string      `protobuf:"bytes,3,opt,name=cpu_units,json=cpuUnits,proto3" json:"cpu_units,omitempty"`
	MemoryUnits string      `protobuf:"bytes,4,opt,name=memory_units,json=memoryUnits,proto3" json:"memory_units,omitempty"`
	// contains filtered or unexported fields
}

func (*MetricsResponse) Descriptor deprecated

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

Deprecated: Use MetricsResponse.ProtoReflect.Descriptor instead.

func (*MetricsResponse) GetCpuUnits

func (x *MetricsResponse) GetCpuUnits() string

func (*MetricsResponse) GetMemoryUnits

func (x *MetricsResponse) GetMemoryUnits() string

func (*MetricsResponse) GetPod

func (x *MetricsResponse) GetPod() *PodMetrics

func (*MetricsResponse) ProtoMessage

func (*MetricsResponse) ProtoMessage()

func (*MetricsResponse) ProtoReflect

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

func (*MetricsResponse) Reset

func (x *MetricsResponse) Reset()

func (*MetricsResponse) String

func (x *MetricsResponse) String() string

type MetricsServiceClient

type MetricsServiceClient interface {
	HealthCheck(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error)
	FetchMetrics(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*MetricsResponse, error)
}

MetricsServiceClient is the client API for MetricsService 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 MetricsServiceServer

type MetricsServiceServer interface {
	HealthCheck(context.Context, *Empty) (*HealthCheckResponse, error)
	FetchMetrics(context.Context, *Empty) (*MetricsResponse, error)
	// contains filtered or unexported methods
}

MetricsServiceServer is the server API for MetricsService service. All implementations must embed UnimplementedMetricsServiceServer for forward compatibility

type PodMetrics

type PodMetrics struct {
	Name                string              `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	CpuRaw              int64               `protobuf:"varint,2,opt,name=cpu_raw,json=cpuRaw,proto3" json:"cpu_raw,omitempty"`
	MemoryRaw           int64               `protobuf:"varint,3,opt,name=memory_raw,json=memoryRaw,proto3" json:"memory_raw,omitempty"`
	CpuHumanReadable    string              `protobuf:"bytes,4,opt,name=cpu_human_readable,json=cpuHumanReadable,proto3" json:"cpu_human_readable,omitempty"`
	MemoryHumanReadable string              `protobuf:"bytes,5,opt,name=memory_human_readable,json=memoryHumanReadable,proto3" json:"memory_human_readable,omitempty"`
	Containers          []*ContainerMetrics `protobuf:"bytes,6,rep,name=containers,proto3" json:"containers,omitempty"`
	// contains filtered or unexported fields
}

func (*PodMetrics) Descriptor deprecated

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

Deprecated: Use PodMetrics.ProtoReflect.Descriptor instead.

func (*PodMetrics) GetContainers

func (x *PodMetrics) GetContainers() []*ContainerMetrics

func (*PodMetrics) GetCpuHumanReadable

func (x *PodMetrics) GetCpuHumanReadable() string

func (*PodMetrics) GetCpuRaw

func (x *PodMetrics) GetCpuRaw() int64

func (*PodMetrics) GetMemoryHumanReadable

func (x *PodMetrics) GetMemoryHumanReadable() string

func (*PodMetrics) GetMemoryRaw

func (x *PodMetrics) GetMemoryRaw() int64

func (*PodMetrics) GetName

func (x *PodMetrics) GetName() string

func (*PodMetrics) ProtoMessage

func (*PodMetrics) ProtoMessage()

func (*PodMetrics) ProtoReflect

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

func (*PodMetrics) Reset

func (x *PodMetrics) Reset()

func (*PodMetrics) String

func (x *PodMetrics) String() string

type UnimplementedMetricsServiceServer

type UnimplementedMetricsServiceServer struct {
}

UnimplementedMetricsServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedMetricsServiceServer) FetchMetrics

func (UnimplementedMetricsServiceServer) HealthCheck

type UnsafeMetricsServiceServer

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

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

Jump to

Keyboard shortcuts

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