Versions in this module Expand all Collapse all v1 v1.33.1 Sep 1, 2020 Changes in this version + func IsClusterResource(url string) bool + func IsEndpointsResource(url string) bool + func IsHTTPConnManagerResource(url string) bool + func IsListenerResource(url string) bool + func IsRouteConfigResource(url string) bool + func NewErrorf(t ErrorType, format string, args ...interface{}) error + func RegisterAPIClientBuilder(b APIClientBuilder) + func UnmarshalCluster(resources []*anypb.Any, logger *grpclog.PrefixLogger) (map[string]ClusterUpdate, error) + func UnmarshalEndpoints(resources []*anypb.Any, logger *grpclog.PrefixLogger) (map[string]EndpointsUpdate, error) + func UnmarshalListener(resources []*anypb.Any, logger *grpclog.PrefixLogger) (map[string]ListenerUpdate, error) + func UnmarshalRouteConfig(resources []*anypb.Any, hostname string, logger *grpclog.PrefixLogger) (map[string]RouteConfigUpdate, error) + type APIClient interface + AddWatch func(ResourceType, string) + Close func() + RemoveWatch func(ResourceType, string) + type APIClientBuilder interface + Build func(*grpc.ClientConn, BuildOptions) (APIClient, error) + Version func() version.TransportAPI + type BuildOptions struct + Backoff func(int) time.Duration + Logger *grpclog.PrefixLogger + NodeProto proto.Message + Parent UpdateHandler + type Client struct + func New(opts Options) (*Client, error) + func (c *Client) Close() + func (c *Client) NewClusters(updates map[string]ClusterUpdate) + func (c *Client) NewEndpoints(updates map[string]EndpointsUpdate) + func (c *Client) NewListeners(updates map[string]ListenerUpdate) + func (c *Client) NewRouteConfigs(updates map[string]RouteConfigUpdate) + func (c *Client) ReportLoad(server string, clusterName string, loadStore lrs.Store) func() + func (c *Client) WatchCluster(clusterName string, cb func(ClusterUpdate, error)) (cancel func()) + func (c *Client) WatchEndpoints(clusterName string, cb func(EndpointsUpdate, error)) (cancel func()) + func (c *Client) WatchListener(listener string, cb func(ListenerUpdate, error)) (cancel func()) + func (c *Client) WatchService(serviceName string, cb func(ServiceUpdate, error)) (cancel func()) + type ClusterUpdate struct + EnableLRS bool + ServiceName string + type Endpoint struct + Address string + HealthStatus EndpointHealthStatus + Weight uint32 + type EndpointHealthStatus int32 + const EndpointHealthStatusDegraded + const EndpointHealthStatusDraining + const EndpointHealthStatusHealthy + const EndpointHealthStatusTimeout + const EndpointHealthStatusUnhealthy + const EndpointHealthStatusUnknown + type EndpointsUpdate struct + Drops []OverloadDropConfig + Localities []Locality + type ErrResourceTypeUnsupported struct + ErrStr string + func (e ErrResourceTypeUnsupported) Error() string + type ErrorType int + const ErrorTypeConnection + const ErrorTypeResourceNotFound + const ErrorTypeUnknown + func ErrType(e error) ErrorType + type HeaderMatcher struct + ExactMatch *string + InvertMatch *bool + Name string + PrefixMatch *string + PresentMatch *bool + RangeMatch *Int64Range + RegexMatch *string + SuffixMatch *string + type Int64Range struct + End int64 + Start int64 + type ListenerUpdate struct + RouteConfigName string + type Locality struct + Endpoints []Endpoint + ID internal.LocalityID + Priority uint32 + Weight uint32 + type Options struct + Config bootstrap.Config + DialOpts []grpc.DialOption + TargetName string + WatchExpiryTimeout time.Duration + type OverloadDropConfig struct + Category string + Denominator uint32 + Numerator uint32 + type ResourceType int + const ClusterResource + const EndpointsResource + const HTTPConnManagerResource + const ListenerResource + const RouteConfigResource + const UnknownResource + func (r ResourceType) String() string + type Route struct + Action map[string]uint32 + Fraction *uint32 + Headers []*HeaderMatcher + Path *string + Prefix *string + Regex *string + type RouteConfigUpdate struct + Routes []*Route + type ServiceUpdate struct + Routes []*Route + type TransportHelper struct + func NewTransportHelper(vc VersionedClient, logger *grpclog.PrefixLogger, ...) *TransportHelper + func (t *TransportHelper) AddWatch(rType ResourceType, resourceName string) + func (t *TransportHelper) Close() + func (t *TransportHelper) RemoveWatch(rType ResourceType, resourceName string) + type UpdateHandler interface + NewClusters func(map[string]ClusterUpdate) + NewEndpoints func(map[string]EndpointsUpdate) + NewListeners func(map[string]ListenerUpdate) + NewRouteConfigs func(map[string]RouteConfigUpdate) + type VersionedClient interface + HandleResponse func(proto.Message) (ResourceType, string, string, error) + NewStream func(ctx context.Context) (grpc.ClientStream, error) + RecvResponse func(stream grpc.ClientStream) (proto.Message, error) + SendRequest func(s grpc.ClientStream, resourceNames []string, rType ResourceType, ...) error