package
0.6.5
Repository: https://github.com/chronos-tachyon/roxy.git
Documentation: pkg.go.dev

# Functions

EnableCheck enables performance-degrading data integrity checks.
GetATCClient retrieves the attached ATC client.
GetEtcdV3Client retrieves the attached etcd.io client.
GetMembership retrieves the attached *membership.Roxy, or nil if none attached.
GetResolved retrieves the attached Resolved.
GetZKConn retrieves the attached ZooKeeper client connection.
Logger returns the global logger to use for Resolver background threads.
MakeATCResolveFunc constructs a WatchingResolveFunc for building your own custom WatchingResolver with the "atc" scheme.
MakeDNSResolveFunc constructs a PollingResolveFunc for building your own custom PollingResolver with the "dns" scheme.
MakeEtcdResolveFunc constructs a WatchingResolveFunc for building your own custom WatchingResolver with the "etcd" scheme.
MakeSRVResolveFunc constructs a PollingResolveFunc for building your own custom PollingResolver with the "srv" scheme.
MakeZKResolveFunc constructs a WatchingResolveFunc for building your own custom WatchingResolver with the "zk" scheme.
MapEtcdError converts an etcd.io-specific error to a generic error.
MapZKError converts a ZooKeeper-specific error to a generic error.
New constructs a new Resolver.
NewATCBalancerBuilder returns a gRPC balancer.Builder for the ATC load balancing algorithm.
NewATCBuilder constructs a new gRPC resolver.Builder for the "atc" scheme.
NewATCResolver constructs a new Resolver for the "atc" scheme.
NewDNSBuilder constructs a new gRPC resolver.Builder for the "dns" scheme.
NewDNSResolver constructs a new Resolver for the "dns" scheme.
NewEtcdBuilder constructs a new gRPC resolver.Builder for the "etcd" scheme.
NewEtcdResolver constructs a new Resolver for the "etcd" scheme.
NewIPBuilder constructs a new gRPC resolver.Builder for the "ip" scheme.
NewIPResolver constructs a new Resolver for the "ip" scheme.
NewPollingResolver constructs a new PollingResolver.
NewSRVBuilder constructs a new gRPC resolver.Builder for the "srv" scheme.
NewSRVResolver constructs a new Resolver for the "srv" scheme.
NewStaticResolver constructs a new StaticResolver.
NewUnixResolver constructs a new Resolver for the "unix" scheme.
NewWatchingResolver constructs a new WatchingResolver.
NewZKBuilder constructs a new gRPC resolver.Builder for the "zk" scheme.
NewZKResolver constructs a new Resolver for the "zk" scheme.
SetLogger sets the global logger to use for Resolver background threads.
WithATCClient attaches an ATC client to the given context.
WithEtcdV3Client attaches an etcd.io client to the given context.
WithMembership returns a copy of addr with the given *membership.Roxy attached.
WithResolved returns a copy of addr with the given Resolved attached.
WithStandardResolvers returns a gRPC DialOption that enables as many Target schemes as possible on the gRPC ClientConn being created.
WithZKConn attaches a ZooKeeper client connection to the given context.

# Constants

ATCClientContextKey is the context.Context key for attaching an *atcclient.ATCClient.
BadDataEvent is an Event with an erroneous address.
DefaultCooldownInterval is the default value of CooldownInterval if not specified.
DefaultPollInterval is the default value of PollInterval if not specified.
DeleteEvent is an Event with a deleted address.
ErrorEvent is an Event with a global error.
MaxPollInterval is the maximum permitted value of PollInterval.
MembershipAttrKey is the gRPC attributes.Attributes key for retrieving the original *membership.Roxy, if any.
NewServiceConfigEvent is an Event with a new gRPC service config.
NoOpEvent is an Event with no data.
RandomBalancer chooses an address with uniform probability.
ResolvedAttrKey is the gRPC attributes.Attributes key for retrieving the Resolved address.
RoundRobinBalancer chooses an address from a random permutation.
SRVBalancer chooses an address using the rules for DNS SRV records.
StatusChangeEvent is an Event with an address whose metadata has changed.
UpdateEvent is an Event with a new or changed address.
V3ClientContextKey is the context.Context key for attaching an etcd.io *v3.Client.
WeightedRandomBalancer chooses an address with weighted probability.
WeightedRoundRobinBalancer chooses an address from a random shuffle that has zero or more copies of each address, each in proportion to that address's weight.
ZKConnContextKey is the context.Context key for attaching a *zk.Conn.

# Structs

ATCTarget represents a parsed target spec for the "atc" scheme.
DNSTarget represents a parsed target spec for the "dns" scheme.
Dynamic represents the mutable, mutex-protected data associated with one or more Resolved addresses.
EtcdTarget represents a parsed target spec for the "etcd" scheme.
Event represents the Resolver state changes triggered by some event.
IPTarget represents a parsed target spec for the "ip" scheme.
NodeDeletedError indicates that a server is in a bad state.
Options holds options related to constructing a new Resolver.
PollingResolver is an implementation of the Resolver interface that periodically polls for record changes.
PollingResolverOptions holds options related to constructing a new PollingResolver.
Resolved represents a resolved address.
ResolveError indicates a problem with a specific address.
SRVTarget represents a parsed target spec for the "srv" scheme.
StaticResolver is an implementation of the Resolver interface that returns the same static records every time.
StaticResolverOptions holds options related to constructing a new StaticResolver.
StatusError indicates that a server is in a bad state.
Target represents a parsed Resolver target name.
UnixTarget represents a parsed target spec for the "unix" or "unix-abstract" schemes.
UpdateOptions holds options for the Resolver.Update method.
WatchingResolver is an implementation of the Resolver interface that subscribes to an event-oriented resolution source.
WatchingResolverOptions holds options related to constructing a new WatchingResolver.
ZKTarget represents a parsed target spec for the "zk" scheme.

# Interfaces

Resolver is an interface for obtaining resolved addresses and/or watching for address resolution changes.

# Type aliases

BalancerType indicates which load balancer algorithm is in use.
EventType indicates the type of an Event.
PollingResolveFunc represents a closure that will be called periodically to resolve addresses.
ResolvedList is a sorted list of Resolved addresses.
WatchFunc denotes a callback which will be called whenever a Resolver's state changes.
WatchID uniquely identifies a call to Resolver.Watch.
WatchingResolveFunc represents a closure that will be called as needed to start a resolver subscription.