shared

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PluginConfigKeyGRPCTimeout is the config key used internaly to provide a
	// timeout value for GRPC calls
	PluginConfigKeyGRPCTimeout = "_nomad_autoscaler_grpc_timeout"
)

Variables

This section is empty.

Functions

func ActionMetaToProto

func ActionMetaToProto(input map[string]interface{}) (*anypb.Any, error)

ActionMetaToProto converts the input meta map to the proto equivalent.

func ProtoToActionMeta

func ProtoToActionMeta(input *anypb.Any) (map[string]interface{}, error)

ProtoToActionMeta converts the input proto any object and returns the meta map equivalent.

func ProtoToScalingAction

func ProtoToScalingAction(input *proto.ScalingAction) (sdk.ScalingAction, error)

ProtoToScalingAction converts the input proto ScalingAction object and returns the the Autoscaler equivalent.

func ProtoToScalingDirection

func ProtoToScalingDirection(input proto.ScalingDirection) (sdk.ScaleDirection, error)

ProtoToScalingDirection converts the input proto definition of ScalingDirection and returns the Autoscaler equivalent.

func ProtoToScalingPolicyCheck

func ProtoToScalingPolicyCheck(input *proto.ScalingPolicyCheck) (*sdk.ScalingPolicyCheck, error)

ProtoToScalingPolicyCheck converts the input proto ScalingPolicyCheck object and returns the the Autoscaler equivalent.

func ProtoToTimeRange

func ProtoToTimeRange(input *proto.TimeRange) (*sdk.TimeRange, error)

ProtoToTimeRange converts the input proto definition of TimeRange and returns the Autoscaler equivalent.

func ProtoToTimestampedMetrics

func ProtoToTimestampedMetrics(input []*proto.TimestampedMetric) sdk.TimestampedMetrics

ProtoToTimestampedMetrics converts the input proto TimestampedMetric object and returns the Autoscaler equivalent.

func ScalingActionToProto

func ScalingActionToProto(input sdk.ScalingAction) (*proto.ScalingAction, error)

ScalingActionToProto converts the input ScalingAction to the proto equivalent.

func ScalingDirectionToProto

func ScalingDirectionToProto(input sdk.ScaleDirection) (proto.ScalingDirection, error)

ScalingDirectionToProto converts the input scale direction to the proto equivalent.

func ScalingPolicyCheckToProto

func ScalingPolicyCheckToProto(input *sdk.ScalingPolicyCheck) *proto.ScalingPolicyCheck

ScalingPolicyCheckToProto converts the input ScalingPolicyCheck to the proto equivalent.

func TimeRangeToProto

func TimeRangeToProto(input sdk.TimeRange) (*proto.TimeRange, error)

TimeRangeToProto takes an input time range and converts it to the proto equivalent.

func TimestampedMetricsToProto

func TimestampedMetricsToProto(input sdk.TimestampedMetrics) []*proto.TimestampedMetric

TimestampedMetricsToProto converts the input TimestampedMetrics to the proto equivalent.

Types

This section is empty.

Directories

Path Synopsis
proto
v1

Jump to

Keyboard shortcuts

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