Search and commands

↑ ↓ to select · Enter to open · Esc to close

Type to search packages.

grpclb

v0.0.0-20170609214715-11d0a25b4919
github.com/go4org/grpc/grpclb

Documentation

pkg.go.dev ↗

Table of contents

↓ to select · Enter to jump· Shift+Enter for source

7 matches

Top ↑

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.

Functions

Balancer

func Balancer(r naming.Resolver) grpc.Balancer

Balancer creates a grpclb load balancer.

Types

AddressType

type AddressType uint8

AddressType indicates the address type returned by name resolution.

Backend (2 declarations)

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

Metadata

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.

Dependency graph