Documentation ¶
Overview ¶
Package grpc_lb_v1 is a generated protocol buffer package.
It is generated from these files:
grpclb.proto
It has these top-level messages:
Duration Timestamp LoadBalanceRequest InitialLoadBalanceRequest ClientStats LoadBalanceResponse InitialLoadBalanceResponse ServerList Server
Index ¶
- type ClientStats
- func (*ClientStats) Descriptor() ([]byte, []int)
- func (m *ClientStats) GetNumCallsFinished() int64
- func (m *ClientStats) GetNumCallsFinishedKnownReceived() int64
- func (m *ClientStats) GetNumCallsFinishedWithClientFailedToSend() int64
- func (m *ClientStats) GetNumCallsFinishedWithDropForLoadBalancing() int64
- func (m *ClientStats) GetNumCallsFinishedWithDropForRateLimiting() int64
- func (m *ClientStats) GetNumCallsStarted() int64
- func (m *ClientStats) GetTimestamp() *Timestamp
- func (*ClientStats) ProtoMessage()
- func (m *ClientStats) Reset()
- func (m *ClientStats) String() string
- type Duration
- type InitialLoadBalanceRequest
- type InitialLoadBalanceResponse
- func (*InitialLoadBalanceResponse) Descriptor() ([]byte, []int)
- func (m *InitialLoadBalanceResponse) GetClientStatsReportInterval() *Duration
- func (m *InitialLoadBalanceResponse) GetLoadBalancerDelegate() string
- func (*InitialLoadBalanceResponse) ProtoMessage()
- func (m *InitialLoadBalanceResponse) Reset()
- func (m *InitialLoadBalanceResponse) String() string
- type LoadBalanceRequest
- func (*LoadBalanceRequest) Descriptor() ([]byte, []int)
- func (m *LoadBalanceRequest) GetClientStats() *ClientStats
- func (m *LoadBalanceRequest) GetInitialRequest() *InitialLoadBalanceRequest
- func (m *LoadBalanceRequest) GetLoadBalanceRequestType() isLoadBalanceRequest_LoadBalanceRequestType
- func (*LoadBalanceRequest) ProtoMessage()
- func (m *LoadBalanceRequest) Reset()
- func (m *LoadBalanceRequest) String() string
- func (*LoadBalanceRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type LoadBalanceRequest_ClientStats
- type LoadBalanceRequest_InitialRequest
- type LoadBalanceResponse
- func (*LoadBalanceResponse) Descriptor() ([]byte, []int)
- func (m *LoadBalanceResponse) GetInitialResponse() *InitialLoadBalanceResponse
- func (m *LoadBalanceResponse) GetLoadBalanceResponseType() isLoadBalanceResponse_LoadBalanceResponseType
- func (m *LoadBalanceResponse) GetServerList() *ServerList
- func (*LoadBalanceResponse) ProtoMessage()
- func (m *LoadBalanceResponse) Reset()
- func (m *LoadBalanceResponse) String() string
- func (*LoadBalanceResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type LoadBalanceResponse_InitialResponse
- type LoadBalanceResponse_ServerList
- type Server
- func (*Server) Descriptor() ([]byte, []int)
- func (m *Server) GetDropForLoadBalancing() bool
- func (m *Server) GetDropForRateLimiting() bool
- func (m *Server) GetIpAddress() []byte
- func (m *Server) GetLoadBalanceToken() string
- func (m *Server) GetPort() int32
- func (*Server) ProtoMessage()
- func (m *Server) Reset()
- func (m *Server) String() string
- type ServerList
- type Timestamp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientStats ¶
type ClientStats struct { // The timestamp of generating the report. Timestamp *Timestamp `protobuf:"bytes,1,opt,name=timestamp" json:"timestamp,omitempty"` // The total number of RPCs that started. NumCallsStarted int64 `protobuf:"varint,2,opt,name=num_calls_started,json=numCallsStarted" json:"num_calls_started,omitempty"` // The total number of RPCs that finished. NumCallsFinished int64 `protobuf:"varint,3,opt,name=num_calls_finished,json=numCallsFinished" json:"num_calls_finished,omitempty"` // The total number of RPCs that were dropped by the client because of rate // limiting. NumCallsFinishedWithDropForRateLimiting int64 `` /* 184-byte string literal not displayed */ // The total number of RPCs that were dropped by the client because of load // balancing. NumCallsFinishedWithDropForLoadBalancing int64 `` /* 187-byte string literal not displayed */ // The total number of RPCs that failed to reach a server except dropped RPCs. NumCallsFinishedWithClientFailedToSend int64 `` /* 181-byte string literal not displayed */ // The total number of RPCs that finished and are known to have been received // by a server. NumCallsFinishedKnownReceived int64 `` /* 148-byte string literal not displayed */ }
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 ¶
func (*ClientStats) Descriptor() ([]byte, []int)
func (*ClientStats) GetNumCallsFinished ¶ added in v1.3.0
func (m *ClientStats) GetNumCallsFinished() int64
func (*ClientStats) GetNumCallsFinishedKnownReceived ¶ added in v1.3.0
func (m *ClientStats) GetNumCallsFinishedKnownReceived() int64
func (*ClientStats) GetNumCallsFinishedWithClientFailedToSend ¶ added in v1.3.0
func (m *ClientStats) GetNumCallsFinishedWithClientFailedToSend() int64
func (*ClientStats) GetNumCallsFinishedWithDropForLoadBalancing ¶ added in v1.3.0
func (m *ClientStats) GetNumCallsFinishedWithDropForLoadBalancing() int64
func (*ClientStats) GetNumCallsFinishedWithDropForRateLimiting ¶ added in v1.3.0
func (m *ClientStats) GetNumCallsFinishedWithDropForRateLimiting() int64
func (*ClientStats) GetNumCallsStarted ¶ added in v1.3.0
func (m *ClientStats) GetNumCallsStarted() int64
func (*ClientStats) GetTimestamp ¶ added in v1.3.0
func (m *ClientStats) GetTimestamp() *Timestamp
func (*ClientStats) ProtoMessage ¶
func (*ClientStats) ProtoMessage()
func (*ClientStats) Reset ¶
func (m *ClientStats) Reset()
func (*ClientStats) String ¶
func (m *ClientStats) String() string
type Duration ¶
type Duration struct { // Signed seconds of the span of time. Must be from -315,576,000,000 // to +315,576,000,000 inclusive. Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"` // Signed fractions of a second at nanosecond resolution of the span // of time. Durations less than one second are represented with a 0 // `seconds` field and a positive or negative `nanos` field. For durations // of one second or more, a non-zero value for the `nanos` field must be // of the same sign as the `seconds` field. Must be from -999,999,999 // to +999,999,999 inclusive. Nanos int32 `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"` }
func (*Duration) Descriptor ¶
func (*Duration) GetSeconds ¶ added in v1.3.0
func (*Duration) ProtoMessage ¶
func (*Duration) ProtoMessage()
type InitialLoadBalanceRequest ¶
type InitialLoadBalanceRequest struct { // Name of load balanced service (IE, balancer.service.com) // length should be less than 256 bytes. Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` }
func (*InitialLoadBalanceRequest) Descriptor ¶
func (*InitialLoadBalanceRequest) Descriptor() ([]byte, []int)
func (*InitialLoadBalanceRequest) GetName ¶ added in v1.3.0
func (m *InitialLoadBalanceRequest) GetName() string
func (*InitialLoadBalanceRequest) ProtoMessage ¶
func (*InitialLoadBalanceRequest) ProtoMessage()
func (*InitialLoadBalanceRequest) Reset ¶
func (m *InitialLoadBalanceRequest) Reset()
func (*InitialLoadBalanceRequest) String ¶
func (m *InitialLoadBalanceRequest) String() string
type InitialLoadBalanceResponse ¶
type InitialLoadBalanceResponse struct { // This is an application layer redirect that indicates the client should use // the specified server for load balancing. When this field is non-empty in // the response, the client should open a separate connection to the // load_balancer_delegate and call the BalanceLoad method. Its length should // be less than 64 bytes. LoadBalancerDelegate string `protobuf:"bytes,1,opt,name=load_balancer_delegate,json=loadBalancerDelegate" json:"load_balancer_delegate,omitempty"` // 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 *Duration `` /* 133-byte string literal not displayed */ }
func (*InitialLoadBalanceResponse) Descriptor ¶
func (*InitialLoadBalanceResponse) Descriptor() ([]byte, []int)
func (*InitialLoadBalanceResponse) GetClientStatsReportInterval ¶
func (m *InitialLoadBalanceResponse) GetClientStatsReportInterval() *Duration
func (*InitialLoadBalanceResponse) GetLoadBalancerDelegate ¶ added in v1.3.0
func (m *InitialLoadBalanceResponse) GetLoadBalancerDelegate() string
func (*InitialLoadBalanceResponse) ProtoMessage ¶
func (*InitialLoadBalanceResponse) ProtoMessage()
func (*InitialLoadBalanceResponse) Reset ¶
func (m *InitialLoadBalanceResponse) Reset()
func (*InitialLoadBalanceResponse) String ¶
func (m *InitialLoadBalanceResponse) String() string
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"` }
func (*LoadBalanceRequest) Descriptor ¶
func (*LoadBalanceRequest) Descriptor() ([]byte, []int)
func (*LoadBalanceRequest) GetClientStats ¶
func (m *LoadBalanceRequest) GetClientStats() *ClientStats
func (*LoadBalanceRequest) GetInitialRequest ¶
func (m *LoadBalanceRequest) GetInitialRequest() *InitialLoadBalanceRequest
func (*LoadBalanceRequest) GetLoadBalanceRequestType ¶
func (m *LoadBalanceRequest) GetLoadBalanceRequestType() isLoadBalanceRequest_LoadBalanceRequestType
func (*LoadBalanceRequest) ProtoMessage ¶
func (*LoadBalanceRequest) ProtoMessage()
func (*LoadBalanceRequest) Reset ¶
func (m *LoadBalanceRequest) Reset()
func (*LoadBalanceRequest) String ¶
func (m *LoadBalanceRequest) String() string
func (*LoadBalanceRequest) XXX_OneofFuncs ¶
func (*LoadBalanceRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
type LoadBalanceRequest_ClientStats ¶
type LoadBalanceRequest_ClientStats struct {
ClientStats *ClientStats `protobuf:"bytes,2,opt,name=client_stats,json=clientStats,oneof"`
}
type LoadBalanceRequest_InitialRequest ¶
type LoadBalanceRequest_InitialRequest struct {
InitialRequest *InitialLoadBalanceRequest `protobuf:"bytes,1,opt,name=initial_request,json=initialRequest,oneof"`
}
type LoadBalanceResponse ¶
type LoadBalanceResponse struct { // Types that are valid to be assigned to LoadBalanceResponseType: // *LoadBalanceResponse_InitialResponse // *LoadBalanceResponse_ServerList LoadBalanceResponseType isLoadBalanceResponse_LoadBalanceResponseType `protobuf_oneof:"load_balance_response_type"` }
func (*LoadBalanceResponse) Descriptor ¶
func (*LoadBalanceResponse) Descriptor() ([]byte, []int)
func (*LoadBalanceResponse) GetInitialResponse ¶
func (m *LoadBalanceResponse) GetInitialResponse() *InitialLoadBalanceResponse
func (*LoadBalanceResponse) GetLoadBalanceResponseType ¶
func (m *LoadBalanceResponse) GetLoadBalanceResponseType() isLoadBalanceResponse_LoadBalanceResponseType
func (*LoadBalanceResponse) GetServerList ¶
func (m *LoadBalanceResponse) GetServerList() *ServerList
func (*LoadBalanceResponse) ProtoMessage ¶
func (*LoadBalanceResponse) ProtoMessage()
func (*LoadBalanceResponse) Reset ¶
func (m *LoadBalanceResponse) Reset()
func (*LoadBalanceResponse) String ¶
func (m *LoadBalanceResponse) String() string
func (*LoadBalanceResponse) XXX_OneofFuncs ¶
func (*LoadBalanceResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
type LoadBalanceResponse_InitialResponse ¶
type LoadBalanceResponse_InitialResponse struct {
InitialResponse *InitialLoadBalanceResponse `protobuf:"bytes,1,opt,name=initial_response,json=initialResponse,oneof"`
}
type LoadBalanceResponse_ServerList ¶
type LoadBalanceResponse_ServerList struct {
ServerList *ServerList `protobuf:"bytes,2,opt,name=server_list,json=serverList,oneof"`
}
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" json:"port,omitempty"` // An opaque but printable token given to the frontend for each pick. All // frontend requests for that pick must include the token in its initial // metadata. The token is used by the backend to verify the request and to // allow the backend to report load to the gRPC LB system. // // Its length is variable but less than 50 bytes. LoadBalanceToken string `protobuf:"bytes,3,opt,name=load_balance_token,json=loadBalanceToken" json:"load_balance_token,omitempty"` // Indicates whether this particular request should be dropped by the client // for rate limiting. DropForRateLimiting bool `protobuf:"varint,4,opt,name=drop_for_rate_limiting,json=dropForRateLimiting" json:"drop_for_rate_limiting,omitempty"` // Indicates whether this particular request should be dropped by the client // for load balancing. DropForLoadBalancing bool `protobuf:"varint,5,opt,name=drop_for_load_balancing,json=dropForLoadBalancing" json:"drop_for_load_balancing,omitempty"` }
Contains server information. When none of the [drop_for_*] fields are true, use the other fields. When drop_for_rate_limiting is true, ignore all other fields. Use drop_for_load_balancing only when it is true and drop_for_rate_limiting is false.
func (*Server) Descriptor ¶
func (*Server) GetDropForLoadBalancing ¶ added in v1.3.0
func (*Server) GetDropForRateLimiting ¶ added in v1.3.0
func (*Server) GetIpAddress ¶ added in v1.3.0
func (*Server) GetLoadBalanceToken ¶ added in v1.3.0
func (*Server) ProtoMessage ¶
func (*Server) ProtoMessage()
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" json:"servers,omitempty"` // Indicates the amount of time that the client should consider this server // list as valid. It may be considered stale after waiting this interval of // time after receiving the list. If the interval is not positive, the // client can assume the list is valid until the next list is received. ExpirationInterval *Duration `protobuf:"bytes,3,opt,name=expiration_interval,json=expirationInterval" json:"expiration_interval,omitempty"` }
func (*ServerList) Descriptor ¶
func (*ServerList) Descriptor() ([]byte, []int)
func (*ServerList) GetExpirationInterval ¶
func (m *ServerList) GetExpirationInterval() *Duration
func (*ServerList) GetServers ¶
func (m *ServerList) GetServers() []*Server
func (*ServerList) ProtoMessage ¶
func (*ServerList) ProtoMessage()
func (*ServerList) Reset ¶
func (m *ServerList) Reset()
func (*ServerList) String ¶
func (m *ServerList) String() string
type Timestamp ¶ added in v1.3.0
type Timestamp struct { // Represents seconds of UTC time since Unix epoch // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to // 9999-12-31T23:59:59Z inclusive. Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"` // Non-negative fractions of a second at nanosecond resolution. Negative // second values with fractions must still have non-negative nanos values // that count forward in time. Must be from 0 to 999,999,999 // inclusive. Nanos int32 `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"` }
func (*Timestamp) Descriptor ¶ added in v1.3.0
func (*Timestamp) GetSeconds ¶ added in v1.3.0
func (*Timestamp) ProtoMessage ¶ added in v1.3.0
func (*Timestamp) ProtoMessage()