Documentation

Overview

Package balancerload defines APIs to parse server loads in trailers. The parsed loads are sent to balancers in DoneInfo.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(md metadata.MD) interface{}

Parse calls parser.Read().

func SetParser

func SetParser(lr Parser)

SetParser sets the load parser.

Not mutex-protected, should be called before any gRPC functions.

Types

type Parser

type Parser interface {
	// Parse parses loads from metadata.
	Parse(md metadata.MD) interface{}
}

Parser converts loads from metadata into a concrete type.

Source Files