v2

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthLrs = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowLrs   = fmt.Errorf("proto: integer overflow")
)

Functions

func RegisterLoadReportingServiceServer

func RegisterLoadReportingServiceServer(s *grpc.Server, srv LoadReportingServiceServer)

Types

type LoadReportingServiceClient

type LoadReportingServiceClient interface {
	// Advanced API to allow for multi-dimensional load balancing by remote
	// server. For receiving LB assignments, the steps are:
	// 1, The management server is configured with per cluster/zone/load metric
	//    capacity configuration. The capacity configuration definition is
	//    outside of the scope of this document.
	// 2. Envoy issues a standard {Stream,Fetch}Endpoints request for the clusters
	//    to balance.
	//
	// Independently, Envoy will initiate a StreamLoadStats bidi stream with a
	// management server:
	// 1. Once a connection establishes, the management server publishes a
	//    LoadStatsResponse for all clusters it is interested in learning load
	//    stats about.
	// 2. For each cluster, Envoy load balances incoming traffic to upstream hosts
	//    based on per-zone weights and/or per-instance weights (if specified)
	//    based on intra-zone LbPolicy. This information comes from the above
	//    {Stream,Fetch}Endpoints.
	// 3. When upstream hosts reply, they optionally add header <define header
	//    name> with ASCII representation of EndpointLoadMetricStats.
	// 4. Envoy aggregates load reports over the period of time given to it in
	//    LoadStatsResponse.load_reporting_interval. This includes aggregation
	//    stats Envoy maintains by itself (total_requests, rpc_errors etc.) as
	//    well as load metrics from upstream hosts.
	// 5. When the timer of load_reporting_interval expires, Envoy sends new
	//    LoadStatsRequest filled with load reports for each cluster.
	// 6. The management server uses the load reports from all reported Envoys
	//    from around the world, computes global assignment and prepares traffic
	//    assignment destined for each zone Envoys are located in. Goto 2.
	StreamLoadStats(ctx context.Context, opts ...grpc.CallOption) (LoadReportingService_StreamLoadStatsClient, error)
}

LoadReportingServiceClient is the client API for LoadReportingService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewLoadReportingServiceClient

func NewLoadReportingServiceClient(cc *grpc.ClientConn) LoadReportingServiceClient

type LoadReportingServiceServer

type LoadReportingServiceServer interface {
	// Advanced API to allow for multi-dimensional load balancing by remote
	// server. For receiving LB assignments, the steps are:
	// 1, The management server is configured with per cluster/zone/load metric
	//    capacity configuration. The capacity configuration definition is
	//    outside of the scope of this document.
	// 2. Envoy issues a standard {Stream,Fetch}Endpoints request for the clusters
	//    to balance.
	//
	// Independently, Envoy will initiate a StreamLoadStats bidi stream with a
	// management server:
	// 1. Once a connection establishes, the management server publishes a
	//    LoadStatsResponse for all clusters it is interested in learning load
	//    stats about.
	// 2. For each cluster, Envoy load balances incoming traffic to upstream hosts
	//    based on per-zone weights and/or per-instance weights (if specified)
	//    based on intra-zone LbPolicy. This information comes from the above
	//    {Stream,Fetch}Endpoints.
	// 3. When upstream hosts reply, they optionally add header <define header
	//    name> with ASCII representation of EndpointLoadMetricStats.
	// 4. Envoy aggregates load reports over the period of time given to it in
	//    LoadStatsResponse.load_reporting_interval. This includes aggregation
	//    stats Envoy maintains by itself (total_requests, rpc_errors etc.) as
	//    well as load metrics from upstream hosts.
	// 5. When the timer of load_reporting_interval expires, Envoy sends new
	//    LoadStatsRequest filled with load reports for each cluster.
	// 6. The management server uses the load reports from all reported Envoys
	//    from around the world, computes global assignment and prepares traffic
	//    assignment destined for each zone Envoys are located in. Goto 2.
	StreamLoadStats(LoadReportingService_StreamLoadStatsServer) error
}

LoadReportingServiceServer is the server API for LoadReportingService service.

type LoadReportingService_StreamLoadStatsClient

type LoadReportingService_StreamLoadStatsClient interface {
	Send(*LoadStatsRequest) error
	Recv() (*LoadStatsResponse, error)
	grpc.ClientStream
}

type LoadReportingService_StreamLoadStatsServer

type LoadReportingService_StreamLoadStatsServer interface {
	Send(*LoadStatsResponse) error
	Recv() (*LoadStatsRequest, error)
	grpc.ServerStream
}

type LoadStatsRequest

type LoadStatsRequest struct {
	// Node identifier for Envoy instance.
	Node *core.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
	// A list of load stats to report.
	ClusterStats         []*endpoint.ClusterStats `protobuf:"bytes,2,rep,name=cluster_stats,json=clusterStats,proto3" json:"cluster_stats,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
	XXX_unrecognized     []byte                   `json:"-"`
	XXX_sizecache        int32                    `json:"-"`
}

A load report Envoy sends to the management server. [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs.

func (*LoadStatsRequest) Descriptor

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

func (*LoadStatsRequest) GetClusterStats

func (m *LoadStatsRequest) GetClusterStats() []*endpoint.ClusterStats

func (*LoadStatsRequest) GetNode

func (m *LoadStatsRequest) GetNode() *core.Node

func (*LoadStatsRequest) Marshal

func (m *LoadStatsRequest) Marshal() (dAtA []byte, err error)

func (*LoadStatsRequest) MarshalTo

func (m *LoadStatsRequest) MarshalTo(dAtA []byte) (int, error)

func (*LoadStatsRequest) ProtoMessage

func (*LoadStatsRequest) ProtoMessage()

func (*LoadStatsRequest) Reset

func (m *LoadStatsRequest) Reset()

func (*LoadStatsRequest) Size

func (m *LoadStatsRequest) Size() (n int)

func (*LoadStatsRequest) String

func (m *LoadStatsRequest) String() string

func (*LoadStatsRequest) Unmarshal

func (m *LoadStatsRequest) Unmarshal(dAtA []byte) error

func (*LoadStatsRequest) Validate

func (m *LoadStatsRequest) Validate() error

Validate checks the field values on LoadStatsRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*LoadStatsRequest) XXX_DiscardUnknown

func (m *LoadStatsRequest) XXX_DiscardUnknown()

func (*LoadStatsRequest) XXX_Marshal

func (m *LoadStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LoadStatsRequest) XXX_Merge

func (m *LoadStatsRequest) XXX_Merge(src proto.Message)

func (*LoadStatsRequest) XXX_Size

func (m *LoadStatsRequest) XXX_Size() int

func (*LoadStatsRequest) XXX_Unmarshal

func (m *LoadStatsRequest) XXX_Unmarshal(b []byte) error

type LoadStatsRequestValidationError

type LoadStatsRequestValidationError struct {
	Field  string
	Reason string
	Cause  error
	Key    bool
}

LoadStatsRequestValidationError is the validation error returned by LoadStatsRequest.Validate if the designated constraints aren't met.

func (LoadStatsRequestValidationError) Error

Error satisfies the builtin error interface

type LoadStatsResponse

type LoadStatsResponse struct {
	// Clusters to report stats for.
	Clusters []string `protobuf:"bytes,1,rep,name=clusters,proto3" json:"clusters,omitempty"`
	// The minimum interval of time to collect stats over. This is only a minimum for two reasons:
	// 1. There may be some delay from when the timer fires until stats sampling occurs.
	// 2. For clusters that were already feature in the previous *LoadStatsResponse*, any traffic
	//    that is observed in between the corresponding previous *LoadStatsRequest* and this
	//    *LoadStatsResponse* will also be accumulated and billed to the cluster. This avoids a period
	//    of inobservability that might otherwise exists between the messages. New clusters are not
	//    subject to this consideration.
	LoadReportingInterval *types.Duration `` /* 126-byte string literal not displayed */
	// Set to *true* if the management server supports endpoint granularity
	// report.
	ReportEndpointGranularity bool     `` /* 139-byte string literal not displayed */
	XXX_NoUnkeyedLiteral      struct{} `json:"-"`
	XXX_unrecognized          []byte   `json:"-"`
	XXX_sizecache             int32    `json:"-"`
}

The management server sends envoy a LoadStatsResponse with all clusters it is interested in learning load stats about. [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs.

func (*LoadStatsResponse) Descriptor

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

func (*LoadStatsResponse) GetClusters

func (m *LoadStatsResponse) GetClusters() []string

func (*LoadStatsResponse) GetLoadReportingInterval

func (m *LoadStatsResponse) GetLoadReportingInterval() *types.Duration

func (*LoadStatsResponse) GetReportEndpointGranularity

func (m *LoadStatsResponse) GetReportEndpointGranularity() bool

func (*LoadStatsResponse) Marshal

func (m *LoadStatsResponse) Marshal() (dAtA []byte, err error)

func (*LoadStatsResponse) MarshalTo

func (m *LoadStatsResponse) MarshalTo(dAtA []byte) (int, error)

func (*LoadStatsResponse) ProtoMessage

func (*LoadStatsResponse) ProtoMessage()

func (*LoadStatsResponse) Reset

func (m *LoadStatsResponse) Reset()

func (*LoadStatsResponse) Size

func (m *LoadStatsResponse) Size() (n int)

func (*LoadStatsResponse) String

func (m *LoadStatsResponse) String() string

func (*LoadStatsResponse) Unmarshal

func (m *LoadStatsResponse) Unmarshal(dAtA []byte) error

func (*LoadStatsResponse) Validate

func (m *LoadStatsResponse) Validate() error

Validate checks the field values on LoadStatsResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*LoadStatsResponse) XXX_DiscardUnknown

func (m *LoadStatsResponse) XXX_DiscardUnknown()

func (*LoadStatsResponse) XXX_Marshal

func (m *LoadStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LoadStatsResponse) XXX_Merge

func (m *LoadStatsResponse) XXX_Merge(src proto.Message)

func (*LoadStatsResponse) XXX_Size

func (m *LoadStatsResponse) XXX_Size() int

func (*LoadStatsResponse) XXX_Unmarshal

func (m *LoadStatsResponse) XXX_Unmarshal(b []byte) error

type LoadStatsResponseValidationError

type LoadStatsResponseValidationError struct {
	Field  string
	Reason string
	Cause  error
	Key    bool
}

LoadStatsResponseValidationError is the validation error returned by LoadStatsResponse.Validate if the designated constraints aren't met.

func (LoadStatsResponseValidationError) Error

Error satisfies the builtin error interface

Jump to

Keyboard shortcuts

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