graph

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 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, dispatchChunkSize uint16) dispatch.Dispatcher

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

func NewLocalOnlyDispatcher

func NewLocalOnlyDispatcher(concurrencyLimit uint16, dispatchChunkSize uint16) dispatch.Dispatcher

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

func NewLocalOnlyDispatcherWithLimits

func NewLocalOnlyDispatcherWithLimits(concurrencyLimits ConcurrencyLimits, dispatchChunkSize uint16) 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

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

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

ConcurrencyLimitsWithOptions configures an existing ConcurrencyLimits with the passed in options set

func NewConcurrencyLimitsWithOptions

func NewConcurrencyLimitsWithOptions(opts ...ConcurrencyLimitsOption) *ConcurrencyLimits

NewConcurrencyLimitsWithOptions creates a new ConcurrencyLimits with the passed in options set

func NewConcurrencyLimitsWithOptionsAndDefaults

func NewConcurrencyLimitsWithOptionsAndDefaults(opts ...ConcurrencyLimitsOption) *ConcurrencyLimits

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

func SharedConcurrencyLimits

func SharedConcurrencyLimits(concurrencyLimit uint16) ConcurrencyLimits

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

func (ConcurrencyLimits) DebugMap

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

DebugMap returns a map form of ConcurrencyLimits for debugging

func (ConcurrencyLimits) MarshalZerologObject

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

func (*ConcurrencyLimits) ToOption

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

func (*ConcurrencyLimits) WithOptions

WithOptions configures the receiver ConcurrencyLimits with the passed in options set

func (ConcurrencyLimits) WithOverallDefaultLimit

func (cl ConcurrencyLimits) WithOverallDefaultLimit(overallDefaultLimit uint16) ConcurrencyLimits

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

type ConcurrencyLimitsOption

type ConcurrencyLimitsOption func(c *ConcurrencyLimits)

func WithCheck

func WithCheck(check uint16) ConcurrencyLimitsOption

WithCheck returns an option that can set Check on a ConcurrencyLimits

func WithLookupResources

func WithLookupResources(lookupResources uint16) ConcurrencyLimitsOption

WithLookupResources returns an option that can set LookupResources on a ConcurrencyLimits

func WithLookupSubjects

func WithLookupSubjects(lookupSubjects uint16) ConcurrencyLimitsOption

WithLookupSubjects returns an option that can set LookupSubjects on a ConcurrencyLimits

func WithReachableResources

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

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

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