Versions in this module Expand all Collapse all v1 v1.36.0 Jan 25, 2021 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 SetMaxRequests(serviceName string, maxRequests *uint32) + 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, 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() (*Client, error) + func NewWithConfigForTesting(config *bootstrap.Config, watchExpiryTimeout time.Duration) (*Client, error) + func (c *Client) BootstrapConfig() *bootstrap.Config + 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) (*load.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(serviceName string, cb func(ListenerUpdate, error)) (cancel func()) + func (c Client) WatchRouteConfig(routeName string, cb func(RouteConfigUpdate, error)) (cancel func()) + type ClusterUpdate struct + EnableLRS bool + MaxRequests *uint32 + SecurityCfg *SecurityConfig + 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 + MaxStreamDuration time.Duration + RouteConfigName string + SecurityCfg *SecurityConfig + func (lu *ListenerUpdate) String() string + type Locality struct + Endpoints []Endpoint + ID internal.LocalityID + Priority uint32 + Weight uint32 + 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 + CaseInsensitive bool + Fraction *uint32 + Headers []*HeaderMatcher + MaxStreamDuration *time.Duration + Path *string + Prefix *string + Regex *string + type RouteConfigUpdate struct + VirtualHosts []*VirtualHost + type SecurityConfig struct + AcceptedSANs []string + IdentityCertName string + IdentityInstanceName string + RequireClientCert bool + RootCertName string + RootInstanceName string + type ServiceRequestsCounter struct + ServiceName string + func GetServiceRequestsCounter(serviceName string) *ServiceRequestsCounter + func (c *ServiceRequestsCounter) EndRequest() + func (c *ServiceRequestsCounter) StartRequest() error + 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 + HandleLoadStatsResponse func(s grpc.ClientStream) (clusters []string, _ time.Duration, _ error) + HandleResponse func(proto.Message) (ResourceType, string, string, error) + NewLoadStatsStream func(ctx context.Context, cc *grpc.ClientConn) (grpc.ClientStream, error) + NewStream func(ctx context.Context) (grpc.ClientStream, error) + RecvResponse func(s grpc.ClientStream) (proto.Message, error) + SendFirstLoadStatsRequest func(s grpc.ClientStream) error + SendLoadStatsRequest func(s grpc.ClientStream, loads []*load.Data) error + SendRequest func(s grpc.ClientStream, resourceNames []string, rType ResourceType, ...) error + type VirtualHost struct + Domains []string + Routes []*Route v1.35.3-lb Jan 25, 2021