grpclb

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2016 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package grpclb implements the load balancing protocol defined at https://github.com/grpc/grpc/blob/master/doc/load-balancing.md. The implementation is currently EXPERIMENTAL.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Balancer

func Balancer(r naming.Resolver) grpc.Balancer

Balancer creates a grpclb load balancer.

Types

type AddressType added in v1.0.3

type AddressType uint8

AddressType indicates the address type returned by name resolution.

const (
	// Backend indicates the server is a backend server.
	Backend AddressType = iota
	// GRPCLB indicates the server is a grpclb load balancer.
	GRPCLB
)

type Metadata added in v1.0.3

type Metadata struct {
	// AddrType is the type of server (grpc load balancer or backend).
	AddrType AddressType
	// ServerName is the name of the grpc load balancer. Used for authentication.
	ServerName string
}

Metadata contains the information the name resolution for grpclb should provide. The name resolver used by grpclb balancer is required to provide this type of metadata in its address updates.

Directories

Path Synopsis
Package grpc_lb_v1 is a generated protocol buffer package.
Package grpc_lb_v1 is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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