Documentation ¶
Index ¶
- Variables
- func RegisterNodeMetricsCapabilityServer(s grpc.ServiceRegistrar, srv NodeMetricsCapabilityServer)
- type ConfigStatus
- func (ConfigStatus) Descriptor() protoreflect.EnumDescriptor
- func (x ConfigStatus) Enum() *ConfigStatus
- func (ConfigStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x ConfigStatus) Number() protoreflect.EnumNumber
- func (x ConfigStatus) String() string
- func (ConfigStatus) Type() protoreflect.EnumType
- type MetricsCapabilityConfig
- func (*MetricsCapabilityConfig) Descriptor() ([]byte, []int)deprecated
- func (x *MetricsCapabilityConfig) GetConditions() []string
- func (x *MetricsCapabilityConfig) GetEnabled() bool
- func (x *MetricsCapabilityConfig) GetSpec() *MetricsCapabilitySpec
- func (*MetricsCapabilityConfig) ProtoMessage()
- func (x *MetricsCapabilityConfig) ProtoReflect() protoreflect.Message
- func (x *MetricsCapabilityConfig) Reset()
- func (x *MetricsCapabilityConfig) String() string
- type MetricsCapabilitySpec
- func (*MetricsCapabilitySpec) Descriptor() ([]byte, []int)deprecated
- func (x *MetricsCapabilitySpec) GetPrometheus() *PrometheusSpec
- func (x *MetricsCapabilitySpec) GetRules() *v1beta1.RulesSpec
- func (*MetricsCapabilitySpec) ProtoMessage()
- func (x *MetricsCapabilitySpec) ProtoReflect() protoreflect.Message
- func (x *MetricsCapabilitySpec) Reset()
- func (x *MetricsCapabilitySpec) String() string
- type NodeMetricsCapabilityClient
- type NodeMetricsCapabilityServer
- type PrometheusSpec
- func (*PrometheusSpec) Descriptor() ([]byte, []int)deprecated
- func (x *PrometheusSpec) GetDeploymentStrategy() string
- func (x *PrometheusSpec) GetImage() string
- func (*PrometheusSpec) ProtoMessage()
- func (x *PrometheusSpec) ProtoReflect() protoreflect.Message
- func (x *PrometheusSpec) Reset()
- func (x *PrometheusSpec) String() string
- type SyncRequest
- func (*SyncRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SyncRequest) GetCurrentConfig() *MetricsCapabilityConfig
- func (*SyncRequest) ProtoMessage()
- func (x *SyncRequest) ProtoReflect() protoreflect.Message
- func (x *SyncRequest) Reset()
- func (x *SyncRequest) String() string
- func (s *SyncRequest) Validate() error
- type SyncResponse
- func (*SyncResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SyncResponse) GetConfigStatus() ConfigStatus
- func (x *SyncResponse) GetUpdatedConfig() *MetricsCapabilityConfig
- func (*SyncResponse) ProtoMessage()
- func (x *SyncResponse) ProtoReflect() protoreflect.Message
- func (x *SyncResponse) Reset()
- func (x *SyncResponse) String() string
- type UnimplementedNodeMetricsCapabilityServer
- type UnsafeNodeMetricsCapabilityServer
Constants ¶
This section is empty.
Variables ¶
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.
var File_github_com_rancher_opni_plugins_metrics_pkg_apis_node_node_proto protoreflect.FileDescriptor
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 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) Descriptor() protoreflect.EnumDescriptor
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 (x ConfigStatus) Number() protoreflect.EnumNumber
func (ConfigStatus) String ¶
func (x ConfigStatus) String() string
func (ConfigStatus) Type ¶
func (ConfigStatus) Type() protoreflect.EnumType
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 (x *MetricsCapabilityConfig) GetSpec() *MetricsCapabilitySpec
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"` Prometheus *PrometheusSpec `protobuf:"bytes,2,opt,name=prometheus,proto3" json:"prometheus,omitempty"` // TODO: add config options for metrics capability here // contains filtered or unexported fields }
func (*MetricsCapabilitySpec) Descriptor
deprecated
func (*MetricsCapabilitySpec) Descriptor() ([]byte, []int)
Deprecated: Use MetricsCapabilitySpec.ProtoReflect.Descriptor instead.
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) String ¶
func (x *MetricsCapabilitySpec) String() string
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.
func NewNodeMetricsCapabilityClient ¶
func NewNodeMetricsCapabilityClient(cc grpc.ClientConnInterface) NodeMetricsCapabilityClient
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 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 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 UnimplementedNodeMetricsCapabilityServer ¶
type UnimplementedNodeMetricsCapabilityServer struct { }
UnimplementedNodeMetricsCapabilityServer must be embedded to have forward compatible implementations.
func (UnimplementedNodeMetricsCapabilityServer) Sync ¶
func (UnimplementedNodeMetricsCapabilityServer) Sync(context.Context, *SyncRequest) (*SyncResponse, error)
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.