Documentation
¶
Index ¶
- func DecodeEndpoint(raw string) (*dregistry.Endpoint, error)
- func DeploymentID(identifier string) string
- func EncodeEndpoint(endpoint *dregistry.Endpoint) string
- func Lookup(endpoints map[string]string, identifier string) (*dregistry.Endpoint, error)
- func NewPassthroughResolver() (dregistry.Resolver, error)
- func NewResolver(endpoints map[string]string, registryAddress string, logger *zap.Logger) (dregistry.Resolver, error)
- func NewStaticResolver(endpoints map[string]string) (dregistry.Resolver, error)
- func NewStoreClient(rawEndpoint string, useTLS bool, logger *zap.Logger) (client pbservice.StoreClient, closer func() error, err error)
- func ResolveIdentifiers(ctx context.Context, resolver dregistry.Resolver, identifiers []string) (map[string]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeEndpoint ¶
DecodeEndpoint is the inverse of EncodeEndpoint.
func DeploymentID ¶
DeploymentID strips the trailing "@v<version>" suffix from a hosted-store identifier.
func EncodeEndpoint ¶
EncodeEndpoint turns a resolved endpoint into the string we send to tier2. The scheme carries TLS so the json resolver on the other side can recover it.
func Lookup ¶
Lookup returns the pre-resolved endpoint for identifier from a map that ResolveIdentifiers (or the ProcessRange proto field) already filled.
func NewPassthroughResolver ¶
NewPassthroughResolver treats the identifier itself as the endpoint.
func NewResolver ¶
func NewResolver(endpoints map[string]string, registryAddress string, logger *zap.Logger) (dregistry.Resolver, error)
NewResolver builds the 3-tier foundational-store resolver used by tier1: JSON map (if any) → control-plane (if address set, with @v strip) → identifier passthrough.
func NewStaticResolver ¶
NewStaticResolver looks up identifiers in a pre-resolved map. Tier2 uses this because tier1 already resolved every identifier onto the subrequest.
func NewStoreClient ¶
func ResolveIdentifiers ¶
func ResolveIdentifiers(ctx context.Context, resolver dregistry.Resolver, identifiers []string) (map[string]string, error)
ResolveIdentifiers looks up each identifier once. The caller (tier1) ships the resulting map to tier2 so workers do not dial the control plane themselves.
Types ¶
This section is empty.