Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GrpcClient ¶
type GrpcClient struct {
// contains filtered or unexported fields
}
func NewGrpcClient ¶
func NewGrpcClient(url, certDir, authority string, clientMetrics *grpcprom.ClientMetrics) (*GrpcClient, error)
func (*GrpcClient) GetMetrics ¶
func (c *GrpcClient) GetMetrics(ctx context.Context, scaledObjectName, scaledObjectNamespace, metricName string) (*external_metrics.ExternalMetricValueList, error)
func (*GrpcClient) GetServerURL ¶ added in v2.10.0
func (c *GrpcClient) GetServerURL() string
GetServerURL returns url of the gRPC server this client is connected to
func (*GrpcClient) WaitForConnectionReady ¶
WaitForConnectionReady waits for gRPC connection to be ready returns true if the connection was successful, false if we hit a timeut from context
type GrpcServer ¶
type GrpcServer struct { api.UnimplementedMetricsServiceServer // contains filtered or unexported fields }
func NewGrpcServer ¶
func NewGrpcServer(scaleHandler *scaling.ScaleHandler, address, certDir string, certsReady chan struct{}) GrpcServer
NewGrpcServer creates a new instance of GrpcServer
func (*GrpcServer) GetMetrics ¶
func (s *GrpcServer) GetMetrics(ctx context.Context, in *api.ScaledObjectRef) (*v1beta1.ExternalMetricValueList, error)
GetMetrics returns metrics values in form of ExternalMetricValueList for specified ScaledObject reference
func (*GrpcServer) NeedLeaderElection ¶
func (s *GrpcServer) NeedLeaderElection() bool
NeedLeaderElection is needed to implement LeaderElectionRunnable interface of controller-runtime. This assures that the component is started/stoped when this particular instance is selected/deselected as a leader.
Click to show internal directories.
Click to hide internal directories.