node

package
v0.10.0-rc5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	NodeConfiguration_GetDefaultConfiguration_FullMethodName = "/node.metrics.NodeConfiguration/GetDefaultConfiguration"
	NodeConfiguration_SetDefaultConfiguration_FullMethodName = "/node.metrics.NodeConfiguration/SetDefaultConfiguration"
	NodeConfiguration_GetNodeConfiguration_FullMethodName    = "/node.metrics.NodeConfiguration/GetNodeConfiguration"
	NodeConfiguration_SetNodeConfiguration_FullMethodName    = "/node.metrics.NodeConfiguration/SetNodeConfiguration"
)
View Source
const (
	NodeMetricsCapability_Sync_FullMethodName = "/node.metrics.NodeMetricsCapability/Sync"
)

Variables

View Source
var (
	ConfigStatus_name = map[int32]string{
		0: "Unknown",
		1: "UpToDate",
		2: "NeedsUpdate",
	}
	ConfigStatus_value = map[string]int32{
		"Unknown":     0,
		"UpToDate":    1,
		"NeedsUpdate": 2,
	}
)

Enum value maps for ConfigStatus.

View Source
var File_github_com_rancher_opni_plugins_metrics_pkg_apis_node_node_proto protoreflect.FileDescriptor
View Source
var NodeConfiguration_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "node.metrics.NodeConfiguration",
	HandlerType: (*NodeConfigurationServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetDefaultConfiguration",
			Handler:    _NodeConfiguration_GetDefaultConfiguration_Handler,
		},
		{
			MethodName: "SetDefaultConfiguration",
			Handler:    _NodeConfiguration_SetDefaultConfiguration_Handler,
		},
		{
			MethodName: "GetNodeConfiguration",
			Handler:    _NodeConfiguration_GetNodeConfiguration_Handler,
		},
		{
			MethodName: "SetNodeConfiguration",
			Handler:    _NodeConfiguration_SetNodeConfiguration_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "github.com/rancher/opni/plugins/metrics/pkg/apis/node/node.proto",
}

NodeConfiguration_ServiceDesc is the grpc.ServiceDesc for NodeConfiguration 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 NodeMetricsCapability_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "node.metrics.NodeMetricsCapability",
	HandlerType: (*NodeMetricsCapabilityServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Sync",
			Handler:    _NodeMetricsCapability_Sync_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "github.com/rancher/opni/plugins/metrics/pkg/apis/node/node.proto",
}

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

Functions

func CompatOTELStruct added in v0.9.2

func CompatOTELStruct(in *OTELSpec) *otel.OTELSpec

func DefaultConfigMetadata added in v0.9.2

func DefaultConfigMetadata() metadata.MD

func IsDefaultConfig added in v0.9.2

func IsDefaultConfig(trailer metadata.MD) bool

func RegisterNodeConfigurationServer added in v0.9.2

func RegisterNodeConfigurationServer(s grpc.ServiceRegistrar, srv NodeConfigurationServer)

func RegisterNodeMetricsCapabilityServer

func RegisterNodeMetricsCapabilityServer(s grpc.ServiceRegistrar, srv NodeMetricsCapabilityServer)

Types

type ConfigStatus

type ConfigStatus int32
const (
	ConfigStatus_Unknown     ConfigStatus = 0
	ConfigStatus_UpToDate    ConfigStatus = 1
	ConfigStatus_NeedsUpdate ConfigStatus = 2
)

func (ConfigStatus) Descriptor

func (ConfigStatus) Enum

func (x ConfigStatus) Enum() *ConfigStatus

func (ConfigStatus) EnumDescriptor deprecated

func (ConfigStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use ConfigStatus.Descriptor instead.

func (ConfigStatus) Number

func (ConfigStatus) String

func (x ConfigStatus) String() string

func (ConfigStatus) Type

type MetricsCapabilityConfig

type MetricsCapabilityConfig struct {
	Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	// If enabled is false, conditions may contain a list of relevant status
	// messages describing why the capability is disabled.
	Conditions []string               `protobuf:"bytes,2,rep,name=conditions,proto3" json:"conditions,omitempty"`
	Spec       *MetricsCapabilitySpec `protobuf:"bytes,3,opt,name=spec,proto3" json:"spec,omitempty"`
	// contains filtered or unexported fields
}

func (*MetricsCapabilityConfig) Descriptor deprecated

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

Deprecated: Use MetricsCapabilityConfig.ProtoReflect.Descriptor instead.

func (*MetricsCapabilityConfig) GetConditions

func (x *MetricsCapabilityConfig) GetConditions() []string

func (*MetricsCapabilityConfig) GetEnabled

func (x *MetricsCapabilityConfig) GetEnabled() bool

func (*MetricsCapabilityConfig) GetSpec

func (*MetricsCapabilityConfig) ProtoMessage

func (*MetricsCapabilityConfig) ProtoMessage()

func (*MetricsCapabilityConfig) ProtoReflect

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

func (*MetricsCapabilityConfig) Reset

func (x *MetricsCapabilityConfig) Reset()

func (*MetricsCapabilityConfig) String

func (x *MetricsCapabilityConfig) String() string

type MetricsCapabilitySpec

type MetricsCapabilitySpec struct {
	Rules *v1beta1.RulesSpec `protobuf:"bytes,1,opt,name=rules,proto3" json:"rules,omitempty"`
	// Types that are assignable to Driver:
	//
	//	*MetricsCapabilitySpec_Prometheus
	//	*MetricsCapabilitySpec_Otel
	Driver isMetricsCapabilitySpec_Driver `protobuf_oneof:"driver"`
	// contains filtered or unexported fields
}

func (*MetricsCapabilitySpec) Descriptor deprecated

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

Deprecated: Use MetricsCapabilitySpec.ProtoReflect.Descriptor instead.

func (*MetricsCapabilitySpec) GetDriver added in v0.10.0

func (m *MetricsCapabilitySpec) GetDriver() isMetricsCapabilitySpec_Driver

func (*MetricsCapabilitySpec) GetOtel added in v0.9.2

func (x *MetricsCapabilitySpec) GetOtel() *OTELSpec

func (*MetricsCapabilitySpec) GetPrometheus

func (x *MetricsCapabilitySpec) GetPrometheus() *PrometheusSpec

func (*MetricsCapabilitySpec) GetRules

func (x *MetricsCapabilitySpec) GetRules() *v1beta1.RulesSpec

func (*MetricsCapabilitySpec) ProtoMessage

func (*MetricsCapabilitySpec) ProtoMessage()

func (*MetricsCapabilitySpec) ProtoReflect

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

func (*MetricsCapabilitySpec) Reset

func (x *MetricsCapabilitySpec) Reset()

func (*MetricsCapabilitySpec) RuleDiscoveryEnabled added in v0.10.0

func (m *MetricsCapabilitySpec) RuleDiscoveryEnabled() bool

func (*MetricsCapabilitySpec) String

func (x *MetricsCapabilitySpec) String() string

func (*MetricsCapabilitySpec) Validate added in v0.9.2

func (m *MetricsCapabilitySpec) Validate() error

type MetricsCapabilitySpec_Otel added in v0.10.0

type MetricsCapabilitySpec_Otel struct {
	Otel *OTELSpec `protobuf:"bytes,3,opt,name=otel,proto3,oneof"`
}

type MetricsCapabilitySpec_Prometheus added in v0.10.0

type MetricsCapabilitySpec_Prometheus struct {
	Prometheus *PrometheusSpec `protobuf:"bytes,2,opt,name=prometheus,proto3,oneof"`
}

type NodeConfigRequest added in v0.9.2

type NodeConfigRequest struct {
	Node *v1.Reference `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
	// Can be set to nil to use the default configuration for this node.
	Spec *MetricsCapabilitySpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"`
	// contains filtered or unexported fields
}

func (*NodeConfigRequest) Descriptor deprecated added in v0.9.2

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

Deprecated: Use NodeConfigRequest.ProtoReflect.Descriptor instead.

func (*NodeConfigRequest) GetNode added in v0.9.2

func (x *NodeConfigRequest) GetNode() *v1.Reference

func (*NodeConfigRequest) GetSpec added in v0.9.2

func (*NodeConfigRequest) ProtoMessage added in v0.9.2

func (*NodeConfigRequest) ProtoMessage()

func (*NodeConfigRequest) ProtoReflect added in v0.9.2

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

func (*NodeConfigRequest) Reset added in v0.9.2

func (x *NodeConfigRequest) Reset()

func (*NodeConfigRequest) String added in v0.9.2

func (x *NodeConfigRequest) String() string

type NodeConfigurationClient added in v0.9.2

type NodeConfigurationClient interface {
	GetDefaultConfiguration(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*MetricsCapabilitySpec, error)
	SetDefaultConfiguration(ctx context.Context, in *MetricsCapabilitySpec, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetNodeConfiguration(ctx context.Context, in *v1.Reference, opts ...grpc.CallOption) (*MetricsCapabilitySpec, error)
	SetNodeConfiguration(ctx context.Context, in *NodeConfigRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

NodeConfigurationClient is the client API for NodeConfiguration 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 NewNodeConfigurationClient added in v0.9.2

func NewNodeConfigurationClient(cc grpc.ClientConnInterface) NodeConfigurationClient

type NodeConfigurationServer added in v0.9.2

type NodeConfigurationServer interface {
	GetDefaultConfiguration(context.Context, *emptypb.Empty) (*MetricsCapabilitySpec, error)
	SetDefaultConfiguration(context.Context, *MetricsCapabilitySpec) (*emptypb.Empty, error)
	GetNodeConfiguration(context.Context, *v1.Reference) (*MetricsCapabilitySpec, error)
	SetNodeConfiguration(context.Context, *NodeConfigRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

NodeConfigurationServer is the server API for NodeConfiguration service. All implementations must embed UnimplementedNodeConfigurationServer for forward compatibility

type NodeMetricsCapabilityClient

type NodeMetricsCapabilityClient interface {
	Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error)
}

NodeMetricsCapabilityClient is the client API for NodeMetricsCapability 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 NodeMetricsCapabilityServer

type NodeMetricsCapabilityServer interface {
	Sync(context.Context, *SyncRequest) (*SyncResponse, error)
	// contains filtered or unexported methods
}

NodeMetricsCapabilityServer is the server API for NodeMetricsCapability service. All implementations must embed UnimplementedNodeMetricsCapabilityServer for forward compatibility

type OTELSpec added in v0.9.2

type OTELSpec struct {
	AdditionalScrapeConfigs []*ScrapeConfig `protobuf:"bytes,1,rep,name=additionalScrapeConfigs,proto3" json:"additionalScrapeConfigs,omitempty"`
	Wal                     *WALConfig      `protobuf:"bytes,2,opt,name=wal,proto3" json:"wal,omitempty"`
	HostMetrics             *bool           `protobuf:"varint,3,opt,name=hostMetrics,proto3,oneof" json:"hostMetrics,omitempty"`
	// contains filtered or unexported fields
}

func (*OTELSpec) DeepCopyInto added in v0.9.2

func (in *OTELSpec) DeepCopyInto(out *OTELSpec)

func (*OTELSpec) Descriptor deprecated added in v0.9.2

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

Deprecated: Use OTELSpec.ProtoReflect.Descriptor instead.

func (*OTELSpec) GetAdditionalScrapeConfigs added in v0.9.2

func (x *OTELSpec) GetAdditionalScrapeConfigs() []*ScrapeConfig

func (*OTELSpec) GetHostMetrics added in v0.9.2

func (x *OTELSpec) GetHostMetrics() bool

func (*OTELSpec) GetWal added in v0.9.2

func (x *OTELSpec) GetWal() *WALConfig

func (*OTELSpec) ProtoMessage added in v0.9.2

func (*OTELSpec) ProtoMessage()

func (*OTELSpec) ProtoReflect added in v0.9.2

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

func (*OTELSpec) Reset added in v0.9.2

func (x *OTELSpec) Reset()

func (*OTELSpec) String added in v0.9.2

func (x *OTELSpec) String() string

func (*OTELSpec) Validate added in v0.9.2

func (o *OTELSpec) Validate() error

type PrometheusSpec

type PrometheusSpec struct {

	// default: quay.io/prometheus/prometheus:latest
	Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
	// can be one of: ["externalPromOperator"]
	DeploymentStrategy string `protobuf:"bytes,2,opt,name=deploymentStrategy,proto3" json:"deploymentStrategy,omitempty"`
	// contains filtered or unexported fields
}

func (*PrometheusSpec) Descriptor deprecated

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

Deprecated: Use PrometheusSpec.ProtoReflect.Descriptor instead.

func (*PrometheusSpec) GetDeploymentStrategy

func (x *PrometheusSpec) GetDeploymentStrategy() string

func (*PrometheusSpec) GetImage

func (x *PrometheusSpec) GetImage() string

func (*PrometheusSpec) ProtoMessage

func (*PrometheusSpec) ProtoMessage()

func (*PrometheusSpec) ProtoReflect

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

func (*PrometheusSpec) Reset

func (x *PrometheusSpec) Reset()

func (*PrometheusSpec) String

func (x *PrometheusSpec) String() string

type ScrapeConfig added in v0.9.2

type ScrapeConfig struct {
	JobName        string   `protobuf:"bytes,1,opt,name=jobName,proto3" json:"jobName,omitempty"`
	Targets        []string `protobuf:"bytes,2,rep,name=targets,proto3" json:"targets,omitempty"`
	ScrapeInterval string   `protobuf:"bytes,3,opt,name=scrapeInterval,proto3" json:"scrapeInterval,omitempty"`
	// contains filtered or unexported fields
}

func (*ScrapeConfig) Descriptor deprecated added in v0.9.2

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

Deprecated: Use ScrapeConfig.ProtoReflect.Descriptor instead.

func (*ScrapeConfig) GetJobName added in v0.9.2

func (x *ScrapeConfig) GetJobName() string

func (*ScrapeConfig) GetScrapeInterval added in v0.9.2

func (x *ScrapeConfig) GetScrapeInterval() string

func (*ScrapeConfig) GetTargets added in v0.9.2

func (x *ScrapeConfig) GetTargets() []string

func (*ScrapeConfig) ProtoMessage added in v0.9.2

func (*ScrapeConfig) ProtoMessage()

func (*ScrapeConfig) ProtoReflect added in v0.9.2

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

func (*ScrapeConfig) Reset added in v0.9.2

func (x *ScrapeConfig) Reset()

func (*ScrapeConfig) String added in v0.9.2

func (x *ScrapeConfig) String() string

func (*ScrapeConfig) Validate added in v0.9.2

func (s *ScrapeConfig) Validate() error

type SyncRequest

type SyncRequest struct {
	CurrentConfig *MetricsCapabilityConfig `protobuf:"bytes,1,opt,name=currentConfig,proto3" json:"currentConfig,omitempty"`
	// contains filtered or unexported fields
}

func (*SyncRequest) Descriptor deprecated

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

Deprecated: Use SyncRequest.ProtoReflect.Descriptor instead.

func (*SyncRequest) GetCurrentConfig

func (x *SyncRequest) GetCurrentConfig() *MetricsCapabilityConfig

func (*SyncRequest) ProtoMessage

func (*SyncRequest) ProtoMessage()

func (*SyncRequest) ProtoReflect

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

func (*SyncRequest) Reset

func (x *SyncRequest) Reset()

func (*SyncRequest) String

func (x *SyncRequest) String() string

func (*SyncRequest) Validate

func (s *SyncRequest) Validate() error

type SyncResponse

type SyncResponse struct {
	ConfigStatus  ConfigStatus             `protobuf:"varint,1,opt,name=configStatus,proto3,enum=node.metrics.ConfigStatus" json:"configStatus,omitempty"`
	UpdatedConfig *MetricsCapabilityConfig `protobuf:"bytes,2,opt,name=updatedConfig,proto3" json:"updatedConfig,omitempty"`
	// contains filtered or unexported fields
}

func (*SyncResponse) Descriptor deprecated

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

Deprecated: Use SyncResponse.ProtoReflect.Descriptor instead.

func (*SyncResponse) GetConfigStatus

func (x *SyncResponse) GetConfigStatus() ConfigStatus

func (*SyncResponse) GetUpdatedConfig

func (x *SyncResponse) GetUpdatedConfig() *MetricsCapabilityConfig

func (*SyncResponse) ProtoMessage

func (*SyncResponse) ProtoMessage()

func (*SyncResponse) ProtoReflect

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

func (*SyncResponse) Reset

func (x *SyncResponse) Reset()

func (*SyncResponse) String

func (x *SyncResponse) String() string

type UnimplementedNodeConfigurationServer added in v0.9.2

type UnimplementedNodeConfigurationServer struct {
}

UnimplementedNodeConfigurationServer must be embedded to have forward compatible implementations.

func (UnimplementedNodeConfigurationServer) GetDefaultConfiguration added in v0.9.2

func (UnimplementedNodeConfigurationServer) GetNodeConfiguration added in v0.9.2

func (UnimplementedNodeConfigurationServer) SetDefaultConfiguration added in v0.9.2

func (UnimplementedNodeConfigurationServer) SetNodeConfiguration added in v0.9.2

type UnimplementedNodeMetricsCapabilityServer

type UnimplementedNodeMetricsCapabilityServer struct {
}

UnimplementedNodeMetricsCapabilityServer must be embedded to have forward compatible implementations.

func (UnimplementedNodeMetricsCapabilityServer) Sync

type UnsafeNodeConfigurationServer added in v0.9.2

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

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

type UnsafeNodeMetricsCapabilityServer

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

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

type WALConfig added in v0.9.2

type WALConfig struct {
	Enabled           bool                 `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	BufferSize        int64                `protobuf:"varint,2,opt,name=bufferSize,proto3" json:"bufferSize,omitempty"`
	TruncateFrequency *durationpb.Duration `protobuf:"bytes,3,opt,name=truncateFrequency,proto3" json:"truncateFrequency,omitempty"`
	// contains filtered or unexported fields
}

func (*WALConfig) Descriptor deprecated added in v0.9.2

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

Deprecated: Use WALConfig.ProtoReflect.Descriptor instead.

func (*WALConfig) GetBufferSize added in v0.9.2

func (x *WALConfig) GetBufferSize() int64

func (*WALConfig) GetEnabled added in v0.9.2

func (x *WALConfig) GetEnabled() bool

func (*WALConfig) GetTruncateFrequency added in v0.9.2

func (x *WALConfig) GetTruncateFrequency() *durationpb.Duration

func (*WALConfig) ProtoMessage added in v0.9.2

func (*WALConfig) ProtoMessage()

func (*WALConfig) ProtoReflect added in v0.9.2

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

func (*WALConfig) Reset added in v0.9.2

func (x *WALConfig) Reset()

func (*WALConfig) String added in v0.9.2

func (x *WALConfig) String() string

func (*WALConfig) Validate added in v0.9.2

func (w *WALConfig) Validate() error

Jump to

Keyboard shortcuts

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