grpc_lb_v1

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2016 License: BSD-3-Clause Imports: 5 Imported by: 0

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
LoadBalanceRequest
InitialLoadBalanceRequest
ClientStats
LoadBalanceResponse
InitialLoadBalanceResponse
ServerList
Server

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterLoadBalancerServer

func RegisterLoadBalancerServer(s *grpc.Server, srv LoadBalancerServer)

Types

type ClientStats

type ClientStats struct {
	// The total number of requests sent by the client since the last report.
	TotalRequests int64 `protobuf:"varint,1,opt,name=total_requests" json:"total_requests,omitempty"`
	// The number of client rpc errors since the last report.
	ClientRpcErrors int64 `protobuf:"varint,2,opt,name=client_rpc_errors" json:"client_rpc_errors,omitempty"`
	// The number of dropped requests since the last report.
	DroppedRequests int64 `protobuf:"varint,3,opt,name=dropped_requests" json:"dropped_requests,omitempty"`
}

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

func (*ClientStats) Descriptor

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

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) Descriptor() ([]byte, []int)

func (*Duration) ProtoMessage

func (*Duration) ProtoMessage()

func (*Duration) Reset

func (m *Duration) Reset()

func (*Duration) String

func (m *Duration) String() string

type InitialLoadBalanceRequest

type InitialLoadBalanceRequest struct {
	// Name of load balanced service (IE, service.grpc.gslb.google.com)
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}

func (*InitialLoadBalanceRequest) Descriptor

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

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.
	LoadBalancerDelegate string `protobuf:"bytes,1,opt,name=load_balancer_delegate" 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 `protobuf:"bytes,3,opt,name=client_stats_report_interval" json:"client_stats_report_interval,omitempty"`
}

func (*InitialLoadBalanceResponse) Descriptor

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

func (*InitialLoadBalanceResponse) GetClientStatsReportInterval

func (m *InitialLoadBalanceResponse) GetClientStatsReportInterval() *Duration

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,oneof"`
}

type LoadBalanceRequest_InitialRequest

type LoadBalanceRequest_InitialRequest struct {
	InitialRequest *InitialLoadBalanceRequest `protobuf:"bytes,1,opt,name=initial_request,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,oneof"`
}

type LoadBalanceResponse_ServerList

type LoadBalanceResponse_ServerList struct {
	ServerList *ServerList `protobuf:"bytes,2,opt,name=server_list,oneof"`
}

type LoadBalancerClient

type LoadBalancerClient interface {
	// Bidirectional rpc to get a list of servers.
	BalanceLoad(ctx context.Context, opts ...grpc.CallOption) (LoadBalancer_BalanceLoadClient, error)
}

func NewLoadBalancerClient

func NewLoadBalancerClient(cc *grpc.ClientConn) LoadBalancerClient

type LoadBalancerServer

type LoadBalancerServer interface {
	// Bidirectional rpc to get a list of servers.
	BalanceLoad(LoadBalancer_BalanceLoadServer) error
}

type LoadBalancer_BalanceLoadClient

type LoadBalancer_BalanceLoadClient interface {
	Send(*LoadBalanceRequest) error
	Recv() (*LoadBalanceResponse, error)
	grpc.ClientStream
}

type LoadBalancer_BalanceLoadServer

type LoadBalancer_BalanceLoadServer interface {
	Send(*LoadBalanceResponse) error
	Recv() (*LoadBalanceRequest, error)
	grpc.ServerStream
}

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,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.
	LoadBalanceToken string `protobuf:"bytes,3,opt,name=load_balance_token" json:"load_balance_token,omitempty"`
	// Indicates whether this particular request should be dropped by the client
	// when this server is chosen from the list.
	DropRequest bool `protobuf:"varint,4,opt,name=drop_request" json:"drop_request,omitempty"`
}

func (*Server) Descriptor

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

func (*Server) ProtoMessage

func (*Server) ProtoMessage()

func (*Server) Reset

func (m *Server) Reset()

func (*Server) String

func (m *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" 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:"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

Jump to

Keyboard shortcuts

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