Documentation
¶
Index ¶
- Variables
- func CheckDepth(ctx context.Context, req HasMetadata) error
- func CheckRequestToKey(req *v1.DispatchCheckRequest) string
- func CheckRequestToKeyWithCanonical(req *v1.DispatchCheckRequest, canonicalKey string) string
- func ExpandRequestToKey(req *v1.DispatchExpandRequest) string
- func LookupRequestToKey(req *v1.DispatchLookupRequest) string
- type Check
- type Dispatcher
- type Expand
- type HasMetadata
- type Lookup
Constants ¶
This section is empty.
Variables ¶
var ErrMaxDepth = errors.New("max depth exceeded: this usually indicates a recursive or too deep data dependency")
ErrMaxDepth is returned from CheckDepth when the max depth is exceeded.
Functions ¶
func CheckDepth ¶
func CheckDepth(ctx context.Context, req HasMetadata) error
CheckDepth returns ErrMaxDepth if there is insufficient depth remaining to dispatch.
func CheckRequestToKey ¶ added in v1.2.0
func CheckRequestToKey(req *v1.DispatchCheckRequest) string
CheckRequestToKey converts a check request into a cache key based on the relation
func CheckRequestToKeyWithCanonical ¶ added in v1.7.0
func CheckRequestToKeyWithCanonical(req *v1.DispatchCheckRequest, canonicalKey string) string
CheckRequestToKeyWithCanonical converts a check request into a cache key based on the canonical key.
func ExpandRequestToKey ¶ added in v1.2.0
func ExpandRequestToKey(req *v1.DispatchExpandRequest) string
ExpandRequestToKey converts an expand request into a cache key
func LookupRequestToKey ¶ added in v1.2.0
func LookupRequestToKey(req *v1.DispatchLookupRequest) string
LookupRequestToKey converts a lookup request into a cache key
Types ¶
type Check ¶
type Check interface {
// DispatchCheck submits a single check request and returns its result.
DispatchCheck(ctx context.Context, req *v1.DispatchCheckRequest) (*v1.DispatchCheckResponse, error)
}
Check interface describes just the methods required to dispatch check requests.
type Dispatcher ¶
Dispatcher interface describes a method for passing subchecks off to additional machines.
type Expand ¶
type Expand interface {
// DispatchExpand submits a single expand request and returns its result.
DispatchExpand(ctx context.Context, req *v1.DispatchExpandRequest) (*v1.DispatchExpandResponse, error)
}
Expand interface describes just the methods required to dispatch expand requests.
type HasMetadata ¶
type HasMetadata interface {
zerolog.LogObjectMarshaler
GetMetadata() *v1.ResolverMeta
}
HasMetadata is an interface for requests containing resolver metadata.
type Lookup ¶
type Lookup interface {
// DispatchLookup submits a single lookup request and returns its result.
DispatchLookup(ctx context.Context, req *v1.DispatchLookupRequest) (*v1.DispatchLookupResponse, error)
}
Lookup interface describes just the methods required to dispatch lookup requests.