lbv1

package
v1.33.0-20240412200742... Latest Latest
Warning

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

Go to latest
Published: unknown License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InitialLoadReportResponse_ImplementationIdentifier_name = map[int32]string{
		0: "IMPL_UNSPECIFIED",
		1: "CPP",
		2: "JAVA",
		3: "GO",
	}
	InitialLoadReportResponse_ImplementationIdentifier_value = map[string]int32{
		"IMPL_UNSPECIFIED": 0,
		"CPP":              1,
		"JAVA":             2,
		"GO":               3,
	}
)

Enum value maps for InitialLoadReportResponse_ImplementationIdentifier.

View Source
var File_grpc_lb_v1_load_balancer_proto protoreflect.FileDescriptor
View Source
var File_grpc_lb_v1_load_reporter_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type CallMetricData

type CallMetricData struct {

	// Name of the metric; may be empty.
	MetricName string `protobuf:"bytes,1,opt,name=metric_name,json=metricName,proto3" json:"metric_name,omitempty"`
	// Number of calls that finished and included this metric.
	NumCallsFinishedWithMetric int64 `` /* 146-byte string literal not displayed */
	// Sum of metric values across all calls that finished with this metric.
	TotalMetricValue float64 `protobuf:"fixed64,3,opt,name=total_metric_value,json=totalMetricValue,proto3" json:"total_metric_value,omitempty"`
	// contains filtered or unexported fields
}

func (*CallMetricData) Descriptor deprecated

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

Deprecated: Use CallMetricData.ProtoReflect.Descriptor instead.

func (*CallMetricData) GetMetricName

func (x *CallMetricData) GetMetricName() string

func (*CallMetricData) GetNumCallsFinishedWithMetric

func (x *CallMetricData) GetNumCallsFinishedWithMetric() int64

func (*CallMetricData) GetTotalMetricValue

func (x *CallMetricData) GetTotalMetricValue() float64

func (*CallMetricData) ProtoMessage

func (*CallMetricData) ProtoMessage()

func (*CallMetricData) ProtoReflect

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

func (*CallMetricData) Reset

func (x *CallMetricData) Reset()

func (*CallMetricData) String

func (x *CallMetricData) String() string

type ClientStats

type ClientStats struct {

	// The timestamp of generating the report.
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// The total number of RPCs that started.
	NumCallsStarted int64 `protobuf:"varint,2,opt,name=num_calls_started,json=numCallsStarted,proto3" json:"num_calls_started,omitempty"`
	// The total number of RPCs that finished.
	NumCallsFinished int64 `protobuf:"varint,3,opt,name=num_calls_finished,json=numCallsFinished,proto3" json:"num_calls_finished,omitempty"`
	// The total number of RPCs that failed to reach a server except dropped RPCs.
	NumCallsFinishedWithClientFailedToSend int64 `` /* 188-byte string literal not displayed */
	// The total number of RPCs that finished and are known to have been received
	// by a server.
	NumCallsFinishedKnownReceived int64 `` /* 155-byte string literal not displayed */
	// The list of dropped calls.
	CallsFinishedWithDrop []*ClientStatsPerToken `` /* 128-byte string literal not displayed */
	// contains filtered or unexported fields
}

Contains client level statistics that are useful to load balancing. Each count except the timestamp should be reset to zero after reporting the stats.

func (*ClientStats) Descriptor deprecated

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

Deprecated: Use ClientStats.ProtoReflect.Descriptor instead.

func (*ClientStats) GetCallsFinishedWithDrop

func (x *ClientStats) GetCallsFinishedWithDrop() []*ClientStatsPerToken

func (*ClientStats) GetNumCallsFinished

func (x *ClientStats) GetNumCallsFinished() int64

func (*ClientStats) GetNumCallsFinishedKnownReceived

func (x *ClientStats) GetNumCallsFinishedKnownReceived() int64

func (*ClientStats) GetNumCallsFinishedWithClientFailedToSend

func (x *ClientStats) GetNumCallsFinishedWithClientFailedToSend() int64

func (*ClientStats) GetNumCallsStarted

func (x *ClientStats) GetNumCallsStarted() int64

func (*ClientStats) GetTimestamp

func (x *ClientStats) GetTimestamp() *timestamppb.Timestamp

func (*ClientStats) ProtoMessage

func (*ClientStats) ProtoMessage()

func (*ClientStats) ProtoReflect

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

func (*ClientStats) Reset

func (x *ClientStats) Reset()

func (*ClientStats) String

func (x *ClientStats) String() string

type ClientStatsPerToken

type ClientStatsPerToken struct {

	// See Server.load_balance_token.
	LoadBalanceToken string `protobuf:"bytes,1,opt,name=load_balance_token,json=loadBalanceToken,proto3" json:"load_balance_token,omitempty"`
	// The total number of RPCs that finished associated with the token.
	NumCalls int64 `protobuf:"varint,2,opt,name=num_calls,json=numCalls,proto3" json:"num_calls,omitempty"`
	// contains filtered or unexported fields
}

Contains the number of calls finished for a particular load balance token.

func (*ClientStatsPerToken) Descriptor deprecated

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

Deprecated: Use ClientStatsPerToken.ProtoReflect.Descriptor instead.

func (*ClientStatsPerToken) GetLoadBalanceToken

func (x *ClientStatsPerToken) GetLoadBalanceToken() string

func (*ClientStatsPerToken) GetNumCalls

func (x *ClientStatsPerToken) GetNumCalls() int64

func (*ClientStatsPerToken) ProtoMessage

func (*ClientStatsPerToken) ProtoMessage()

func (*ClientStatsPerToken) ProtoReflect

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

func (*ClientStatsPerToken) Reset

func (x *ClientStatsPerToken) Reset()

func (*ClientStatsPerToken) String

func (x *ClientStatsPerToken) String() string

type FallbackResponse

type FallbackResponse struct {
	// contains filtered or unexported fields
}

func (*FallbackResponse) Descriptor deprecated

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

Deprecated: Use FallbackResponse.ProtoReflect.Descriptor instead.

func (*FallbackResponse) ProtoMessage

func (*FallbackResponse) ProtoMessage()

func (*FallbackResponse) ProtoReflect

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

func (*FallbackResponse) Reset

func (x *FallbackResponse) Reset()

func (*FallbackResponse) String

func (x *FallbackResponse) String() string

type InitialLoadBalanceRequest

type InitialLoadBalanceRequest struct {

	// The name of the load balanced service (e.g., service.googleapis.com). Its
	// length should be less than 256 bytes.
	// The name might include a port number. How to handle the port number is up
	// to the balancer.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*InitialLoadBalanceRequest) Descriptor deprecated

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

Deprecated: Use InitialLoadBalanceRequest.ProtoReflect.Descriptor instead.

func (*InitialLoadBalanceRequest) GetName

func (x *InitialLoadBalanceRequest) GetName() string

func (*InitialLoadBalanceRequest) ProtoMessage

func (*InitialLoadBalanceRequest) ProtoMessage()

func (*InitialLoadBalanceRequest) ProtoReflect

func (*InitialLoadBalanceRequest) Reset

func (x *InitialLoadBalanceRequest) Reset()

func (*InitialLoadBalanceRequest) String

func (x *InitialLoadBalanceRequest) String() string

type InitialLoadBalanceResponse

type InitialLoadBalanceResponse struct {

	// This interval defines how often the client should send the client stats
	// to the load balancer. Stats should only be reported when the duration is
	// positive.
	ClientStatsReportInterval *durationpb.Duration `` /* 140-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*InitialLoadBalanceResponse) Descriptor deprecated

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

Deprecated: Use InitialLoadBalanceResponse.ProtoReflect.Descriptor instead.

func (*InitialLoadBalanceResponse) GetClientStatsReportInterval

func (x *InitialLoadBalanceResponse) GetClientStatsReportInterval() *durationpb.Duration

func (*InitialLoadBalanceResponse) ProtoMessage

func (*InitialLoadBalanceResponse) ProtoMessage()

func (*InitialLoadBalanceResponse) ProtoReflect

func (*InitialLoadBalanceResponse) Reset

func (x *InitialLoadBalanceResponse) Reset()

func (*InitialLoadBalanceResponse) String

func (x *InitialLoadBalanceResponse) String() string

type InitialLoadReportRequest

type InitialLoadReportRequest struct {

	// The hostname this load reporter client is requesting load for.
	LoadBalancedHostname string `protobuf:"bytes,1,opt,name=load_balanced_hostname,json=loadBalancedHostname,proto3" json:"load_balanced_hostname,omitempty"`
	// Additional information to disambiguate orphaned load: load that should have
	// gone to this load reporter client, but was not able to be sent since the
	// load reporter client has disconnected. load_key is sent in orphaned load
	// reports; see Load.load_key.
	LoadKey []byte `protobuf:"bytes,2,opt,name=load_key,json=loadKey,proto3" json:"load_key,omitempty"`
	// This interval defines how often the server should send load reports to
	// the load balancer.
	LoadReportInterval *durationpb.Duration `protobuf:"bytes,3,opt,name=load_report_interval,json=loadReportInterval,proto3" json:"load_report_interval,omitempty"`
	// contains filtered or unexported fields
}

func (*InitialLoadReportRequest) Descriptor deprecated

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

Deprecated: Use InitialLoadReportRequest.ProtoReflect.Descriptor instead.

func (*InitialLoadReportRequest) GetLoadBalancedHostname

func (x *InitialLoadReportRequest) GetLoadBalancedHostname() string

func (*InitialLoadReportRequest) GetLoadKey

func (x *InitialLoadReportRequest) GetLoadKey() []byte

func (*InitialLoadReportRequest) GetLoadReportInterval

func (x *InitialLoadReportRequest) GetLoadReportInterval() *durationpb.Duration

func (*InitialLoadReportRequest) ProtoMessage

func (*InitialLoadReportRequest) ProtoMessage()

func (*InitialLoadReportRequest) ProtoReflect

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

func (*InitialLoadReportRequest) Reset

func (x *InitialLoadReportRequest) Reset()

func (*InitialLoadReportRequest) String

func (x *InitialLoadReportRequest) String() string

type InitialLoadReportResponse

type InitialLoadReportResponse struct {

	// Initial response returns the Load balancer ID. This must be plain text
	// (printable ASCII).
	LoadBalancerId string `protobuf:"bytes,1,opt,name=load_balancer_id,json=loadBalancerId,proto3" json:"load_balancer_id,omitempty"`
	// Optional identifier of this implementation of the load reporting server.
	ImplementationId InitialLoadReportResponse_ImplementationIdentifier `` /* 177-byte string literal not displayed */
	// Optional server_version should be a value that is modified (and
	// monotonically increased) when changes are made to the server
	// implementation.
	ServerVersion int64 `protobuf:"varint,3,opt,name=server_version,json=serverVersion,proto3" json:"server_version,omitempty"`
	// contains filtered or unexported fields
}

func (*InitialLoadReportResponse) Descriptor deprecated

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

Deprecated: Use InitialLoadReportResponse.ProtoReflect.Descriptor instead.

func (*InitialLoadReportResponse) GetImplementationId

func (*InitialLoadReportResponse) GetLoadBalancerId

func (x *InitialLoadReportResponse) GetLoadBalancerId() string

func (*InitialLoadReportResponse) GetServerVersion

func (x *InitialLoadReportResponse) GetServerVersion() int64

func (*InitialLoadReportResponse) ProtoMessage

func (*InitialLoadReportResponse) ProtoMessage()

func (*InitialLoadReportResponse) ProtoReflect

func (*InitialLoadReportResponse) Reset

func (x *InitialLoadReportResponse) Reset()

func (*InitialLoadReportResponse) String

func (x *InitialLoadReportResponse) String() string

type InitialLoadReportResponse_ImplementationIdentifier

type InitialLoadReportResponse_ImplementationIdentifier int32
const (
	InitialLoadReportResponse_IMPL_UNSPECIFIED InitialLoadReportResponse_ImplementationIdentifier = 0
	InitialLoadReportResponse_CPP              InitialLoadReportResponse_ImplementationIdentifier = 1 // Standard Google C++ implementation.
	InitialLoadReportResponse_JAVA             InitialLoadReportResponse_ImplementationIdentifier = 2 // Standard Google Java implementation.
	InitialLoadReportResponse_GO               InitialLoadReportResponse_ImplementationIdentifier = 3 // Standard Google Go implementation.
)

func (InitialLoadReportResponse_ImplementationIdentifier) Descriptor

func (InitialLoadReportResponse_ImplementationIdentifier) Enum

func (InitialLoadReportResponse_ImplementationIdentifier) EnumDescriptor deprecated

Deprecated: Use InitialLoadReportResponse_ImplementationIdentifier.Descriptor instead.

func (InitialLoadReportResponse_ImplementationIdentifier) Number

func (InitialLoadReportResponse_ImplementationIdentifier) String

func (InitialLoadReportResponse_ImplementationIdentifier) Type

type Load

type Load struct {

	// The (plain text) tag used by the calls covered by this load report. The
	// tag is that part of the load balancer token after removing the load
	// balancer id. Empty is equivalent to non-existent tag.
	LoadBalanceTag string `protobuf:"bytes,1,opt,name=load_balance_tag,json=loadBalanceTag,proto3" json:"load_balance_tag,omitempty"`
	// The user identity authenticated by the calls covered by this load
	// report. Empty is equivalent to no known user_id.
	UserId string `protobuf:"bytes,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// IP address of the client that sent these requests, serialized in
	// network-byte-order. It may either be an IPv4 or IPv6 address.
	ClientIpAddress []byte `protobuf:"bytes,15,opt,name=client_ip_address,json=clientIpAddress,proto3" json:"client_ip_address,omitempty"`
	// The number of calls started (since the last report) with the given tag and
	// user_id.
	NumCallsStarted int64 `protobuf:"varint,4,opt,name=num_calls_started,json=numCallsStarted,proto3" json:"num_calls_started,omitempty"`
	// Indicates whether this load report is an in-progress load report in which
	// num_calls_in_progress is the only valid entry. If in_progress_report is not
	// set, num_calls_in_progress will be ignored. If in_progress_report is set,
	// fields other than num_calls_in_progress and orphaned_load will be ignored.
	// TODO(juanlishen): A Load is either an in_progress_report or not. We should
	// make this explicit in hierarchy. From the log, I see in_progress_report_
	// has a random num_calls_in_progress_ when not set, which might lead to bug
	// when the balancer process the load report.
	//
	// Types that are assignable to InProgressReport:
	//
	//	*Load_NumCallsInProgress
	InProgressReport isLoad_InProgressReport `protobuf_oneof:"in_progress_report"`
	// The following values are counts or totals of call statistics that finished
	// with the given tag and user_id.
	NumCallsFinishedWithoutError int64 `` // Calls with status OK.
	/* 152-byte string literal not displayed */
	NumCallsFinishedWithError int64 `` // Calls with status non-OK.
	/* 143-byte string literal not displayed */
	// Calls that finished with a status that maps to HTTP 5XX (see
	// googleapis/google/rpc/code.proto). Note that this is a subset of
	// num_calls_finished_with_error.
	NumCallsFinishedWithServerError int64 `` /* 164-byte string literal not displayed */
	// Totals are from calls that with _and_ without error.
	TotalBytesSent     int64                `protobuf:"varint,8,opt,name=total_bytes_sent,json=totalBytesSent,proto3" json:"total_bytes_sent,omitempty"`
	TotalBytesReceived int64                `protobuf:"varint,9,opt,name=total_bytes_received,json=totalBytesReceived,proto3" json:"total_bytes_received,omitempty"`
	TotalLatency       *durationpb.Duration `protobuf:"bytes,10,opt,name=total_latency,json=totalLatency,proto3" json:"total_latency,omitempty"`
	// Optional metrics reported for the call(s). Requires that metric_name is
	// unique.
	MetricData []*CallMetricData `protobuf:"bytes,11,rep,name=metric_data,json=metricData,proto3" json:"metric_data,omitempty"`
	// The following two fields are used for reporting orphaned load: load that
	// could not be reported to the originating balancer either since the balancer
	// is no longer connected or because the frontend sent an invalid token. These
	// fields must not be set with normal (unorphaned) load reports.
	//
	// Types that are assignable to OrphanedLoad:
	//
	//	*Load_LoadKey
	//	*Load_LoadKeyUnknown
	//	*Load_OrphanedLoadIdentifier
	OrphanedLoad isLoad_OrphanedLoad `protobuf_oneof:"orphaned_load"`
	// contains filtered or unexported fields
}

func (*Load) Descriptor deprecated

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

Deprecated: Use Load.ProtoReflect.Descriptor instead.

func (*Load) GetClientIpAddress

func (x *Load) GetClientIpAddress() []byte

func (*Load) GetInProgressReport

func (m *Load) GetInProgressReport() isLoad_InProgressReport

func (*Load) GetLoadBalanceTag

func (x *Load) GetLoadBalanceTag() string

func (*Load) GetLoadKey deprecated

func (x *Load) GetLoadKey() []byte

Deprecated: Marked as deprecated in grpc/lb/v1/load_reporter.proto.

func (*Load) GetLoadKeyUnknown

func (x *Load) GetLoadKeyUnknown() bool

func (*Load) GetMetricData

func (x *Load) GetMetricData() []*CallMetricData

func (*Load) GetNumCallsFinishedWithError

func (x *Load) GetNumCallsFinishedWithError() int64

func (*Load) GetNumCallsFinishedWithServerError

func (x *Load) GetNumCallsFinishedWithServerError() int64

func (*Load) GetNumCallsFinishedWithoutError

func (x *Load) GetNumCallsFinishedWithoutError() int64

func (*Load) GetNumCallsInProgress

func (x *Load) GetNumCallsInProgress() int64

func (*Load) GetNumCallsStarted

func (x *Load) GetNumCallsStarted() int64

func (*Load) GetOrphanedLoad

func (m *Load) GetOrphanedLoad() isLoad_OrphanedLoad

func (*Load) GetOrphanedLoadIdentifier

func (x *Load) GetOrphanedLoadIdentifier() *OrphanedLoadIdentifier

func (*Load) GetTotalBytesReceived

func (x *Load) GetTotalBytesReceived() int64

func (*Load) GetTotalBytesSent

func (x *Load) GetTotalBytesSent() int64

func (*Load) GetTotalLatency

func (x *Load) GetTotalLatency() *durationpb.Duration

func (*Load) GetUserId

func (x *Load) GetUserId() string

func (*Load) ProtoMessage

func (*Load) ProtoMessage()

func (*Load) ProtoReflect

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

func (*Load) Reset

func (x *Load) Reset()

func (*Load) String

func (x *Load) String() string

type LoadBalanceRequest

type LoadBalanceRequest struct {

	// Types that are assignable to LoadBalanceRequestType:
	//
	//	*LoadBalanceRequest_InitialRequest
	//	*LoadBalanceRequest_ClientStats
	LoadBalanceRequestType isLoadBalanceRequest_LoadBalanceRequestType `protobuf_oneof:"load_balance_request_type"`
	// contains filtered or unexported fields
}

func (*LoadBalanceRequest) Descriptor deprecated

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

Deprecated: Use LoadBalanceRequest.ProtoReflect.Descriptor instead.

func (*LoadBalanceRequest) GetClientStats

func (x *LoadBalanceRequest) GetClientStats() *ClientStats

func (*LoadBalanceRequest) GetInitialRequest

func (x *LoadBalanceRequest) GetInitialRequest() *InitialLoadBalanceRequest

func (*LoadBalanceRequest) GetLoadBalanceRequestType

func (m *LoadBalanceRequest) GetLoadBalanceRequestType() isLoadBalanceRequest_LoadBalanceRequestType

func (*LoadBalanceRequest) ProtoMessage

func (*LoadBalanceRequest) ProtoMessage()

func (*LoadBalanceRequest) ProtoReflect

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

func (*LoadBalanceRequest) Reset

func (x *LoadBalanceRequest) Reset()

func (*LoadBalanceRequest) String

func (x *LoadBalanceRequest) String() string

type LoadBalanceRequest_ClientStats

type LoadBalanceRequest_ClientStats struct {
	// The client stats should be periodically reported to the load balancer
	// based on the duration defined in the InitialLoadBalanceResponse.
	ClientStats *ClientStats `protobuf:"bytes,2,opt,name=client_stats,json=clientStats,proto3,oneof"`
}

type LoadBalanceRequest_InitialRequest

type LoadBalanceRequest_InitialRequest struct {
	// This message should be sent on the first request to the load balancer.
	InitialRequest *InitialLoadBalanceRequest `protobuf:"bytes,1,opt,name=initial_request,json=initialRequest,proto3,oneof"`
}

type LoadBalanceResponse

type LoadBalanceResponse struct {

	// Types that are assignable to LoadBalanceResponseType:
	//
	//	*LoadBalanceResponse_InitialResponse
	//	*LoadBalanceResponse_ServerList
	//	*LoadBalanceResponse_FallbackResponse
	LoadBalanceResponseType isLoadBalanceResponse_LoadBalanceResponseType `protobuf_oneof:"load_balance_response_type"`
	// contains filtered or unexported fields
}

func (*LoadBalanceResponse) Descriptor deprecated

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

Deprecated: Use LoadBalanceResponse.ProtoReflect.Descriptor instead.

func (*LoadBalanceResponse) GetFallbackResponse

func (x *LoadBalanceResponse) GetFallbackResponse() *FallbackResponse

func (*LoadBalanceResponse) GetInitialResponse

func (x *LoadBalanceResponse) GetInitialResponse() *InitialLoadBalanceResponse

func (*LoadBalanceResponse) GetLoadBalanceResponseType

func (m *LoadBalanceResponse) GetLoadBalanceResponseType() isLoadBalanceResponse_LoadBalanceResponseType

func (*LoadBalanceResponse) GetServerList

func (x *LoadBalanceResponse) GetServerList() *ServerList

func (*LoadBalanceResponse) ProtoMessage

func (*LoadBalanceResponse) ProtoMessage()

func (*LoadBalanceResponse) ProtoReflect

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

func (*LoadBalanceResponse) Reset

func (x *LoadBalanceResponse) Reset()

func (*LoadBalanceResponse) String

func (x *LoadBalanceResponse) String() string

type LoadBalanceResponse_FallbackResponse

type LoadBalanceResponse_FallbackResponse struct {
	// If this field is set, then the client should eagerly enter fallback
	// mode (even if there are existing, healthy connections to backends).
	FallbackResponse *FallbackResponse `protobuf:"bytes,3,opt,name=fallback_response,json=fallbackResponse,proto3,oneof"`
}

type LoadBalanceResponse_InitialResponse

type LoadBalanceResponse_InitialResponse struct {
	// This message should be sent on the first response to the client.
	InitialResponse *InitialLoadBalanceResponse `protobuf:"bytes,1,opt,name=initial_response,json=initialResponse,proto3,oneof"`
}

type LoadBalanceResponse_ServerList

type LoadBalanceResponse_ServerList struct {
	// Contains the list of servers selected by the load balancer. The client
	// should send requests to these servers in the specified order.
	ServerList *ServerList `protobuf:"bytes,2,opt,name=server_list,json=serverList,proto3,oneof"`
}

type LoadBalancingFeedback

type LoadBalancingFeedback struct {

	// Reports the current utilization of the server (typical range [0.0 - 1.0]).
	ServerUtilization float32 `protobuf:"fixed32,1,opt,name=server_utilization,json=serverUtilization,proto3" json:"server_utilization,omitempty"`
	// The total rate of calls handled by this server (including errors).
	CallsPerSecond float32 `protobuf:"fixed32,2,opt,name=calls_per_second,json=callsPerSecond,proto3" json:"calls_per_second,omitempty"`
	// The total rate of error responses sent by this server.
	ErrorsPerSecond float32 `protobuf:"fixed32,3,opt,name=errors_per_second,json=errorsPerSecond,proto3" json:"errors_per_second,omitempty"`
	// contains filtered or unexported fields
}

func (*LoadBalancingFeedback) Descriptor deprecated

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

Deprecated: Use LoadBalancingFeedback.ProtoReflect.Descriptor instead.

func (*LoadBalancingFeedback) GetCallsPerSecond

func (x *LoadBalancingFeedback) GetCallsPerSecond() float32

func (*LoadBalancingFeedback) GetErrorsPerSecond

func (x *LoadBalancingFeedback) GetErrorsPerSecond() float32

func (*LoadBalancingFeedback) GetServerUtilization

func (x *LoadBalancingFeedback) GetServerUtilization() float32

func (*LoadBalancingFeedback) ProtoMessage

func (*LoadBalancingFeedback) ProtoMessage()

func (*LoadBalancingFeedback) ProtoReflect

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

func (*LoadBalancingFeedback) Reset

func (x *LoadBalancingFeedback) Reset()

func (*LoadBalancingFeedback) String

func (x *LoadBalancingFeedback) String() string

type LoadReportRequest

type LoadReportRequest struct {

	// This message should be sent on the first request to the gRPC server.
	InitialRequest *InitialLoadReportRequest `protobuf:"bytes,1,opt,name=initial_request,json=initialRequest,proto3" json:"initial_request,omitempty"`
	// contains filtered or unexported fields
}

func (*LoadReportRequest) Descriptor deprecated

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

Deprecated: Use LoadReportRequest.ProtoReflect.Descriptor instead.

func (*LoadReportRequest) GetInitialRequest

func (x *LoadReportRequest) GetInitialRequest() *InitialLoadReportRequest

func (*LoadReportRequest) ProtoMessage

func (*LoadReportRequest) ProtoMessage()

func (*LoadReportRequest) ProtoReflect

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

func (*LoadReportRequest) Reset

func (x *LoadReportRequest) Reset()

func (*LoadReportRequest) String

func (x *LoadReportRequest) String() string

type LoadReportResponse

type LoadReportResponse struct {

	// This message should be sent on the first response to the load balancer.
	InitialResponse *InitialLoadReportResponse `protobuf:"bytes,1,opt,name=initial_response,json=initialResponse,proto3" json:"initial_response,omitempty"`
	// Reports server-wide statistics for load balancing.
	// This should be reported with every response.
	LoadBalancingFeedback *LoadBalancingFeedback `` /* 126-byte string literal not displayed */
	// A load report for each <tag, user_id> tuple. This could be considered to be
	// a multimap indexed by <tag, user_id>. It is not strictly necessary to
	// aggregate all entries into one entry per <tag, user_id> tuple, although it
	// is preferred to do so.
	Load []*Load `protobuf:"bytes,3,rep,name=load,proto3" json:"load,omitempty"`
	// contains filtered or unexported fields
}

func (*LoadReportResponse) Descriptor deprecated

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

Deprecated: Use LoadReportResponse.ProtoReflect.Descriptor instead.

func (*LoadReportResponse) GetInitialResponse

func (x *LoadReportResponse) GetInitialResponse() *InitialLoadReportResponse

func (*LoadReportResponse) GetLoad

func (x *LoadReportResponse) GetLoad() []*Load

func (*LoadReportResponse) GetLoadBalancingFeedback

func (x *LoadReportResponse) GetLoadBalancingFeedback() *LoadBalancingFeedback

func (*LoadReportResponse) ProtoMessage

func (*LoadReportResponse) ProtoMessage()

func (*LoadReportResponse) ProtoReflect

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

func (*LoadReportResponse) Reset

func (x *LoadReportResponse) Reset()

func (*LoadReportResponse) String

func (x *LoadReportResponse) String() string

type Load_LoadKey

type Load_LoadKey struct {
	// Load_key is the load_key from the initial_request from the originating
	// balancer.
	//
	// Deprecated: Marked as deprecated in grpc/lb/v1/load_reporter.proto.
	LoadKey []byte `protobuf:"bytes,12,opt,name=load_key,json=loadKey,proto3,oneof"`
}

type Load_LoadKeyUnknown

type Load_LoadKeyUnknown struct {
	// If true then this load report is for calls that had an invalid token; the
	// user is probably abusing the gRPC protocol.
	// TODO(yankaiz): Rename load_key_unknown.
	LoadKeyUnknown bool `protobuf:"varint,13,opt,name=load_key_unknown,json=loadKeyUnknown,proto3,oneof"`
}

type Load_NumCallsInProgress

type Load_NumCallsInProgress struct {
	// The number of calls in progress (instantaneously) per load balancer id.
	NumCallsInProgress int64 `protobuf:"varint,5,opt,name=num_calls_in_progress,json=numCallsInProgress,proto3,oneof"`
}

type Load_OrphanedLoadIdentifier

type Load_OrphanedLoadIdentifier struct {
	// load_key and balancer_id are included in order to identify orphaned load
	// from different origins.
	OrphanedLoadIdentifier *OrphanedLoadIdentifier `protobuf:"bytes,14,opt,name=orphaned_load_identifier,json=orphanedLoadIdentifier,proto3,oneof"`
}

type OrphanedLoadIdentifier

type OrphanedLoadIdentifier struct {

	// The load_key from the initial_request from the originating balancer.
	LoadKey []byte `protobuf:"bytes,1,opt,name=load_key,json=loadKey,proto3" json:"load_key,omitempty"`
	// The unique ID generated by LoadReporter to identify balancers. Here it
	// distinguishes orphaned load with a same load_key.
	LoadBalancerId string `protobuf:"bytes,2,opt,name=load_balancer_id,json=loadBalancerId,proto3" json:"load_balancer_id,omitempty"`
	// contains filtered or unexported fields
}

func (*OrphanedLoadIdentifier) Descriptor deprecated

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

Deprecated: Use OrphanedLoadIdentifier.ProtoReflect.Descriptor instead.

func (*OrphanedLoadIdentifier) GetLoadBalancerId

func (x *OrphanedLoadIdentifier) GetLoadBalancerId() string

func (*OrphanedLoadIdentifier) GetLoadKey

func (x *OrphanedLoadIdentifier) GetLoadKey() []byte

func (*OrphanedLoadIdentifier) ProtoMessage

func (*OrphanedLoadIdentifier) ProtoMessage()

func (*OrphanedLoadIdentifier) ProtoReflect

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

func (*OrphanedLoadIdentifier) Reset

func (x *OrphanedLoadIdentifier) Reset()

func (*OrphanedLoadIdentifier) String

func (x *OrphanedLoadIdentifier) String() string

type Server

type Server struct {

	// A resolved address for the server, serialized in network-byte-order. It may
	// either be an IPv4 or IPv6 address.
	IpAddress []byte `protobuf:"bytes,1,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"`
	// A resolved port number for the server.
	Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	// An opaque but printable token for load reporting. The client must include
	// the token of the picked server into the initial metadata when it starts a
	// call to that server. The token is used by the server to verify the request
	// and to allow the server to report load to the gRPC LB system. The token is
	// also used in client stats for reporting dropped calls.
	//
	// Its length can be variable but must be less than 50 bytes.
	LoadBalanceToken string `protobuf:"bytes,3,opt,name=load_balance_token,json=loadBalanceToken,proto3" json:"load_balance_token,omitempty"`
	// Indicates whether this particular request should be dropped by the client.
	// If the request is dropped, there will be a corresponding entry in
	// ClientStats.calls_finished_with_drop.
	Drop bool `protobuf:"varint,4,opt,name=drop,proto3" json:"drop,omitempty"`
	// contains filtered or unexported fields
}

Contains server information. When the drop field is not true, use the other fields.

func (*Server) Descriptor deprecated

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

Deprecated: Use Server.ProtoReflect.Descriptor instead.

func (*Server) GetDrop

func (x *Server) GetDrop() bool

func (*Server) GetIpAddress

func (x *Server) GetIpAddress() []byte

func (*Server) GetLoadBalanceToken

func (x *Server) GetLoadBalanceToken() string

func (*Server) GetPort

func (x *Server) GetPort() int32

func (*Server) ProtoMessage

func (*Server) ProtoMessage()

func (*Server) ProtoReflect

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

func (*Server) Reset

func (x *Server) Reset()

func (*Server) String

func (x *Server) String() string

type ServerList

type ServerList struct {

	// Contains a list of servers selected by the load balancer. The list will
	// be updated when server resolutions change or as needed to balance load
	// across more servers. The client should consume the server list in order
	// unless instructed otherwise via the client_config.
	Servers []*Server `protobuf:"bytes,1,rep,name=servers,proto3" json:"servers,omitempty"`
	// contains filtered or unexported fields
}

func (*ServerList) Descriptor deprecated

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

Deprecated: Use ServerList.ProtoReflect.Descriptor instead.

func (*ServerList) GetServers

func (x *ServerList) GetServers() []*Server

func (*ServerList) ProtoMessage

func (*ServerList) ProtoMessage()

func (*ServerList) ProtoReflect

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

func (*ServerList) Reset

func (x *ServerList) Reset()

func (*ServerList) String

func (x *ServerList) String() string

Jump to

Keyboard shortcuts

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