graph

package
v1.19.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDispatcher

func NewDispatcher(redispatcher dispatch.Dispatcher, concurrencyLimits ConcurrencyLimits) dispatch.Dispatcher

NewDispatcher creates a dispatcher that consults with the graph and redispatches subproblems to the provided redispatcher.

func NewLocalOnlyDispatcher

func NewLocalOnlyDispatcher(concurrencyLimit uint16) dispatch.Dispatcher

NewLocalOnlyDispatcher creates a dispatcher that consults with the graph to formulate a response.

func NewLocalOnlyDispatcherWithLimits added in v1.16.0

func NewLocalOnlyDispatcherWithLimits(concurrencyLimits ConcurrencyLimits) dispatch.Dispatcher

NewLocalOnlyDispatcherWithLimits creates a dispatcher thatg consults with the graph to formulate a response and has the defined concurrency limits per dispatch type.

func NewNamespaceNotFoundErr

func NewNamespaceNotFoundErr(nsName string) error

NewNamespaceNotFoundErr constructs a new namespace not found error.

func NewRelationNotFoundErr

func NewRelationNotFoundErr(nsName string, relationName string) error

NewRelationNotFoundErr constructs a new relation not found error.

Types

type ConcurrencyLimits added in v1.16.0

type ConcurrencyLimits struct {
	Check              uint16
	LookupResources    uint16
	ReachableResources uint16
	LookupSubjects     uint16
}

ConcurrencyLimits defines per-dispatch-type concurrency limits.

func SharedConcurrencyLimits added in v1.16.0

func SharedConcurrencyLimits(concurrencyLimit uint16) ConcurrencyLimits

SharedConcurrencyLimits returns a ConcurrencyLimits struct with the limit set to that provided for each operation.

func (ConcurrencyLimits) MarshalZerologObject added in v1.16.0

func (cl ConcurrencyLimits) MarshalZerologObject(e *zerolog.Event)

func (ConcurrencyLimits) WithOverallDefaultLimit added in v1.16.0

func (cl ConcurrencyLimits) WithOverallDefaultLimit(overallDefaultLimit uint16) ConcurrencyLimits

WithOverallDefaultLimit sets the overall default limit for any unspecified limits and returns a new struct.

type ErrNamespaceNotFound

type ErrNamespaceNotFound struct {
	// contains filtered or unexported fields
}

ErrNamespaceNotFound occurs when a namespace was not found.

func (ErrNamespaceNotFound) DetailsMetadata added in v1.14.0

func (err ErrNamespaceNotFound) DetailsMetadata() map[string]string

DetailsMetadata returns the metadata for details for this error.

func (ErrNamespaceNotFound) MarshalZerologObject

func (err ErrNamespaceNotFound) MarshalZerologObject(e *zerolog.Event)

MarshalZerologObject implements zerolog.LogObjectMarshaler

func (ErrNamespaceNotFound) NotFoundNamespaceName

func (err ErrNamespaceNotFound) NotFoundNamespaceName() string

NotFoundNamespaceName returns the name of the namespace that was not found.

type ErrRelationNotFound

type ErrRelationNotFound struct {
	// contains filtered or unexported fields
}

ErrRelationNotFound occurs when a relation was not found under a namespace.

func (ErrRelationNotFound) DetailsMetadata added in v1.14.0

func (err ErrRelationNotFound) DetailsMetadata() map[string]string

DetailsMetadata returns the metadata for details for this error.

func (ErrRelationNotFound) MarshalZerologObject

func (err ErrRelationNotFound) MarshalZerologObject(e *zerolog.Event)

MarshalZerologObject implements zerolog.LogObjectMarshaler

func (ErrRelationNotFound) NamespaceName

func (err ErrRelationNotFound) NamespaceName() string

NamespaceName returns the name of the namespace in which the relation was not found.

func (ErrRelationNotFound) NotFoundRelationName

func (err ErrRelationNotFound) NotFoundRelationName() string

NotFoundRelationName returns the name of the relation not found.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL