Documentation
¶
Index ¶
- Constants
- Variables
- type CallMetricData
- func (x *CallMetricData) GetMetricName() string
- func (x *CallMetricData) GetNumCallsFinishedWithMetric() int64
- func (x *CallMetricData) GetTotalMetricValue() float64
- func (*CallMetricData) ProtoMessage()
- func (x *CallMetricData) ProtoReflect() protoreflect.Message
- func (x *CallMetricData) Reset()
- func (x *CallMetricData) SetMetricName(v string)
- func (x *CallMetricData) SetNumCallsFinishedWithMetric(v int64)
- func (x *CallMetricData) SetTotalMetricValue(v float64)
- func (x *CallMetricData) String() string
- type CallMetricData_builder
- type ClientStats
- func (x *ClientStats) ClearTimestamp()
- func (x *ClientStats) GetCallsFinishedWithDrop() []*ClientStatsPerToken
- func (x *ClientStats) GetNumCallsFinished() int64
- func (x *ClientStats) GetNumCallsFinishedKnownReceived() int64
- func (x *ClientStats) GetNumCallsFinishedWithClientFailedToSend() int64
- func (x *ClientStats) GetNumCallsStarted() int64
- func (x *ClientStats) GetTimestamp() *timestamppb.Timestamp
- func (x *ClientStats) HasTimestamp() bool
- func (*ClientStats) ProtoMessage()
- func (x *ClientStats) ProtoReflect() protoreflect.Message
- func (x *ClientStats) Reset()
- func (x *ClientStats) SetCallsFinishedWithDrop(v []*ClientStatsPerToken)
- func (x *ClientStats) SetNumCallsFinished(v int64)
- func (x *ClientStats) SetNumCallsFinishedKnownReceived(v int64)
- func (x *ClientStats) SetNumCallsFinishedWithClientFailedToSend(v int64)
- func (x *ClientStats) SetNumCallsStarted(v int64)
- func (x *ClientStats) SetTimestamp(v *timestamppb.Timestamp)
- func (x *ClientStats) String() string
- type ClientStatsPerToken
- func (x *ClientStatsPerToken) GetLoadBalanceToken() string
- func (x *ClientStatsPerToken) GetNumCalls() int64
- func (*ClientStatsPerToken) ProtoMessage()
- func (x *ClientStatsPerToken) ProtoReflect() protoreflect.Message
- func (x *ClientStatsPerToken) Reset()
- func (x *ClientStatsPerToken) SetLoadBalanceToken(v string)
- func (x *ClientStatsPerToken) SetNumCalls(v int64)
- func (x *ClientStatsPerToken) String() string
- type ClientStatsPerToken_builder
- type ClientStats_builder
- type FallbackResponse
- type FallbackResponse_builder
- type InitialLoadBalanceRequest
- func (x *InitialLoadBalanceRequest) GetName() string
- func (*InitialLoadBalanceRequest) ProtoMessage()
- func (x *InitialLoadBalanceRequest) ProtoReflect() protoreflect.Message
- func (x *InitialLoadBalanceRequest) Reset()
- func (x *InitialLoadBalanceRequest) SetName(v string)
- func (x *InitialLoadBalanceRequest) String() string
- type InitialLoadBalanceRequest_builder
- type InitialLoadBalanceResponse
- func (x *InitialLoadBalanceResponse) ClearClientStatsReportInterval()
- func (x *InitialLoadBalanceResponse) GetClientStatsReportInterval() *durationpb.Duration
- func (x *InitialLoadBalanceResponse) HasClientStatsReportInterval() bool
- func (*InitialLoadBalanceResponse) ProtoMessage()
- func (x *InitialLoadBalanceResponse) ProtoReflect() protoreflect.Message
- func (x *InitialLoadBalanceResponse) Reset()
- func (x *InitialLoadBalanceResponse) SetClientStatsReportInterval(v *durationpb.Duration)
- func (x *InitialLoadBalanceResponse) String() string
- type InitialLoadBalanceResponse_builder
- type InitialLoadReportRequest
- func (x *InitialLoadReportRequest) ClearLoadReportInterval()
- func (x *InitialLoadReportRequest) GetLoadBalancedHostname() string
- func (x *InitialLoadReportRequest) GetLoadKey() []byte
- func (x *InitialLoadReportRequest) GetLoadReportInterval() *durationpb.Duration
- func (x *InitialLoadReportRequest) HasLoadReportInterval() bool
- func (*InitialLoadReportRequest) ProtoMessage()
- func (x *InitialLoadReportRequest) ProtoReflect() protoreflect.Message
- func (x *InitialLoadReportRequest) Reset()
- func (x *InitialLoadReportRequest) SetLoadBalancedHostname(v string)
- func (x *InitialLoadReportRequest) SetLoadKey(v []byte)
- func (x *InitialLoadReportRequest) SetLoadReportInterval(v *durationpb.Duration)
- func (x *InitialLoadReportRequest) String() string
- type InitialLoadReportRequest_builder
- type InitialLoadReportResponse
- func (x *InitialLoadReportResponse) GetImplementationId() InitialLoadReportResponse_ImplementationIdentifier
- func (x *InitialLoadReportResponse) GetLoadBalancerId() string
- func (x *InitialLoadReportResponse) GetServerVersion() int64
- func (*InitialLoadReportResponse) ProtoMessage()
- func (x *InitialLoadReportResponse) ProtoReflect() protoreflect.Message
- func (x *InitialLoadReportResponse) Reset()
- func (x *InitialLoadReportResponse) SetImplementationId(v InitialLoadReportResponse_ImplementationIdentifier)
- func (x *InitialLoadReportResponse) SetLoadBalancerId(v string)
- func (x *InitialLoadReportResponse) SetServerVersion(v int64)
- func (x *InitialLoadReportResponse) String() string
- type InitialLoadReportResponse_ImplementationIdentifier
- func (InitialLoadReportResponse_ImplementationIdentifier) Descriptor() protoreflect.EnumDescriptor
- func (x InitialLoadReportResponse_ImplementationIdentifier) Enum() *InitialLoadReportResponse_ImplementationIdentifier
- func (x InitialLoadReportResponse_ImplementationIdentifier) Number() protoreflect.EnumNumber
- func (x InitialLoadReportResponse_ImplementationIdentifier) String() string
- func (InitialLoadReportResponse_ImplementationIdentifier) Type() protoreflect.EnumType
- type InitialLoadReportResponse_builder
- type Load
- func (x *Load) ClearInProgressReport()
- func (x *Load) ClearLoadKey()deprecated
- func (x *Load) ClearLoadKeyUnknown()
- func (x *Load) ClearNumCallsInProgress()
- func (x *Load) ClearOrphanedLoad()
- func (x *Load) ClearOrphanedLoadIdentifier()
- func (x *Load) ClearTotalLatency()
- func (x *Load) GetClientIpAddress() []byte
- func (x *Load) GetInProgressReport() isLoad_InProgressReport
- func (x *Load) GetLoadBalanceTag() string
- func (x *Load) GetLoadKey() []bytedeprecated
- func (x *Load) GetLoadKeyUnknown() bool
- func (x *Load) GetMetricData() []*CallMetricData
- func (x *Load) GetNumCallsFinishedWithError() int64
- func (x *Load) GetNumCallsFinishedWithServerError() int64
- func (x *Load) GetNumCallsFinishedWithoutError() int64
- func (x *Load) GetNumCallsInProgress() int64
- func (x *Load) GetNumCallsStarted() int64
- func (x *Load) GetOrphanedLoad() isLoad_OrphanedLoad
- func (x *Load) GetOrphanedLoadIdentifier() *OrphanedLoadIdentifier
- func (x *Load) GetTotalBytesReceived() int64
- func (x *Load) GetTotalBytesSent() int64
- func (x *Load) GetTotalLatency() *durationpb.Duration
- func (x *Load) GetUserId() string
- func (x *Load) HasInProgressReport() bool
- func (x *Load) HasLoadKey() booldeprecated
- func (x *Load) HasLoadKeyUnknown() bool
- func (x *Load) HasNumCallsInProgress() bool
- func (x *Load) HasOrphanedLoad() bool
- func (x *Load) HasOrphanedLoadIdentifier() bool
- func (x *Load) HasTotalLatency() bool
- func (*Load) ProtoMessage()
- func (x *Load) ProtoReflect() protoreflect.Message
- func (x *Load) Reset()
- func (x *Load) SetClientIpAddress(v []byte)
- func (x *Load) SetLoadBalanceTag(v string)
- func (x *Load) SetLoadKey(v []byte)deprecated
- func (x *Load) SetLoadKeyUnknown(v bool)
- func (x *Load) SetMetricData(v []*CallMetricData)
- func (x *Load) SetNumCallsFinishedWithError(v int64)
- func (x *Load) SetNumCallsFinishedWithServerError(v int64)
- func (x *Load) SetNumCallsFinishedWithoutError(v int64)
- func (x *Load) SetNumCallsInProgress(v int64)
- func (x *Load) SetNumCallsStarted(v int64)
- func (x *Load) SetOrphanedLoadIdentifier(v *OrphanedLoadIdentifier)
- func (x *Load) SetTotalBytesReceived(v int64)
- func (x *Load) SetTotalBytesSent(v int64)
- func (x *Load) SetTotalLatency(v *durationpb.Duration)
- func (x *Load) SetUserId(v string)
- func (x *Load) String() string
- func (x *Load) WhichInProgressReport() case_Load_InProgressReport
- func (x *Load) WhichOrphanedLoad() case_Load_OrphanedLoad
- type LoadBalanceRequest
- func (x *LoadBalanceRequest) ClearClientStats()
- func (x *LoadBalanceRequest) ClearInitialRequest()
- func (x *LoadBalanceRequest) ClearLoadBalanceRequestType()
- func (x *LoadBalanceRequest) GetClientStats() *ClientStats
- func (x *LoadBalanceRequest) GetInitialRequest() *InitialLoadBalanceRequest
- func (x *LoadBalanceRequest) GetLoadBalanceRequestType() isLoadBalanceRequest_LoadBalanceRequestType
- func (x *LoadBalanceRequest) HasClientStats() bool
- func (x *LoadBalanceRequest) HasInitialRequest() bool
- func (x *LoadBalanceRequest) HasLoadBalanceRequestType() bool
- func (*LoadBalanceRequest) ProtoMessage()
- func (x *LoadBalanceRequest) ProtoReflect() protoreflect.Message
- func (x *LoadBalanceRequest) Reset()
- func (x *LoadBalanceRequest) SetClientStats(v *ClientStats)
- func (x *LoadBalanceRequest) SetInitialRequest(v *InitialLoadBalanceRequest)
- func (x *LoadBalanceRequest) String() string
- func (x *LoadBalanceRequest) WhichLoadBalanceRequestType() case_LoadBalanceRequest_LoadBalanceRequestType
- type LoadBalanceRequest_ClientStats
- type LoadBalanceRequest_InitialRequest
- type LoadBalanceRequest_builder
- type LoadBalanceResponse
- func (x *LoadBalanceResponse) ClearFallbackResponse()
- func (x *LoadBalanceResponse) ClearInitialResponse()
- func (x *LoadBalanceResponse) ClearLoadBalanceResponseType()
- func (x *LoadBalanceResponse) ClearServerList()
- func (x *LoadBalanceResponse) GetFallbackResponse() *FallbackResponse
- func (x *LoadBalanceResponse) GetInitialResponse() *InitialLoadBalanceResponse
- func (x *LoadBalanceResponse) GetLoadBalanceResponseType() isLoadBalanceResponse_LoadBalanceResponseType
- func (x *LoadBalanceResponse) GetServerList() *ServerList
- func (x *LoadBalanceResponse) HasFallbackResponse() bool
- func (x *LoadBalanceResponse) HasInitialResponse() bool
- func (x *LoadBalanceResponse) HasLoadBalanceResponseType() bool
- func (x *LoadBalanceResponse) HasServerList() bool
- func (*LoadBalanceResponse) ProtoMessage()
- func (x *LoadBalanceResponse) ProtoReflect() protoreflect.Message
- func (x *LoadBalanceResponse) Reset()
- func (x *LoadBalanceResponse) SetFallbackResponse(v *FallbackResponse)
- func (x *LoadBalanceResponse) SetInitialResponse(v *InitialLoadBalanceResponse)
- func (x *LoadBalanceResponse) SetServerList(v *ServerList)
- func (x *LoadBalanceResponse) String() string
- func (x *LoadBalanceResponse) WhichLoadBalanceResponseType() case_LoadBalanceResponse_LoadBalanceResponseType
- type LoadBalanceResponse_FallbackResponse
- type LoadBalanceResponse_InitialResponse
- type LoadBalanceResponse_ServerList
- type LoadBalanceResponse_builder
- type LoadBalancingFeedback
- func (x *LoadBalancingFeedback) GetCallsPerSecond() float32
- func (x *LoadBalancingFeedback) GetErrorsPerSecond() float32
- func (x *LoadBalancingFeedback) GetServerUtilization() float32
- func (*LoadBalancingFeedback) ProtoMessage()
- func (x *LoadBalancingFeedback) ProtoReflect() protoreflect.Message
- func (x *LoadBalancingFeedback) Reset()
- func (x *LoadBalancingFeedback) SetCallsPerSecond(v float32)
- func (x *LoadBalancingFeedback) SetErrorsPerSecond(v float32)
- func (x *LoadBalancingFeedback) SetServerUtilization(v float32)
- func (x *LoadBalancingFeedback) String() string
- type LoadBalancingFeedback_builder
- type LoadReportRequest
- func (x *LoadReportRequest) ClearInitialRequest()
- func (x *LoadReportRequest) GetInitialRequest() *InitialLoadReportRequest
- func (x *LoadReportRequest) HasInitialRequest() bool
- func (*LoadReportRequest) ProtoMessage()
- func (x *LoadReportRequest) ProtoReflect() protoreflect.Message
- func (x *LoadReportRequest) Reset()
- func (x *LoadReportRequest) SetInitialRequest(v *InitialLoadReportRequest)
- func (x *LoadReportRequest) String() string
- type LoadReportRequest_builder
- type LoadReportResponse
- func (x *LoadReportResponse) ClearInitialResponse()
- func (x *LoadReportResponse) ClearLoadBalancingFeedback()
- func (x *LoadReportResponse) GetInitialResponse() *InitialLoadReportResponse
- func (x *LoadReportResponse) GetLoad() []*Load
- func (x *LoadReportResponse) GetLoadBalancingFeedback() *LoadBalancingFeedback
- func (x *LoadReportResponse) HasInitialResponse() bool
- func (x *LoadReportResponse) HasLoadBalancingFeedback() bool
- func (*LoadReportResponse) ProtoMessage()
- func (x *LoadReportResponse) ProtoReflect() protoreflect.Message
- func (x *LoadReportResponse) Reset()
- func (x *LoadReportResponse) SetInitialResponse(v *InitialLoadReportResponse)
- func (x *LoadReportResponse) SetLoad(v []*Load)
- func (x *LoadReportResponse) SetLoadBalancingFeedback(v *LoadBalancingFeedback)
- func (x *LoadReportResponse) String() string
- type LoadReportResponse_builder
- type Load_LoadKey
- type Load_LoadKeyUnknown
- type Load_NumCallsInProgress
- type Load_OrphanedLoadIdentifier
- type Load_builder
- type OrphanedLoadIdentifier
- func (x *OrphanedLoadIdentifier) GetLoadBalancerId() string
- func (x *OrphanedLoadIdentifier) GetLoadKey() []byte
- func (*OrphanedLoadIdentifier) ProtoMessage()
- func (x *OrphanedLoadIdentifier) ProtoReflect() protoreflect.Message
- func (x *OrphanedLoadIdentifier) Reset()
- func (x *OrphanedLoadIdentifier) SetLoadBalancerId(v string)
- func (x *OrphanedLoadIdentifier) SetLoadKey(v []byte)
- func (x *OrphanedLoadIdentifier) String() string
- type OrphanedLoadIdentifier_builder
- type Server
- func (x *Server) GetDrop() bool
- func (x *Server) GetIpAddress() []byte
- func (x *Server) GetLoadBalanceToken() string
- func (x *Server) GetPort() int32
- func (*Server) ProtoMessage()
- func (x *Server) ProtoReflect() protoreflect.Message
- func (x *Server) Reset()
- func (x *Server) SetDrop(v bool)
- func (x *Server) SetIpAddress(v []byte)
- func (x *Server) SetLoadBalanceToken(v string)
- func (x *Server) SetPort(v int32)
- func (x *Server) String() string
- type ServerList
- type ServerList_builder
- type Server_builder
Constants ¶
View Source
const LoadBalanceRequest_ClientStats_case case_LoadBalanceRequest_LoadBalanceRequestType = 2
View Source
const LoadBalanceRequest_InitialRequest_case case_LoadBalanceRequest_LoadBalanceRequestType = 1
View Source
const LoadBalanceRequest_LoadBalanceRequestType_not_set_case case_LoadBalanceRequest_LoadBalanceRequestType = 0
View Source
const LoadBalanceResponse_FallbackResponse_case case_LoadBalanceResponse_LoadBalanceResponseType = 3
View Source
const LoadBalanceResponse_InitialResponse_case case_LoadBalanceResponse_LoadBalanceResponseType = 1
View Source
const LoadBalanceResponse_LoadBalanceResponseType_not_set_case case_LoadBalanceResponse_LoadBalanceResponseType = 0
View Source
const LoadBalanceResponse_ServerList_case case_LoadBalanceResponse_LoadBalanceResponseType = 2
View Source
const Load_InProgressReport_not_set_case case_Load_InProgressReport = 0
View Source
const Load_LoadKeyUnknown_case case_Load_OrphanedLoad = 13
View Source
const Load_LoadKey_case case_Load_OrphanedLoad = 12
View Source
const Load_NumCallsInProgress_case case_Load_InProgressReport = 5
View Source
const Load_OrphanedLoadIdentifier_case case_Load_OrphanedLoad = 14
View Source
const Load_OrphanedLoad_not_set_case case_Load_OrphanedLoad = 0
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) 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) SetMetricName ¶
func (x *CallMetricData) SetMetricName(v string)
func (*CallMetricData) SetNumCallsFinishedWithMetric ¶
func (x *CallMetricData) SetNumCallsFinishedWithMetric(v int64)
func (*CallMetricData) SetTotalMetricValue ¶
func (x *CallMetricData) SetTotalMetricValue(v float64)
func (*CallMetricData) String ¶
func (x *CallMetricData) String() string
type CallMetricData_builder ¶
type CallMetricData_builder struct {
// Name of the metric; may be empty.
MetricName string
// Number of calls that finished and included this metric.
NumCallsFinishedWithMetric int64
// Sum of metric values across all calls that finished with this metric.
TotalMetricValue float64
// contains filtered or unexported fields
}
func (CallMetricData_builder) Build ¶
func (b0 CallMetricData_builder) Build() *CallMetricData
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) ClearTimestamp ¶
func (x *ClientStats) ClearTimestamp()
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) HasTimestamp ¶
func (x *ClientStats) HasTimestamp() bool
func (*ClientStats) ProtoMessage ¶
func (*ClientStats) ProtoMessage()
func (*ClientStats) ProtoReflect ¶
func (x *ClientStats) ProtoReflect() protoreflect.Message
func (*ClientStats) Reset ¶
func (x *ClientStats) Reset()
func (*ClientStats) SetCallsFinishedWithDrop ¶
func (x *ClientStats) SetCallsFinishedWithDrop(v []*ClientStatsPerToken)
func (*ClientStats) SetNumCallsFinished ¶
func (x *ClientStats) SetNumCallsFinished(v int64)
func (*ClientStats) SetNumCallsFinishedKnownReceived ¶
func (x *ClientStats) SetNumCallsFinishedKnownReceived(v int64)
func (*ClientStats) SetNumCallsFinishedWithClientFailedToSend ¶
func (x *ClientStats) SetNumCallsFinishedWithClientFailedToSend(v int64)
func (*ClientStats) SetNumCallsStarted ¶
func (x *ClientStats) SetNumCallsStarted(v int64)
func (*ClientStats) SetTimestamp ¶
func (x *ClientStats) SetTimestamp(v *timestamppb.Timestamp)
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) 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) SetLoadBalanceToken ¶
func (x *ClientStatsPerToken) SetLoadBalanceToken(v string)
func (*ClientStatsPerToken) SetNumCalls ¶
func (x *ClientStatsPerToken) SetNumCalls(v int64)
func (*ClientStatsPerToken) String ¶
func (x *ClientStatsPerToken) String() string
type ClientStatsPerToken_builder ¶
type ClientStatsPerToken_builder struct {
// See Server.load_balance_token.
LoadBalanceToken string
// The total number of RPCs that finished associated with the token.
NumCalls int64
// contains filtered or unexported fields
}
func (ClientStatsPerToken_builder) Build ¶
func (b0 ClientStatsPerToken_builder) Build() *ClientStatsPerToken
type ClientStats_builder ¶
type ClientStats_builder struct {
// The timestamp of generating the report.
Timestamp *timestamppb.Timestamp
// The total number of RPCs that started.
NumCallsStarted int64
// The total number of RPCs that finished.
NumCallsFinished int64
// The total number of RPCs that failed to reach a server except dropped RPCs.
NumCallsFinishedWithClientFailedToSend int64
// The total number of RPCs that finished and are known to have been received
// by a server.
NumCallsFinishedKnownReceived int64
// The list of dropped calls.
CallsFinishedWithDrop []*ClientStatsPerToken
// contains filtered or unexported fields
}
func (ClientStats_builder) Build ¶
func (b0 ClientStats_builder) Build() *ClientStats
type FallbackResponse ¶
type FallbackResponse struct {
// contains filtered or unexported fields
}
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 FallbackResponse_builder ¶
type FallbackResponse_builder struct {
// contains filtered or unexported fields
}
func (FallbackResponse_builder) Build ¶
func (b0 FallbackResponse_builder) Build() *FallbackResponse
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) GetName ¶
func (x *InitialLoadBalanceRequest) GetName() string
func (*InitialLoadBalanceRequest) ProtoMessage ¶
func (*InitialLoadBalanceRequest) ProtoMessage()
func (*InitialLoadBalanceRequest) ProtoReflect ¶
func (x *InitialLoadBalanceRequest) ProtoReflect() protoreflect.Message
func (*InitialLoadBalanceRequest) Reset ¶
func (x *InitialLoadBalanceRequest) Reset()
func (*InitialLoadBalanceRequest) SetName ¶
func (x *InitialLoadBalanceRequest) SetName(v string)
func (*InitialLoadBalanceRequest) String ¶
func (x *InitialLoadBalanceRequest) String() string
type InitialLoadBalanceRequest_builder ¶
type InitialLoadBalanceRequest_builder 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
// contains filtered or unexported fields
}
func (InitialLoadBalanceRequest_builder) Build ¶
func (b0 InitialLoadBalanceRequest_builder) Build() *InitialLoadBalanceRequest
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) ClearClientStatsReportInterval ¶
func (x *InitialLoadBalanceResponse) ClearClientStatsReportInterval()
func (*InitialLoadBalanceResponse) GetClientStatsReportInterval ¶
func (x *InitialLoadBalanceResponse) GetClientStatsReportInterval() *durationpb.Duration
func (*InitialLoadBalanceResponse) HasClientStatsReportInterval ¶
func (x *InitialLoadBalanceResponse) HasClientStatsReportInterval() bool
func (*InitialLoadBalanceResponse) ProtoMessage ¶
func (*InitialLoadBalanceResponse) ProtoMessage()
func (*InitialLoadBalanceResponse) ProtoReflect ¶
func (x *InitialLoadBalanceResponse) ProtoReflect() protoreflect.Message
func (*InitialLoadBalanceResponse) Reset ¶
func (x *InitialLoadBalanceResponse) Reset()
func (*InitialLoadBalanceResponse) SetClientStatsReportInterval ¶
func (x *InitialLoadBalanceResponse) SetClientStatsReportInterval(v *durationpb.Duration)
func (*InitialLoadBalanceResponse) String ¶
func (x *InitialLoadBalanceResponse) String() string
type InitialLoadBalanceResponse_builder ¶
type InitialLoadBalanceResponse_builder 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
// contains filtered or unexported fields
}
func (InitialLoadBalanceResponse_builder) Build ¶
func (b0 InitialLoadBalanceResponse_builder) Build() *InitialLoadBalanceResponse
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) ClearLoadReportInterval ¶
func (x *InitialLoadReportRequest) ClearLoadReportInterval()
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) HasLoadReportInterval ¶
func (x *InitialLoadReportRequest) HasLoadReportInterval() bool
func (*InitialLoadReportRequest) ProtoMessage ¶
func (*InitialLoadReportRequest) ProtoMessage()
func (*InitialLoadReportRequest) ProtoReflect ¶
func (x *InitialLoadReportRequest) ProtoReflect() protoreflect.Message
func (*InitialLoadReportRequest) Reset ¶
func (x *InitialLoadReportRequest) Reset()
func (*InitialLoadReportRequest) SetLoadBalancedHostname ¶
func (x *InitialLoadReportRequest) SetLoadBalancedHostname(v string)
func (*InitialLoadReportRequest) SetLoadKey ¶
func (x *InitialLoadReportRequest) SetLoadKey(v []byte)
func (*InitialLoadReportRequest) SetLoadReportInterval ¶
func (x *InitialLoadReportRequest) SetLoadReportInterval(v *durationpb.Duration)
func (*InitialLoadReportRequest) String ¶
func (x *InitialLoadReportRequest) String() string
type InitialLoadReportRequest_builder ¶
type InitialLoadReportRequest_builder struct {
// The hostname this load reporter client is requesting load for.
LoadBalancedHostname string
// 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
// This interval defines how often the server should send load reports to
// the load balancer.
LoadReportInterval *durationpb.Duration
// contains filtered or unexported fields
}
func (InitialLoadReportRequest_builder) Build ¶
func (b0 InitialLoadReportRequest_builder) Build() *InitialLoadReportRequest
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) GetImplementationId ¶
func (x *InitialLoadReportResponse) GetImplementationId() InitialLoadReportResponse_ImplementationIdentifier
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 (x *InitialLoadReportResponse) ProtoReflect() protoreflect.Message
func (*InitialLoadReportResponse) Reset ¶
func (x *InitialLoadReportResponse) Reset()
func (*InitialLoadReportResponse) SetImplementationId ¶
func (x *InitialLoadReportResponse) SetImplementationId(v InitialLoadReportResponse_ImplementationIdentifier)
func (*InitialLoadReportResponse) SetLoadBalancerId ¶
func (x *InitialLoadReportResponse) SetLoadBalancerId(v string)
func (*InitialLoadReportResponse) SetServerVersion ¶
func (x *InitialLoadReportResponse) SetServerVersion(v int64)
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) Descriptor() protoreflect.EnumDescriptor
func (InitialLoadReportResponse_ImplementationIdentifier) Enum ¶
func (InitialLoadReportResponse_ImplementationIdentifier) Number ¶
func (x InitialLoadReportResponse_ImplementationIdentifier) Number() protoreflect.EnumNumber
func (InitialLoadReportResponse_ImplementationIdentifier) String ¶
func (x InitialLoadReportResponse_ImplementationIdentifier) String() string
func (InitialLoadReportResponse_ImplementationIdentifier) Type ¶
type InitialLoadReportResponse_builder ¶
type InitialLoadReportResponse_builder struct {
// Initial response returns the Load balancer ID. This must be plain text
// (printable ASCII).
LoadBalancerId string
// Optional identifier of this implementation of the load reporting server.
ImplementationId InitialLoadReportResponse_ImplementationIdentifier
// Optional server_version should be a value that is modified (and
// monotonically increased) when changes are made to the server
// implementation.
ServerVersion int64
// contains filtered or unexported fields
}
func (InitialLoadReportResponse_builder) Build ¶
func (b0 InitialLoadReportResponse_builder) Build() *InitialLoadReportResponse
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 valid to be assigned 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 valid to be assigned to OrphanedLoad:
//
// *Load_LoadKey
// *Load_LoadKeyUnknown
// *Load_OrphanedLoadIdentifier
OrphanedLoad isLoad_OrphanedLoad `protobuf_oneof:"orphaned_load"`
// contains filtered or unexported fields
}
func (*Load) ClearLoadKey
deprecated
func (x *Load) ClearLoadKey()
Deprecated: Marked as deprecated in grpc/lb/v1/load_reporter.proto.
func (*Load) GetMetricData ¶
func (x *Load) GetMetricData() []*CallMetricData
func (*Load) GetNumCallsFinishedWithServerError ¶
func (*Load) GetNumCallsFinishedWithoutError ¶
func (*Load) GetOrphanedLoadIdentifier ¶
func (x *Load) GetOrphanedLoadIdentifier() *OrphanedLoadIdentifier
func (*Load) GetTotalLatency ¶
func (x *Load) GetTotalLatency() *durationpb.Duration
func (*Load) ProtoReflect ¶
func (x *Load) ProtoReflect() protoreflect.Message
func (*Load) SetMetricData ¶
func (x *Load) SetMetricData(v []*CallMetricData)
func (*Load) SetNumCallsFinishedWithServerError ¶
func (*Load) SetNumCallsFinishedWithoutError ¶
func (*Load) SetOrphanedLoadIdentifier ¶
func (x *Load) SetOrphanedLoadIdentifier(v *OrphanedLoadIdentifier)
func (*Load) SetTotalLatency ¶
func (x *Load) SetTotalLatency(v *durationpb.Duration)
type LoadBalanceRequest ¶
type LoadBalanceRequest struct {
// Types that are valid to be assigned to LoadBalanceRequestType:
//
// *LoadBalanceRequest_InitialRequest
// *LoadBalanceRequest_ClientStats
LoadBalanceRequestType isLoadBalanceRequest_LoadBalanceRequestType `protobuf_oneof:"load_balance_request_type"`
// contains filtered or unexported fields
}
func (*LoadBalanceRequest) ClearClientStats ¶
func (x *LoadBalanceRequest) ClearClientStats()
func (*LoadBalanceRequest) ClearInitialRequest ¶
func (x *LoadBalanceRequest) ClearInitialRequest()
func (*LoadBalanceRequest) ClearLoadBalanceRequestType ¶
func (x *LoadBalanceRequest) ClearLoadBalanceRequestType()
func (*LoadBalanceRequest) GetClientStats ¶
func (x *LoadBalanceRequest) GetClientStats() *ClientStats
func (*LoadBalanceRequest) GetInitialRequest ¶
func (x *LoadBalanceRequest) GetInitialRequest() *InitialLoadBalanceRequest
func (*LoadBalanceRequest) GetLoadBalanceRequestType ¶
func (x *LoadBalanceRequest) GetLoadBalanceRequestType() isLoadBalanceRequest_LoadBalanceRequestType
func (*LoadBalanceRequest) HasClientStats ¶
func (x *LoadBalanceRequest) HasClientStats() bool
func (*LoadBalanceRequest) HasInitialRequest ¶
func (x *LoadBalanceRequest) HasInitialRequest() bool
func (*LoadBalanceRequest) HasLoadBalanceRequestType ¶
func (x *LoadBalanceRequest) HasLoadBalanceRequestType() bool
func (*LoadBalanceRequest) ProtoMessage ¶
func (*LoadBalanceRequest) ProtoMessage()
func (*LoadBalanceRequest) ProtoReflect ¶
func (x *LoadBalanceRequest) ProtoReflect() protoreflect.Message
func (*LoadBalanceRequest) Reset ¶
func (x *LoadBalanceRequest) Reset()
func (*LoadBalanceRequest) SetClientStats ¶
func (x *LoadBalanceRequest) SetClientStats(v *ClientStats)
func (*LoadBalanceRequest) SetInitialRequest ¶
func (x *LoadBalanceRequest) SetInitialRequest(v *InitialLoadBalanceRequest)
func (*LoadBalanceRequest) String ¶
func (x *LoadBalanceRequest) String() string
func (*LoadBalanceRequest) WhichLoadBalanceRequestType ¶
func (x *LoadBalanceRequest) WhichLoadBalanceRequestType() case_LoadBalanceRequest_LoadBalanceRequestType
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 LoadBalanceRequest_builder ¶
type LoadBalanceRequest_builder struct {
// Fields of oneof LoadBalanceRequestType:
// This message should be sent on the first request to the load balancer.
InitialRequest *InitialLoadBalanceRequest
// The client stats should be periodically reported to the load balancer
// based on the duration defined in the InitialLoadBalanceResponse.
ClientStats *ClientStats
// contains filtered or unexported fields
}
func (LoadBalanceRequest_builder) Build ¶
func (b0 LoadBalanceRequest_builder) Build() *LoadBalanceRequest
type LoadBalanceResponse ¶
type LoadBalanceResponse struct {
// Types that are valid to be assigned to LoadBalanceResponseType:
//
// *LoadBalanceResponse_InitialResponse
// *LoadBalanceResponse_ServerList
// *LoadBalanceResponse_FallbackResponse
LoadBalanceResponseType isLoadBalanceResponse_LoadBalanceResponseType `protobuf_oneof:"load_balance_response_type"`
// contains filtered or unexported fields
}
func (*LoadBalanceResponse) ClearFallbackResponse ¶
func (x *LoadBalanceResponse) ClearFallbackResponse()
func (*LoadBalanceResponse) ClearInitialResponse ¶
func (x *LoadBalanceResponse) ClearInitialResponse()
func (*LoadBalanceResponse) ClearLoadBalanceResponseType ¶
func (x *LoadBalanceResponse) ClearLoadBalanceResponseType()
func (*LoadBalanceResponse) ClearServerList ¶
func (x *LoadBalanceResponse) ClearServerList()
func (*LoadBalanceResponse) GetFallbackResponse ¶
func (x *LoadBalanceResponse) GetFallbackResponse() *FallbackResponse
func (*LoadBalanceResponse) GetInitialResponse ¶
func (x *LoadBalanceResponse) GetInitialResponse() *InitialLoadBalanceResponse
func (*LoadBalanceResponse) GetLoadBalanceResponseType ¶
func (x *LoadBalanceResponse) GetLoadBalanceResponseType() isLoadBalanceResponse_LoadBalanceResponseType
func (*LoadBalanceResponse) GetServerList ¶
func (x *LoadBalanceResponse) GetServerList() *ServerList
func (*LoadBalanceResponse) HasFallbackResponse ¶
func (x *LoadBalanceResponse) HasFallbackResponse() bool
func (*LoadBalanceResponse) HasInitialResponse ¶
func (x *LoadBalanceResponse) HasInitialResponse() bool
func (*LoadBalanceResponse) HasLoadBalanceResponseType ¶
func (x *LoadBalanceResponse) HasLoadBalanceResponseType() bool
func (*LoadBalanceResponse) HasServerList ¶
func (x *LoadBalanceResponse) HasServerList() bool
func (*LoadBalanceResponse) ProtoMessage ¶
func (*LoadBalanceResponse) ProtoMessage()
func (*LoadBalanceResponse) ProtoReflect ¶
func (x *LoadBalanceResponse) ProtoReflect() protoreflect.Message
func (*LoadBalanceResponse) Reset ¶
func (x *LoadBalanceResponse) Reset()
func (*LoadBalanceResponse) SetFallbackResponse ¶
func (x *LoadBalanceResponse) SetFallbackResponse(v *FallbackResponse)
func (*LoadBalanceResponse) SetInitialResponse ¶
func (x *LoadBalanceResponse) SetInitialResponse(v *InitialLoadBalanceResponse)
func (*LoadBalanceResponse) SetServerList ¶
func (x *LoadBalanceResponse) SetServerList(v *ServerList)
func (*LoadBalanceResponse) String ¶
func (x *LoadBalanceResponse) String() string
func (*LoadBalanceResponse) WhichLoadBalanceResponseType ¶
func (x *LoadBalanceResponse) WhichLoadBalanceResponseType() case_LoadBalanceResponse_LoadBalanceResponseType
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 LoadBalanceResponse_builder ¶
type LoadBalanceResponse_builder struct {
// Fields of oneof LoadBalanceResponseType:
// This message should be sent on the first response to the client.
InitialResponse *InitialLoadBalanceResponse
// Contains the list of servers selected by the load balancer. The client
// should send requests to these servers in the specified order.
ServerList *ServerList
// If this field is set, then the client should eagerly enter fallback
// mode (even if there are existing, healthy connections to backends).
FallbackResponse *FallbackResponse
// contains filtered or unexported fields
}
func (LoadBalanceResponse_builder) Build ¶
func (b0 LoadBalanceResponse_builder) Build() *LoadBalanceResponse
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) 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) SetCallsPerSecond ¶
func (x *LoadBalancingFeedback) SetCallsPerSecond(v float32)
func (*LoadBalancingFeedback) SetErrorsPerSecond ¶
func (x *LoadBalancingFeedback) SetErrorsPerSecond(v float32)
func (*LoadBalancingFeedback) SetServerUtilization ¶
func (x *LoadBalancingFeedback) SetServerUtilization(v float32)
func (*LoadBalancingFeedback) String ¶
func (x *LoadBalancingFeedback) String() string
type LoadBalancingFeedback_builder ¶
type LoadBalancingFeedback_builder struct {
// Reports the current utilization of the server (typical range [0.0 - 1.0]).
ServerUtilization float32
// The total rate of calls handled by this server (including errors).
CallsPerSecond float32
// The total rate of error responses sent by this server.
ErrorsPerSecond float32
// contains filtered or unexported fields
}
func (LoadBalancingFeedback_builder) Build ¶
func (b0 LoadBalancingFeedback_builder) Build() *LoadBalancingFeedback
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) ClearInitialRequest ¶
func (x *LoadReportRequest) ClearInitialRequest()
func (*LoadReportRequest) GetInitialRequest ¶
func (x *LoadReportRequest) GetInitialRequest() *InitialLoadReportRequest
func (*LoadReportRequest) HasInitialRequest ¶
func (x *LoadReportRequest) HasInitialRequest() bool
func (*LoadReportRequest) ProtoMessage ¶
func (*LoadReportRequest) ProtoMessage()
func (*LoadReportRequest) ProtoReflect ¶
func (x *LoadReportRequest) ProtoReflect() protoreflect.Message
func (*LoadReportRequest) Reset ¶
func (x *LoadReportRequest) Reset()
func (*LoadReportRequest) SetInitialRequest ¶
func (x *LoadReportRequest) SetInitialRequest(v *InitialLoadReportRequest)
func (*LoadReportRequest) String ¶
func (x *LoadReportRequest) String() string
type LoadReportRequest_builder ¶
type LoadReportRequest_builder struct {
// This message should be sent on the first request to the gRPC server.
InitialRequest *InitialLoadReportRequest
// contains filtered or unexported fields
}
func (LoadReportRequest_builder) Build ¶
func (b0 LoadReportRequest_builder) Build() *LoadReportRequest
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) ClearInitialResponse ¶
func (x *LoadReportResponse) ClearInitialResponse()
func (*LoadReportResponse) ClearLoadBalancingFeedback ¶
func (x *LoadReportResponse) ClearLoadBalancingFeedback()
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) HasInitialResponse ¶
func (x *LoadReportResponse) HasInitialResponse() bool
func (*LoadReportResponse) HasLoadBalancingFeedback ¶
func (x *LoadReportResponse) HasLoadBalancingFeedback() bool
func (*LoadReportResponse) ProtoMessage ¶
func (*LoadReportResponse) ProtoMessage()
func (*LoadReportResponse) ProtoReflect ¶
func (x *LoadReportResponse) ProtoReflect() protoreflect.Message
func (*LoadReportResponse) Reset ¶
func (x *LoadReportResponse) Reset()
func (*LoadReportResponse) SetInitialResponse ¶
func (x *LoadReportResponse) SetInitialResponse(v *InitialLoadReportResponse)
func (*LoadReportResponse) SetLoad ¶
func (x *LoadReportResponse) SetLoad(v []*Load)
func (*LoadReportResponse) SetLoadBalancingFeedback ¶
func (x *LoadReportResponse) SetLoadBalancingFeedback(v *LoadBalancingFeedback)
func (*LoadReportResponse) String ¶
func (x *LoadReportResponse) String() string
type LoadReportResponse_builder ¶
type LoadReportResponse_builder struct {
// This message should be sent on the first response to the load balancer.
InitialResponse *InitialLoadReportResponse
// Reports server-wide statistics for load balancing.
// This should be reported with every response.
LoadBalancingFeedback *LoadBalancingFeedback
// 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
// contains filtered or unexported fields
}
func (LoadReportResponse_builder) Build ¶
func (b0 LoadReportResponse_builder) Build() *LoadReportResponse
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 Load_builder ¶
type Load_builder 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
// The user identity authenticated by the calls covered by this load
// report. Empty is equivalent to no known user_id.
UserId string
// 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
// The number of calls started (since the last report) with the given tag and
// user_id.
NumCallsStarted int64
// Fields of oneof InProgressReport:
// The number of calls in progress (instantaneously) per load balancer id.
NumCallsInProgress *int64
// -- end of InProgressReport
// The following values are counts or totals of call statistics that finished
// with the given tag and user_id.
NumCallsFinishedWithoutError int64
NumCallsFinishedWithError int64
// 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
// Totals are from calls that with _and_ without error.
TotalBytesSent int64
TotalBytesReceived int64
TotalLatency *durationpb.Duration
// Optional metrics reported for the call(s). Requires that metric_name is
// unique.
MetricData []*CallMetricData
// Fields of oneof OrphanedLoad:
// 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
// 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
// load_key and balancer_id are included in order to identify orphaned load
// from different origins.
OrphanedLoadIdentifier *OrphanedLoadIdentifier
// contains filtered or unexported fields
}
func (Load_builder) Build ¶
func (b0 Load_builder) Build() *Load
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) 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) SetLoadBalancerId ¶
func (x *OrphanedLoadIdentifier) SetLoadBalancerId(v string)
func (*OrphanedLoadIdentifier) SetLoadKey ¶
func (x *OrphanedLoadIdentifier) SetLoadKey(v []byte)
func (*OrphanedLoadIdentifier) String ¶
func (x *OrphanedLoadIdentifier) String() string
type OrphanedLoadIdentifier_builder ¶
type OrphanedLoadIdentifier_builder struct {
// The load_key from the initial_request from the originating balancer.
LoadKey []byte
// The unique ID generated by LoadReporter to identify balancers. Here it
// distinguishes orphaned load with a same load_key.
LoadBalancerId string
// contains filtered or unexported fields
}
func (OrphanedLoadIdentifier_builder) Build ¶
func (b0 OrphanedLoadIdentifier_builder) Build() *OrphanedLoadIdentifier
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) ProtoReflect ¶
func (x *Server) ProtoReflect() protoreflect.Message
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) 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) SetServers ¶
func (x *ServerList) SetServers(v []*Server)
func (*ServerList) String ¶
func (x *ServerList) String() string
type ServerList_builder ¶
type ServerList_builder 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
// contains filtered or unexported fields
}
func (ServerList_builder) Build ¶
func (b0 ServerList_builder) Build() *ServerList
type Server_builder ¶
type Server_builder struct {
// A resolved address for the server, serialized in network-byte-order. It may
// either be an IPv4 or IPv6 address.
IpAddress []byte
// A resolved port number for the server.
Port int32
// 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
// 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
// contains filtered or unexported fields
}
func (Server_builder) Build ¶
func (b0 Server_builder) Build() *Server
Source Files
¶
- load_balancer.pb.go
- load_reporter.pb.go
Click to show internal directories.
Click to hide internal directories.