state

package
v0.0.0-...-7b1f18c Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package state declares grpclb types to be set by resolvers wishing to pass information to grpclb via resolver.State Attributes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Set

func Set(state resolver.State, s *State) resolver.State

Set returns a copy of the provided state with attributes containing s. s's data should not be mutated after calling Set.

Types

type State

type State struct {
	// BalancerAddresses contains the remote load balancer address(es).  If
	// set, overrides any resolver-provided addresses with Type of GRPCLB.
	BalancerAddresses []resolver.Address
}

State contains gRPCLB-relevant data passed from the name resolver.

func Get

func Get(state resolver.State) *State

Get returns the grpclb State in the resolver.State, or nil if not present. The returned data should not be mutated.

Jump to

Keyboard shortcuts

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