grpc: google.golang.org/grpc/resolver/manual Index | Files

package manual

import "google.golang.org/grpc/resolver/manual"

Package manual defines a resolver that can be used to manually send resolved addresses to ClientConn.

Index

Package Files

manual.go

type Resolver Uses

type Resolver struct {
    // contains filtered or unexported fields
}

Resolver is also a resolver builder. It's build() function always returns itself.

func GenerateAndRegisterManualResolver Uses

func GenerateAndRegisterManualResolver() (*Resolver, func())

GenerateAndRegisterManualResolver generates a random scheme and a Resolver with it. It also registers this Resolver. It returns the Resolver and a cleanup function to unregister it.

func NewBuilderWithScheme Uses

func NewBuilderWithScheme(scheme string) *Resolver

NewBuilderWithScheme creates a new test resolver builder with the given scheme.

func (*Resolver) Build Uses

func (r *Resolver) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOption) (resolver.Resolver, error)

Build returns itself for Resolver, because it's both a builder and a resolver.

func (*Resolver) Close Uses

func (*Resolver) Close()

Close is a noop for Resolver.

func (*Resolver) InitialAddrs Uses

func (r *Resolver) InitialAddrs(addrs []resolver.Address)

InitialAddrs adds resolved addresses to the resolver so that NewAddress doesn't need to be explicitly called after Dial.

func (*Resolver) NewAddress Uses

func (r *Resolver) NewAddress(addrs []resolver.Address)

NewAddress calls cc.NewAddress.

func (*Resolver) NewServiceConfig Uses

func (r *Resolver) NewServiceConfig(sc string)

NewServiceConfig calls cc.NewServiceConfig.

func (*Resolver) ResolveNow Uses

func (*Resolver) ResolveNow(o resolver.ResolveNowOption)

ResolveNow is a noop for Resolver.

func (*Resolver) Scheme Uses

func (r *Resolver) Scheme() string

Scheme returns the test scheme.

Package manual imports 3 packages (graph) and is imported by 4 packages. Updated 2018-04-04. Refresh now. Tools for package owners.