...

Package grpc_lookup_v1

import "google.golang.org/grpc/internal/proto/grpc_lookup_v1"
Overview
Index

Overview ▾

Index ▾

Constants
Variables
func RegisterRouteLookupServiceServer(s grpc.ServiceRegistrar, srv RouteLookupServiceServer)
type GrpcKeyBuilder
    func (*GrpcKeyBuilder) Descriptor() ([]byte, []int)
    func (x *GrpcKeyBuilder) GetConstantKeys() map[string]string
    func (x *GrpcKeyBuilder) GetExtraKeys() *GrpcKeyBuilder_ExtraKeys
    func (x *GrpcKeyBuilder) GetHeaders() []*NameMatcher
    func (x *GrpcKeyBuilder) GetNames() []*GrpcKeyBuilder_Name
    func (*GrpcKeyBuilder) ProtoMessage()
    func (x *GrpcKeyBuilder) ProtoReflect() protoreflect.Message
    func (x *GrpcKeyBuilder) Reset()
    func (x *GrpcKeyBuilder) String() string
type GrpcKeyBuilder_ExtraKeys
    func (*GrpcKeyBuilder_ExtraKeys) Descriptor() ([]byte, []int)
    func (x *GrpcKeyBuilder_ExtraKeys) GetHost() string
    func (x *GrpcKeyBuilder_ExtraKeys) GetMethod() string
    func (x *GrpcKeyBuilder_ExtraKeys) GetService() string
    func (*GrpcKeyBuilder_ExtraKeys) ProtoMessage()
    func (x *GrpcKeyBuilder_ExtraKeys) ProtoReflect() protoreflect.Message
    func (x *GrpcKeyBuilder_ExtraKeys) Reset()
    func (x *GrpcKeyBuilder_ExtraKeys) String() string
type GrpcKeyBuilder_Name
    func (*GrpcKeyBuilder_Name) Descriptor() ([]byte, []int)
    func (x *GrpcKeyBuilder_Name) GetMethod() string
    func (x *GrpcKeyBuilder_Name) GetService() string
    func (*GrpcKeyBuilder_Name) ProtoMessage()
    func (x *GrpcKeyBuilder_Name) ProtoReflect() protoreflect.Message
    func (x *GrpcKeyBuilder_Name) Reset()
    func (x *GrpcKeyBuilder_Name) String() string
type HttpKeyBuilder
    func (*HttpKeyBuilder) Descriptor() ([]byte, []int)
    func (x *HttpKeyBuilder) GetConstantKeys() map[string]string
    func (x *HttpKeyBuilder) GetHeaders() []*NameMatcher
    func (x *HttpKeyBuilder) GetHostPatterns() []string
    func (x *HttpKeyBuilder) GetPathPatterns() []string
    func (x *HttpKeyBuilder) GetQueryParameters() []*NameMatcher
    func (*HttpKeyBuilder) ProtoMessage()
    func (x *HttpKeyBuilder) ProtoReflect() protoreflect.Message
    func (x *HttpKeyBuilder) Reset()
    func (x *HttpKeyBuilder) String() string
type NameMatcher
    func (*NameMatcher) Descriptor() ([]byte, []int)
    func (x *NameMatcher) GetKey() string
    func (x *NameMatcher) GetNames() []string
    func (x *NameMatcher) GetRequiredMatch() bool
    func (*NameMatcher) ProtoMessage()
    func (x *NameMatcher) ProtoReflect() protoreflect.Message
    func (x *NameMatcher) Reset()
    func (x *NameMatcher) String() string
type RouteLookupClusterSpecifier
    func (*RouteLookupClusterSpecifier) Descriptor() ([]byte, []int)
    func (x *RouteLookupClusterSpecifier) GetRouteLookupConfig() *RouteLookupConfig
    func (*RouteLookupClusterSpecifier) ProtoMessage()
    func (x *RouteLookupClusterSpecifier) ProtoReflect() protoreflect.Message
    func (x *RouteLookupClusterSpecifier) Reset()
    func (x *RouteLookupClusterSpecifier) String() string
type RouteLookupConfig
    func (*RouteLookupConfig) Descriptor() ([]byte, []int)
    func (x *RouteLookupConfig) GetCacheSizeBytes() int64
    func (x *RouteLookupConfig) GetDefaultTarget() string
    func (x *RouteLookupConfig) GetGrpcKeybuilders() []*GrpcKeyBuilder
    func (x *RouteLookupConfig) GetHttpKeybuilders() []*HttpKeyBuilder
    func (x *RouteLookupConfig) GetLookupService() string
    func (x *RouteLookupConfig) GetLookupServiceTimeout() *durationpb.Duration
    func (x *RouteLookupConfig) GetMaxAge() *durationpb.Duration
    func (x *RouteLookupConfig) GetStaleAge() *durationpb.Duration
    func (x *RouteLookupConfig) GetValidTargets() []string
    func (*RouteLookupConfig) ProtoMessage()
    func (x *RouteLookupConfig) ProtoReflect() protoreflect.Message
    func (x *RouteLookupConfig) Reset()
    func (x *RouteLookupConfig) String() string
type RouteLookupRequest
    func (*RouteLookupRequest) Descriptor() ([]byte, []int)
    func (x *RouteLookupRequest) GetExtensions() []*anypb.Any
    func (x *RouteLookupRequest) GetKeyMap() map[string]string
    func (x *RouteLookupRequest) GetReason() RouteLookupRequest_Reason
    func (x *RouteLookupRequest) GetStaleHeaderData() string
    func (x *RouteLookupRequest) GetTargetType() string
    func (*RouteLookupRequest) ProtoMessage()
    func (x *RouteLookupRequest) ProtoReflect() protoreflect.Message
    func (x *RouteLookupRequest) Reset()
    func (x *RouteLookupRequest) String() string
type RouteLookupRequest_Reason
    func (RouteLookupRequest_Reason) Descriptor() protoreflect.EnumDescriptor
    func (x RouteLookupRequest_Reason) Enum() *RouteLookupRequest_Reason
    func (RouteLookupRequest_Reason) EnumDescriptor() ([]byte, []int)
    func (x RouteLookupRequest_Reason) Number() protoreflect.EnumNumber
    func (x RouteLookupRequest_Reason) String() string
    func (RouteLookupRequest_Reason) Type() protoreflect.EnumType
type RouteLookupResponse
    func (*RouteLookupResponse) Descriptor() ([]byte, []int)
    func (x *RouteLookupResponse) GetExtensions() []*anypb.Any
    func (x *RouteLookupResponse) GetHeaderData() string
    func (x *RouteLookupResponse) GetTargets() []string
    func (*RouteLookupResponse) ProtoMessage()
    func (x *RouteLookupResponse) ProtoReflect() protoreflect.Message
    func (x *RouteLookupResponse) Reset()
    func (x *RouteLookupResponse) String() string
type RouteLookupServiceClient
    func NewRouteLookupServiceClient(cc grpc.ClientConnInterface) RouteLookupServiceClient
type RouteLookupServiceServer
type UnimplementedRouteLookupServiceServer
    func (UnimplementedRouteLookupServiceServer) RouteLookup(context.Context, *RouteLookupRequest) (*RouteLookupResponse, error)
type UnsafeRouteLookupServiceServer

Package files

rls.pb.go rls_config.pb.go rls_grpc.pb.go

Constants

const (
    RouteLookupService_RouteLookup_FullMethodName = "/grpc.lookup.v1.RouteLookupService/RouteLookup"
)

Variables

Enum value maps for RouteLookupRequest_Reason.

var (
    RouteLookupRequest_Reason_name = map[int32]string{
        0: "REASON_UNKNOWN",
        1: "REASON_MISS",
        2: "REASON_STALE",
    }
    RouteLookupRequest_Reason_value = map[string]int32{
        "REASON_UNKNOWN": 0,
        "REASON_MISS":    1,
        "REASON_STALE":   2,
    }
)
var File_grpc_lookup_v1_rls_config_proto protoreflect.FileDescriptor
var File_grpc_lookup_v1_rls_proto protoreflect.FileDescriptor

RouteLookupService_ServiceDesc is the grpc.ServiceDesc for RouteLookupService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

var RouteLookupService_ServiceDesc = grpc.ServiceDesc{
    ServiceName: "grpc.lookup.v1.RouteLookupService",
    HandlerType: (*RouteLookupServiceServer)(nil),
    Methods: []grpc.MethodDesc{
        {
            MethodName: "RouteLookup",
            Handler:    _RouteLookupService_RouteLookup_Handler,
        },
    },
    Streams:  []grpc.StreamDesc{},
    Metadata: "grpc/lookup/v1/rls.proto",
}

func RegisterRouteLookupServiceServer

func RegisterRouteLookupServiceServer(s grpc.ServiceRegistrar, srv RouteLookupServiceServer)

type GrpcKeyBuilder

A GrpcKeyBuilder applies to a given gRPC service, name, and headers.

type GrpcKeyBuilder struct {
    Names     []*GrpcKeyBuilder_Name    `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"`
    ExtraKeys *GrpcKeyBuilder_ExtraKeys `protobuf:"bytes,3,opt,name=extra_keys,json=extraKeys,proto3" json:"extra_keys,omitempty"`
    // Extract keys from all listed headers.
    // For gRPC, it is an error to specify "required_match" on the NameMatcher
    // protos.
    Headers []*NameMatcher `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"`
    // You can optionally set one or more specific key/value pairs to be added to
    // the key_map.  This can be useful to identify which builder built the key,
    // for example if you are suppressing the actual method, but need to
    // separately cache and request all the matched methods.
    ConstantKeys map[string]string `protobuf:"bytes,4,rep,name=constant_keys,json=constantKeys,proto3" json:"constant_keys,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    // contains filtered or unexported fields
}

func (*GrpcKeyBuilder) Descriptor

func (*GrpcKeyBuilder) Descriptor() ([]byte, []int)

Deprecated: Use GrpcKeyBuilder.ProtoReflect.Descriptor instead.

func (*GrpcKeyBuilder) GetConstantKeys

func (x *GrpcKeyBuilder) GetConstantKeys() map[string]string

func (*GrpcKeyBuilder) GetExtraKeys

func (x *GrpcKeyBuilder) GetExtraKeys() *GrpcKeyBuilder_ExtraKeys

func (*GrpcKeyBuilder) GetHeaders

func (x *GrpcKeyBuilder) GetHeaders() []*NameMatcher

func (*GrpcKeyBuilder) GetNames

func (x *GrpcKeyBuilder) GetNames() []*GrpcKeyBuilder_Name

func (*GrpcKeyBuilder) ProtoMessage

func (*GrpcKeyBuilder) ProtoMessage()

func (*GrpcKeyBuilder) ProtoReflect

func (x *GrpcKeyBuilder) ProtoReflect() protoreflect.Message

func (*GrpcKeyBuilder) Reset

func (x *GrpcKeyBuilder) Reset()

func (*GrpcKeyBuilder) String

func (x *GrpcKeyBuilder) String() string

type GrpcKeyBuilder_ExtraKeys

If you wish to include the host, service, or method names as keys in the generated RouteLookupRequest, specify key names to use in the extra_keys submessage. If a key name is empty, no key will be set for that value. If this submessage is specified, the normal host/path fields will be left unset in the RouteLookupRequest. We are deprecating host/path in the RouteLookupRequest, so services should migrate to the ExtraKeys approach.

type GrpcKeyBuilder_ExtraKeys struct {
    Host    string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
    Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"`
    Method  string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"`
    // contains filtered or unexported fields
}

func (*GrpcKeyBuilder_ExtraKeys) Descriptor

func (*GrpcKeyBuilder_ExtraKeys) Descriptor() ([]byte, []int)

Deprecated: Use GrpcKeyBuilder_ExtraKeys.ProtoReflect.Descriptor instead.

func (*GrpcKeyBuilder_ExtraKeys) GetHost

func (x *GrpcKeyBuilder_ExtraKeys) GetHost() string

func (*GrpcKeyBuilder_ExtraKeys) GetMethod

func (x *GrpcKeyBuilder_ExtraKeys) GetMethod() string

func (*GrpcKeyBuilder_ExtraKeys) GetService

func (x *GrpcKeyBuilder_ExtraKeys) GetService() string

func (*GrpcKeyBuilder_ExtraKeys) ProtoMessage

func (*GrpcKeyBuilder_ExtraKeys) ProtoMessage()

func (*GrpcKeyBuilder_ExtraKeys) ProtoReflect

func (x *GrpcKeyBuilder_ExtraKeys) ProtoReflect() protoreflect.Message

func (*GrpcKeyBuilder_ExtraKeys) Reset

func (x *GrpcKeyBuilder_ExtraKeys) Reset()

func (*GrpcKeyBuilder_ExtraKeys) String

func (x *GrpcKeyBuilder_ExtraKeys) String() string

type GrpcKeyBuilder_Name

To match, one of the given Name fields must match; the service and method fields are specified as fixed strings. The service name is required and includes the proto package name. The method name may be omitted, in which case any method on the given service is matched.

type GrpcKeyBuilder_Name struct {
    Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
    Method  string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
    // contains filtered or unexported fields
}

func (*GrpcKeyBuilder_Name) Descriptor

func (*GrpcKeyBuilder_Name) Descriptor() ([]byte, []int)

Deprecated: Use GrpcKeyBuilder_Name.ProtoReflect.Descriptor instead.

func (*GrpcKeyBuilder_Name) GetMethod

func (x *GrpcKeyBuilder_Name) GetMethod() string

func (*GrpcKeyBuilder_Name) GetService

func (x *GrpcKeyBuilder_Name) GetService() string

func (*GrpcKeyBuilder_Name) ProtoMessage

func (*GrpcKeyBuilder_Name) ProtoMessage()

func (*GrpcKeyBuilder_Name) ProtoReflect

func (x *GrpcKeyBuilder_Name) ProtoReflect() protoreflect.Message

func (*GrpcKeyBuilder_Name) Reset

func (x *GrpcKeyBuilder_Name) Reset()

func (*GrpcKeyBuilder_Name) String

func (x *GrpcKeyBuilder_Name) String() string

type HttpKeyBuilder

An HttpKeyBuilder applies to a given HTTP URL and headers.

Path and host patterns use the matching syntax from gRPC transcoding to extract named key/value pairs from the path and host components of the URL: https://github.com/googleapis/googleapis/blob/master/google/api/http.proto

It is invalid to specify the same key name in multiple places in a pattern.

For a service where the project id can be expressed either as a subdomain or in the path, separate HttpKeyBuilders must be used:

host_pattern: 'example.com' path_pattern: '/{id}/{object}/**'
host_pattern: '{id}.example.com' path_pattern: '/{object}/**'

If the host is exactly 'example.com', the first path segment will be used as the id and the second segment as the object. If the host has a subdomain, the subdomain will be used as the id and the first segment as the object. If neither pattern matches, no keys will be extracted.

type HttpKeyBuilder struct {

    // host_pattern is an ordered list of host template patterns for the desired
    // value.  If any host_pattern values are specified, then at least one must
    // match, and the last one wins and sets any specified variables.  A host
    // consists of labels separated by dots. Each label is matched against the
    // label in the pattern as follows:
    //   - "*": Matches any single label.
    //   - "**": Matches zero or more labels (first or last part of host only).
    //   - "{<name>=...}": One or more label capture, where "..." can be any
    //     template that does not include a capture.
    //   - "{<name>}": A single label capture. Identical to {<name>=*}.
    //
    // Examples:
    //   - "example.com": Only applies to the exact host example.com.
    //   - "*.example.com": Matches subdomains of example.com.
    //   - "**.example.com": matches example.com, and all levels of subdomains.
    //   - "{project}.example.com": Extracts the third level subdomain.
    //   - "{project=**}.example.com": Extracts the third level+ subdomains.
    //   - "{project=**}": Extracts the entire host.
    HostPatterns []string `protobuf:"bytes,1,rep,name=host_patterns,json=hostPatterns,proto3" json:"host_patterns,omitempty"`
    // path_pattern is an ordered list of path template patterns for the desired
    // value.  If any path_pattern values are specified, then at least one must
    // match, and the last one wins and sets any specified variables.  A path
    // consists of segments separated by slashes. Each segment is matched against
    // the segment in the pattern as follows:
    //   - "*": Matches any single segment.
    //   - "**": Matches zero or more segments (first or last part of path only).
    //   - "{<name>=...}": One or more segment capture, where "..." can be any
    //     template that does not include a capture.
    //   - "{<name>}": A single segment capture. Identical to {<name>=*}.
    //
    // A custom method may also be specified by appending ":" and the custom
    // method name or "*" to indicate any custom method (including no custom
    // method).  For example, "/*/projects/{project_id}/**:*" extracts
    // `{project_id}` for any version, resource and custom method that includes
    // it.  By default, any custom method will be matched.
    //
    // Examples:
    //   - "/v1/{name=messages/*}": extracts a name like "messages/12345".
    //   - "/v1/messages/{message_id}": extracts a message_id like "12345".
    //   - "/v1/users/{user_id}/messages/{message_id}": extracts two key values.
    PathPatterns []string `protobuf:"bytes,2,rep,name=path_patterns,json=pathPatterns,proto3" json:"path_patterns,omitempty"`
    // List of query parameter names to try to match.
    // For example: ["parent", "name", "resource.name"]
    // We extract all the specified query_parameters (case-sensitively).  If any
    // are marked as "required_match" and are not present, this keybuilder fails
    // to match.  If a given parameter appears multiple times (?foo=a&foo=b) we
    // will report it as a comma-separated string (foo=a,b).
    QueryParameters []*NameMatcher `protobuf:"bytes,3,rep,name=query_parameters,json=queryParameters,proto3" json:"query_parameters,omitempty"`
    // List of headers to try to match.
    // We extract all the specified header values (case-insensitively).  If any
    // are marked as "required_match" and are not present, this keybuilder fails
    // to match.  If a given header appears multiple times in the request we will
    // report it as a comma-separated string, in standard HTTP fashion.
    Headers []*NameMatcher `protobuf:"bytes,4,rep,name=headers,proto3" json:"headers,omitempty"`
    // You can optionally set one or more specific key/value pairs to be added to
    // the key_map.  This can be useful to identify which builder built the key,
    // for example if you are suppressing a lot of information from the URL, but
    // need to separately cache and request URLs with that content.
    ConstantKeys map[string]string `protobuf:"bytes,5,rep,name=constant_keys,json=constantKeys,proto3" json:"constant_keys,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    // contains filtered or unexported fields
}

func (*HttpKeyBuilder) Descriptor

func (*HttpKeyBuilder) Descriptor() ([]byte, []int)

Deprecated: Use HttpKeyBuilder.ProtoReflect.Descriptor instead.

func (*HttpKeyBuilder) GetConstantKeys

func (x *HttpKeyBuilder) GetConstantKeys() map[string]string

func (*HttpKeyBuilder) GetHeaders

func (x *HttpKeyBuilder) GetHeaders() []*NameMatcher

func (*HttpKeyBuilder) GetHostPatterns

func (x *HttpKeyBuilder) GetHostPatterns() []string

func (*HttpKeyBuilder) GetPathPatterns

func (x *HttpKeyBuilder) GetPathPatterns() []string

func (*HttpKeyBuilder) GetQueryParameters

func (x *HttpKeyBuilder) GetQueryParameters() []*NameMatcher

func (*HttpKeyBuilder) ProtoMessage

func (*HttpKeyBuilder) ProtoMessage()

func (*HttpKeyBuilder) ProtoReflect

func (x *HttpKeyBuilder) ProtoReflect() protoreflect.Message

func (*HttpKeyBuilder) Reset

func (x *HttpKeyBuilder) Reset()

func (*HttpKeyBuilder) String

func (x *HttpKeyBuilder) String() string

type NameMatcher

Extract a key based on a given name (e.g. header name or query parameter name). The name must match one of the names listed in the "name" field. If the "required_match" field is true, one of the specified names must be present for the keybuilder to match.

type NameMatcher struct {

    // The name that will be used in the RLS key_map to refer to this value.
    // If required_match is true, you may omit this field or set it to an empty
    // string, in which case the matcher will require a match, but won't update
    // the key_map.
    Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
    // Ordered list of names (headers or query parameter names) that can supply
    // this value; the first one with a non-empty value is used.
    Names []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"`
    // If true, make this extraction required; the key builder will not match
    // if no value is found.
    RequiredMatch bool `protobuf:"varint,3,opt,name=required_match,json=requiredMatch,proto3" json:"required_match,omitempty"`
    // contains filtered or unexported fields
}

func (*NameMatcher) Descriptor

func (*NameMatcher) Descriptor() ([]byte, []int)

Deprecated: Use NameMatcher.ProtoReflect.Descriptor instead.

func (*NameMatcher) GetKey

func (x *NameMatcher) GetKey() string

func (*NameMatcher) GetNames

func (x *NameMatcher) GetNames() []string

func (*NameMatcher) GetRequiredMatch

func (x *NameMatcher) GetRequiredMatch() bool

func (*NameMatcher) ProtoMessage

func (*NameMatcher) ProtoMessage()

func (*NameMatcher) ProtoReflect

func (x *NameMatcher) ProtoReflect() protoreflect.Message

func (*NameMatcher) Reset

func (x *NameMatcher) Reset()

func (*NameMatcher) String

func (x *NameMatcher) String() string

type RouteLookupClusterSpecifier

RouteLookupClusterSpecifier is used in xDS to represent a cluster specifier plugin for RLS.

type RouteLookupClusterSpecifier struct {

    // The RLS config for this cluster specifier plugin instance.
    RouteLookupConfig *RouteLookupConfig `protobuf:"bytes,1,opt,name=route_lookup_config,json=routeLookupConfig,proto3" json:"route_lookup_config,omitempty"`
    // contains filtered or unexported fields
}

func (*RouteLookupClusterSpecifier) Descriptor

func (*RouteLookupClusterSpecifier) Descriptor() ([]byte, []int)

Deprecated: Use RouteLookupClusterSpecifier.ProtoReflect.Descriptor instead.

func (*RouteLookupClusterSpecifier) GetRouteLookupConfig

func (x *RouteLookupClusterSpecifier) GetRouteLookupConfig() *RouteLookupConfig

func (*RouteLookupClusterSpecifier) ProtoMessage

func (*RouteLookupClusterSpecifier) ProtoMessage()

func (*RouteLookupClusterSpecifier) ProtoReflect

func (x *RouteLookupClusterSpecifier) ProtoReflect() protoreflect.Message

func (*RouteLookupClusterSpecifier) Reset

func (x *RouteLookupClusterSpecifier) Reset()

func (*RouteLookupClusterSpecifier) String

func (x *RouteLookupClusterSpecifier) String() string

type RouteLookupConfig

type RouteLookupConfig struct {

    // Ordered specifications for constructing keys for HTTP requests.  Last
    // match wins.  If no HttpKeyBuilder matches, an empty key_map will be sent to
    // the lookup service; it should likely reply with a global default route
    // and raise an alert.
    HttpKeybuilders []*HttpKeyBuilder `protobuf:"bytes,1,rep,name=http_keybuilders,json=httpKeybuilders,proto3" json:"http_keybuilders,omitempty"`
    // Unordered specifications for constructing keys for gRPC requests.  All
    // GrpcKeyBuilders on this list must have unique "name" fields so that the
    // client is free to prebuild a hash map keyed by name.  If no GrpcKeyBuilder
    // matches, an empty key_map will be sent to the lookup service; it should
    // likely reply with a global default route and raise an alert.
    GrpcKeybuilders []*GrpcKeyBuilder `protobuf:"bytes,2,rep,name=grpc_keybuilders,json=grpcKeybuilders,proto3" json:"grpc_keybuilders,omitempty"`
    // The name of the lookup service as a gRPC URI.  Typically, this will be
    // a subdomain of the target, such as "lookup.datastore.googleapis.com".
    LookupService string `protobuf:"bytes,3,opt,name=lookup_service,json=lookupService,proto3" json:"lookup_service,omitempty"`
    // Configure a timeout value for lookup service requests.
    // Defaults to 10 seconds if not specified.
    LookupServiceTimeout *durationpb.Duration `protobuf:"bytes,4,opt,name=lookup_service_timeout,json=lookupServiceTimeout,proto3" json:"lookup_service_timeout,omitempty"`
    // How long are responses valid for (like HTTP Cache-Control).
    // If omitted or zero, the longest valid cache time is used.
    // This value is clamped to 5 minutes to avoid unflushable bad responses.
    MaxAge *durationpb.Duration `protobuf:"bytes,5,opt,name=max_age,json=maxAge,proto3" json:"max_age,omitempty"`
    // After a response has been in the client cache for this amount of time
    // and is re-requested, start an asynchronous RPC to re-validate it.
    // This value should be less than max_age by at least the length of a
    // typical RTT to the Route Lookup Service to fully mask the RTT latency.
    // If omitted, keys are only re-requested after they have expired.
    StaleAge *durationpb.Duration `protobuf:"bytes,6,opt,name=stale_age,json=staleAge,proto3" json:"stale_age,omitempty"`
    // Rough indicator of amount of memory to use for the client cache.  Some of
    // the data structure overhead is not accounted for, so actual memory consumed
    // will be somewhat greater than this value.  If this field is omitted or set
    // to zero, a client default will be used.  The value may be capped to a lower
    // amount based on client configuration.
    CacheSizeBytes int64 `protobuf:"varint,7,opt,name=cache_size_bytes,json=cacheSizeBytes,proto3" json:"cache_size_bytes,omitempty"`
    // This is a list of all the possible targets that can be returned by the
    // lookup service.  If a target not on this list is returned, it will be
    // treated the same as an unhealthy target.
    ValidTargets []string `protobuf:"bytes,8,rep,name=valid_targets,json=validTargets,proto3" json:"valid_targets,omitempty"`
    // This value provides a default target to use if needed.  If set, it will be
    // used if RLS returns an error, times out, or returns an invalid response.
    // Note that requests can be routed only to a subdomain of the original
    // target, e.g. "us_east_1.cloudbigtable.googleapis.com".
    DefaultTarget string `protobuf:"bytes,9,opt,name=default_target,json=defaultTarget,proto3" json:"default_target,omitempty"`
    // contains filtered or unexported fields
}

func (*RouteLookupConfig) Descriptor

func (*RouteLookupConfig) Descriptor() ([]byte, []int)

Deprecated: Use RouteLookupConfig.ProtoReflect.Descriptor instead.

func (*RouteLookupConfig) GetCacheSizeBytes

func (x *RouteLookupConfig) GetCacheSizeBytes() int64

func (*RouteLookupConfig) GetDefaultTarget

func (x *RouteLookupConfig) GetDefaultTarget() string

func (*RouteLookupConfig) GetGrpcKeybuilders

func (x *RouteLookupConfig) GetGrpcKeybuilders() []*GrpcKeyBuilder

func (*RouteLookupConfig) GetHttpKeybuilders

func (x *RouteLookupConfig) GetHttpKeybuilders() []*HttpKeyBuilder

func (*RouteLookupConfig) GetLookupService

func (x *RouteLookupConfig) GetLookupService() string

func (*RouteLookupConfig) GetLookupServiceTimeout

func (x *RouteLookupConfig) GetLookupServiceTimeout() *durationpb.Duration

func (*RouteLookupConfig) GetMaxAge

func (x *RouteLookupConfig) GetMaxAge() *durationpb.Duration

func (*RouteLookupConfig) GetStaleAge

func (x *RouteLookupConfig) GetStaleAge() *durationpb.Duration

func (*RouteLookupConfig) GetValidTargets

func (x *RouteLookupConfig) GetValidTargets() []string

func (*RouteLookupConfig) ProtoMessage

func (*RouteLookupConfig) ProtoMessage()

func (*RouteLookupConfig) ProtoReflect

func (x *RouteLookupConfig) ProtoReflect() protoreflect.Message

func (*RouteLookupConfig) Reset

func (x *RouteLookupConfig) Reset()

func (*RouteLookupConfig) String

func (x *RouteLookupConfig) String() string

type RouteLookupRequest

type RouteLookupRequest struct {

    // Target type allows the client to specify what kind of target format it
    // would like from RLS to allow it to find the regional server, e.g. "grpc".
    TargetType string `protobuf:"bytes,3,opt,name=target_type,json=targetType,proto3" json:"target_type,omitempty"`
    // Reason for making this request.
    Reason RouteLookupRequest_Reason `protobuf:"varint,5,opt,name=reason,proto3,enum=grpc.lookup.v1.RouteLookupRequest_Reason" json:"reason,omitempty"`
    // For REASON_STALE, the header_data from the stale response, if any.
    StaleHeaderData string `protobuf:"bytes,6,opt,name=stale_header_data,json=staleHeaderData,proto3" json:"stale_header_data,omitempty"`
    // Map of key values extracted via key builders for the gRPC or HTTP request.
    KeyMap map[string]string `protobuf:"bytes,4,rep,name=key_map,json=keyMap,proto3" json:"key_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    // Application-specific optional extensions.
    Extensions []*anypb.Any `protobuf:"bytes,7,rep,name=extensions,proto3" json:"extensions,omitempty"`
    // contains filtered or unexported fields
}

func (*RouteLookupRequest) Descriptor

func (*RouteLookupRequest) Descriptor() ([]byte, []int)

Deprecated: Use RouteLookupRequest.ProtoReflect.Descriptor instead.

func (*RouteLookupRequest) GetExtensions

func (x *RouteLookupRequest) GetExtensions() []*anypb.Any

func (*RouteLookupRequest) GetKeyMap

func (x *RouteLookupRequest) GetKeyMap() map[string]string

func (*RouteLookupRequest) GetReason

func (x *RouteLookupRequest) GetReason() RouteLookupRequest_Reason

func (*RouteLookupRequest) GetStaleHeaderData

func (x *RouteLookupRequest) GetStaleHeaderData() string

func (*RouteLookupRequest) GetTargetType

func (x *RouteLookupRequest) GetTargetType() string

func (*RouteLookupRequest) ProtoMessage

func (*RouteLookupRequest) ProtoMessage()

func (*RouteLookupRequest) ProtoReflect

func (x *RouteLookupRequest) ProtoReflect() protoreflect.Message

func (*RouteLookupRequest) Reset

func (x *RouteLookupRequest) Reset()

func (*RouteLookupRequest) String

func (x *RouteLookupRequest) String() string

type RouteLookupRequest_Reason

Possible reasons for making a request.

type RouteLookupRequest_Reason int32
const (
    RouteLookupRequest_REASON_UNKNOWN RouteLookupRequest_Reason = 0 // Unused
    RouteLookupRequest_REASON_MISS    RouteLookupRequest_Reason = 1 // No data available in local cache
    RouteLookupRequest_REASON_STALE   RouteLookupRequest_Reason = 2 // Data in local cache is stale
)

func (RouteLookupRequest_Reason) Descriptor

func (RouteLookupRequest_Reason) Descriptor() protoreflect.EnumDescriptor

func (RouteLookupRequest_Reason) Enum

func (x RouteLookupRequest_Reason) Enum() *RouteLookupRequest_Reason

func (RouteLookupRequest_Reason) EnumDescriptor

func (RouteLookupRequest_Reason) EnumDescriptor() ([]byte, []int)

Deprecated: Use RouteLookupRequest_Reason.Descriptor instead.

func (RouteLookupRequest_Reason) Number

func (x RouteLookupRequest_Reason) Number() protoreflect.EnumNumber

func (RouteLookupRequest_Reason) String

func (x RouteLookupRequest_Reason) String() string

func (RouteLookupRequest_Reason) Type

func (RouteLookupRequest_Reason) Type() protoreflect.EnumType

type RouteLookupResponse

type RouteLookupResponse struct {

    // Prioritized list (best one first) of addressable entities to use
    // for routing, using syntax requested by the request target_type.
    // The targets will be tried in order until a healthy one is found.
    Targets []string `protobuf:"bytes,3,rep,name=targets,proto3" json:"targets,omitempty"`
    // Optional header value to pass along to AFE in the X-Google-RLS-Data header.
    // Cached with "target" and sent with all requests that match the request key.
    // Allows the RLS to pass its work product to the eventual target.
    HeaderData string `protobuf:"bytes,2,opt,name=header_data,json=headerData,proto3" json:"header_data,omitempty"`
    // Application-specific optional extensions.
    Extensions []*anypb.Any `protobuf:"bytes,4,rep,name=extensions,proto3" json:"extensions,omitempty"`
    // contains filtered or unexported fields
}

func (*RouteLookupResponse) Descriptor

func (*RouteLookupResponse) Descriptor() ([]byte, []int)

Deprecated: Use RouteLookupResponse.ProtoReflect.Descriptor instead.

func (*RouteLookupResponse) GetExtensions

func (x *RouteLookupResponse) GetExtensions() []*anypb.Any

func (*RouteLookupResponse) GetHeaderData

func (x *RouteLookupResponse) GetHeaderData() string

func (*RouteLookupResponse) GetTargets

func (x *RouteLookupResponse) GetTargets() []string

func (*RouteLookupResponse) ProtoMessage

func (*RouteLookupResponse) ProtoMessage()

func (*RouteLookupResponse) ProtoReflect

func (x *RouteLookupResponse) ProtoReflect() protoreflect.Message

func (*RouteLookupResponse) Reset

func (x *RouteLookupResponse) Reset()

func (*RouteLookupResponse) String

func (x *RouteLookupResponse) String() string

type RouteLookupServiceClient

RouteLookupServiceClient is the client API for RouteLookupService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type RouteLookupServiceClient interface {
    // Lookup returns a target for a single key.
    RouteLookup(ctx context.Context, in *RouteLookupRequest, opts ...grpc.CallOption) (*RouteLookupResponse, error)
}

func NewRouteLookupServiceClient

func NewRouteLookupServiceClient(cc grpc.ClientConnInterface) RouteLookupServiceClient

type RouteLookupServiceServer

RouteLookupServiceServer is the server API for RouteLookupService service. All implementations must embed UnimplementedRouteLookupServiceServer for forward compatibility

type RouteLookupServiceServer interface {
    // Lookup returns a target for a single key.
    RouteLookup(context.Context, *RouteLookupRequest) (*RouteLookupResponse, error)
    // contains filtered or unexported methods
}

type UnimplementedRouteLookupServiceServer

UnimplementedRouteLookupServiceServer must be embedded to have forward compatible implementations.

type UnimplementedRouteLookupServiceServer struct {
}

func (UnimplementedRouteLookupServiceServer) RouteLookup

func (UnimplementedRouteLookupServiceServer) RouteLookup(context.Context, *RouteLookupRequest) (*RouteLookupResponse, error)

type UnsafeRouteLookupServiceServer

UnsafeRouteLookupServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RouteLookupServiceServer will result in compilation errors.

type UnsafeRouteLookupServiceServer interface {
    // contains filtered or unexported methods
}