graph

package
v1.31.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Code generated by github.com/ecordell/optgen. DO NOT EDIT.

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 `debugmap:"visible"`
	ReachableResources uint16 `debugmap:"visible"`
	LookupResources    uint16 `debugmap:"visible"`
	LookupSubjects     uint16 `debugmap:"visible"`
}

ConcurrencyLimits defines per-dispatch-type concurrency limits.

func ConcurrencyLimitsWithOptions added in v1.22.0

func ConcurrencyLimitsWithOptions(c *ConcurrencyLimits, opts ...ConcurrencyLimitsOption) *ConcurrencyLimits

ConcurrencyLimitsWithOptions configures an existing ConcurrencyLimits with the passed in options set

func NewConcurrencyLimitsWithOptions added in v1.22.0

func NewConcurrencyLimitsWithOptions(opts ...ConcurrencyLimitsOption) *ConcurrencyLimits

NewConcurrencyLimitsWithOptions creates a new ConcurrencyLimits with the passed in options set

func NewConcurrencyLimitsWithOptionsAndDefaults added in v1.22.0

func NewConcurrencyLimitsWithOptionsAndDefaults(opts ...ConcurrencyLimitsOption) *ConcurrencyLimits

NewConcurrencyLimitsWithOptionsAndDefaults creates a new ConcurrencyLimits with the passed in options set starting from the defaults

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) DebugMap added in v1.22.0

func (c ConcurrencyLimits) DebugMap() map[string]any

DebugMap returns a map form of ConcurrencyLimits for debugging

func (ConcurrencyLimits) MarshalZerologObject added in v1.16.0

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

func (*ConcurrencyLimits) ToOption added in v1.22.0

ToOption returns a new ConcurrencyLimitsOption that sets the values from the passed in ConcurrencyLimits

func (*ConcurrencyLimits) WithOptions added in v1.22.0

WithOptions configures the receiver ConcurrencyLimits with the passed in options set

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 ConcurrencyLimitsOption added in v1.22.0

type ConcurrencyLimitsOption func(c *ConcurrencyLimits)

func WithCheck added in v1.22.0

func WithCheck(check uint16) ConcurrencyLimitsOption

WithCheck returns an option that can set Check on a ConcurrencyLimits

func WithLookupResources added in v1.22.0

func WithLookupResources(lookupResources uint16) ConcurrencyLimitsOption

WithLookupResources returns an option that can set LookupResources on a ConcurrencyLimits

func WithLookupSubjects added in v1.22.0

func WithLookupSubjects(lookupSubjects uint16) ConcurrencyLimitsOption

WithLookupSubjects returns an option that can set LookupSubjects on a ConcurrencyLimits

func WithReachableResources added in v1.22.0

func WithReachableResources(reachableResources uint16) ConcurrencyLimitsOption

WithReachableResources returns an option that can set ReachableResources on a ConcurrencyLimits

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