Documentation ¶
Overview ¶
Code generated by github.com/ecordell/optgen. DO NOT EDIT.
Code generated by github.com/ecordell/optgen. DO NOT EDIT.
Code generated by github.com/ecordell/optgen. DO NOT EDIT.
Index ¶
- Constants
- Variables
- func CompleteCache[K cache.KeyString, V any](cc *CacheConfig) (cache.Cache[K, V], error)
- func DefaultDispatchMiddleware(logger zerolog.Logger, authFunc grpcauth.AuthFunc, ds datastore.Datastore, ...) ([]grpc.UnaryServerInterceptor, []grpc.StreamServerInterceptor)
- func DefaultPreRunE(programName string) cobrautil.CobraRunFunc
- func GRPCMetrics(disableLatencyHistogram bool) (grpc.UnaryServerInterceptor, grpc.StreamServerInterceptor)
- func InterceptorLogger(l zerolog.Logger) grpclog.Logger
- func MetricsHandler(telemetryRegistry *prometheus.Registry, c *Config) http.Handler
- func MustRegisterCacheFlags(flags *pflag.FlagSet, flagPrefix string, config, defaults *CacheConfig)
- func ServeExample(programName string) string
- type CacheConfig
- func (c CacheConfig) DebugMap() map[string]any
- func (c *CacheConfig) ToOption() CacheConfigOption
- func (c *CacheConfig) WithOptions(opts ...CacheConfigOption) *CacheConfig
- func (cc *CacheConfig) WithRevisionParameters(quantizationInterval time.Duration, followerReadDelay time.Duration, ...) *CacheConfig
- type CacheConfigOption
- func WithCacheKindForTesting(cacheKindForTesting string) CacheConfigOption
- func WithEnabled(enabled bool) CacheConfigOption
- func WithMaxCost(maxCost string) CacheConfigOption
- func WithMetrics(metrics bool) CacheConfigOption
- func WithName(name string) CacheConfigOption
- func WithNumCounters(numCounters int64) CacheConfigOption
- type Config
- type ConfigOption
- func SetDispatchSecondaryUpstreamAddrs(dispatchSecondaryUpstreamAddrs map[string]string) ConfigOption
- func SetDispatchSecondaryUpstreamExprs(dispatchSecondaryUpstreamExprs map[string]string) ConfigOption
- func SetDispatchStreamingMiddleware(dispatchStreamingMiddleware []grpc.StreamServerInterceptor) ConfigOption
- func SetDispatchUnaryMiddleware(dispatchUnaryMiddleware []grpc.UnaryServerInterceptor) ConfigOption
- func SetHTTPGatewayCorsAllowedOrigins(hTTPGatewayCorsAllowedOrigins []string) ConfigOption
- func SetPresharedSecureKey(presharedSecureKey []string) ConfigOption
- func SetStreamingMiddlewareModification(...) ConfigOption
- func SetUnaryMiddlewareModification(...) ConfigOption
- func WithClusterDispatchCacheConfig(clusterDispatchCacheConfig CacheConfig) ConfigOption
- func WithDatastore(datastore datastore1.Datastore) ConfigOption
- func WithDatastoreConfig(datastoreConfig datastore.Config) ConfigOption
- func WithDisableGRPCLatencyHistogram(disableGRPCLatencyHistogram bool) ConfigOption
- func WithDisableV1SchemaAPI(disableV1SchemaAPI bool) ConfigOption
- func WithDisableVersionResponse(disableVersionResponse bool) ConfigOption
- func WithDispatchCacheConfig(dispatchCacheConfig CacheConfig) ConfigOption
- func WithDispatchChunkSize(dispatchChunkSize uint16) ConfigOption
- func WithDispatchClientMetricsEnabled(dispatchClientMetricsEnabled bool) ConfigOption
- func WithDispatchClientMetricsPrefix(dispatchClientMetricsPrefix string) ConfigOption
- func WithDispatchClusterMetricsEnabled(dispatchClusterMetricsEnabled bool) ConfigOption
- func WithDispatchClusterMetricsPrefix(dispatchClusterMetricsPrefix string) ConfigOption
- func WithDispatchConcurrencyLimits(dispatchConcurrencyLimits graph.ConcurrencyLimits) ConfigOption
- func WithDispatchHashringReplicationFactor(dispatchHashringReplicationFactor uint16) ConfigOption
- func WithDispatchHashringSpread(dispatchHashringSpread uint8) ConfigOption
- func WithDispatchMaxDepth(dispatchMaxDepth uint32) ConfigOption
- func WithDispatchSecondaryUpstreamAddrs(key string, value string) ConfigOption
- func WithDispatchSecondaryUpstreamExprs(key string, value string) ConfigOption
- func WithDispatchServer(dispatchServer util.GRPCServerConfig) ConfigOption
- func WithDispatchStreamingMiddleware(dispatchStreamingMiddleware grpc.StreamServerInterceptor) ConfigOption
- func WithDispatchUnaryMiddleware(dispatchUnaryMiddleware grpc.UnaryServerInterceptor) ConfigOption
- func WithDispatchUpstreamAddr(dispatchUpstreamAddr string) ConfigOption
- func WithDispatchUpstreamCAPath(dispatchUpstreamCAPath string) ConfigOption
- func WithDispatchUpstreamTimeout(dispatchUpstreamTimeout time.Duration) ConfigOption
- func WithDispatcher(dispatcher dispatch.Dispatcher) ConfigOption
- func WithEnableExperimentalLookupResources(enableExperimentalLookupResources bool) ConfigOption
- func WithEnableExperimentalWatchableSchemaCache(enableExperimentalWatchableSchemaCache bool) ConfigOption
- func WithEnableRequestLogs(enableRequestLogs bool) ConfigOption
- func WithEnableResponseLogs(enableResponseLogs bool) ConfigOption
- func WithGRPCAuthFunc(gRPCAuthFunc auth.AuthFunc) ConfigOption
- func WithGRPCServer(gRPCServer util.GRPCServerConfig) ConfigOption
- func WithGlobalDispatchConcurrencyLimit(globalDispatchConcurrencyLimit uint16) ConfigOption
- func WithHTTPGateway(hTTPGateway util.HTTPServerConfig) ConfigOption
- func WithHTTPGatewayCorsAllowedOrigins(hTTPGatewayCorsAllowedOrigins string) ConfigOption
- func WithHTTPGatewayCorsEnabled(hTTPGatewayCorsEnabled bool) ConfigOption
- func WithHTTPGatewayUpstreamAddr(hTTPGatewayUpstreamAddr string) ConfigOption
- func WithHTTPGatewayUpstreamTLSCertPath(hTTPGatewayUpstreamTLSCertPath string) ConfigOption
- func WithMaxBulkExportRelationshipsLimit(maxBulkExportRelationshipsLimit uint32) ConfigOption
- func WithMaxCaveatContextSize(maxCaveatContextSize int) ConfigOption
- func WithMaxDatastoreReadPageSize(maxDatastoreReadPageSize uint64) ConfigOption
- func WithMaxDeleteRelationshipsLimit(maxDeleteRelationshipsLimit uint32) ConfigOption
- func WithMaxLookupResourcesLimit(maxLookupResourcesLimit uint32) ConfigOption
- func WithMaxReadRelationshipsLimit(maxReadRelationshipsLimit uint32) ConfigOption
- func WithMaxRelationshipContextSize(maxRelationshipContextSize int) ConfigOption
- func WithMaximumPreconditionCount(maximumPreconditionCount uint16) ConfigOption
- func WithMaximumUpdatesPerWrite(maximumUpdatesPerWrite uint16) ConfigOption
- func WithMetricsAPI(metricsAPI util.HTTPServerConfig) ConfigOption
- func WithNamespaceCacheConfig(namespaceCacheConfig CacheConfig) ConfigOption
- func WithPresharedSecureKey(presharedSecureKey string) ConfigOption
- func WithSchemaPrefixesRequired(schemaPrefixesRequired bool) ConfigOption
- func WithSchemaWatchHeartbeat(schemaWatchHeartbeat time.Duration) ConfigOption
- func WithShutdownGracePeriod(shutdownGracePeriod time.Duration) ConfigOption
- func WithSilentlyDisableTelemetry(silentlyDisableTelemetry bool) ConfigOption
- func WithStreamingAPITimeout(streamingAPITimeout time.Duration) ConfigOption
- func WithStreamingMiddlewareModification(...) ConfigOption
- func WithTelemetryCAOverridePath(telemetryCAOverridePath string) ConfigOption
- func WithTelemetryEndpoint(telemetryEndpoint string) ConfigOption
- func WithTelemetryInterval(telemetryInterval time.Duration) ConfigOption
- func WithUnaryMiddlewareModification(...) ConfigOption
- func WithV1SchemaAdditiveOnly(v1SchemaAdditiveOnly bool) ConfigOption
- func WithWatchHeartbeat(watchHeartbeat time.Duration) ConfigOption
- type Middleware
- type MiddlewareChain
- func DefaultStreamingMiddleware(opts MiddlewareOption) (*MiddlewareChain[grpc.StreamServerInterceptor], error)
- func DefaultUnaryMiddleware(opts MiddlewareOption) (*MiddlewareChain[grpc.UnaryServerInterceptor], error)
- func NewMiddlewareChain[T middlewareTypes](mw ...ReferenceableMiddleware[T]) (MiddlewareChain[T], error)
- type MiddlewareModification
- type MiddlewareOperation
- type MiddlewareOption
- func (m MiddlewareOption) DebugMap() map[string]any
- func (m *MiddlewareOption) ToOption() MiddlewareOptionOption
- func (m MiddlewareOption) WithDatastore(ds datastore.Datastore) MiddlewareOption
- func (m MiddlewareOption) WithDatastoreMiddleware(middleware Middleware) MiddlewareOption
- func (m *MiddlewareOption) WithOptions(opts ...MiddlewareOptionOption) *MiddlewareOption
- type MiddlewareOptionOption
- func WithAuthFunc(authFunc auth.AuthFunc) MiddlewareOptionOption
- func WithDisableGRPCHistogram(disableGRPCHistogram bool) MiddlewareOptionOption
- func WithDispatcherForMiddleware(dispatcherForMiddleware dispatch.Dispatcher) MiddlewareOptionOption
- func WithEnableRequestLog(enableRequestLog bool) MiddlewareOptionOption
- func WithEnableResponseLog(enableResponseLog bool) MiddlewareOptionOption
- func WithEnableVersionResponse(enableVersionResponse bool) MiddlewareOptionOption
- func WithLogger(logger zerolog.Logger) MiddlewareOptionOption
- type ReferenceableMiddleware
- type RunnableServer
- type StreamOrderEnforcerBuilder
- func (soeb *StreamOrderEnforcerBuilder) Done() ReferenceableMiddleware[grpc.StreamServerInterceptor]
- func (soeb *StreamOrderEnforcerBuilder) EnsureInterceptorAlreadyExecuted(name string) *StreamOrderEnforcerBuilder
- func (soeb *StreamOrderEnforcerBuilder) EnsureInterceptorNotExecuted(name string) *StreamOrderEnforcerBuilder
- func (soeb *StreamOrderEnforcerBuilder) EnsureWrapperAlreadyExecuted(name string) *StreamOrderEnforcerBuilder
- func (soeb *StreamOrderEnforcerBuilder) EnsureWrapperNotExecuted(name string) *StreamOrderEnforcerBuilder
- func (soeb *StreamOrderEnforcerBuilder) WithInterceptor(interceptor grpc.StreamServerInterceptor) *StreamOrderEnforcerBuilder
- func (soeb *StreamOrderEnforcerBuilder) WithInternal(internal bool) *StreamOrderEnforcerBuilder
- func (soeb *StreamOrderEnforcerBuilder) WithName(name string) *StreamOrderEnforcerBuilder
- type UnaryOrderEnforcerBuilder
- func (soeb *UnaryOrderEnforcerBuilder) Done() ReferenceableMiddleware[grpc.UnaryServerInterceptor]
- func (soeb *UnaryOrderEnforcerBuilder) EnsureAlreadyExecuted(name string) *UnaryOrderEnforcerBuilder
- func (soeb *UnaryOrderEnforcerBuilder) EnsureNotExecuted(name string) *UnaryOrderEnforcerBuilder
- func (soeb *UnaryOrderEnforcerBuilder) WithInterceptor(interceptor grpc.UnaryServerInterceptor) *UnaryOrderEnforcerBuilder
- func (soeb *UnaryOrderEnforcerBuilder) WithInternal(internal bool) *UnaryOrderEnforcerBuilder
- func (soeb *UnaryOrderEnforcerBuilder) WithName(name string) *UnaryOrderEnforcerBuilder
Constants ¶
const ( DefaultMiddlewareRequestID = "requestid" DefaultMiddlewareLog = "log" DefaultMiddlewareGRPCLog = "grpclog" DefaultMiddlewareOTelGRPC = "otelgrpc" DefaultMiddlewareGRPCAuth = "grpcauth" DefaultMiddlewareGRPCProm = "grpcprom" DefaultMiddlewareServerVersion = "serverversion" DefaultInternalMiddlewareDispatch = "dispatch" DefaultInternalMiddlewareDatastore = "datastore" DefaultInternalMiddlewareConsistency = "consistency" DefaultInternalMiddlewareServerSpecific = "servicespecific" )
Variables ¶
var ConsistentHashringBuilder = consistent.NewBuilder(xxhash.Sum64)
ConsistentHashringBuilder is a balancer Builder that uses xxhash as the underlying hash for the ConsistentHashringBalancers it creates.
var DisableTelemetryHandler *prometheus.Registry
Functions ¶
func CompleteCache ¶ added in v1.35.1
CompleteCache translates the CLI cache config into a cache config.
func DefaultDispatchMiddleware ¶
func DefaultDispatchMiddleware(logger zerolog.Logger, authFunc grpcauth.AuthFunc, ds datastore.Datastore, disableGRPCLatencyHistogram bool, ) ([]grpc.UnaryServerInterceptor, []grpc.StreamServerInterceptor)
DefaultDispatchMiddleware generates the default middleware chain used for the internal dispatch SpiceDB gRPC API
func DefaultPreRunE ¶
func DefaultPreRunE(programName string) cobrautil.CobraRunFunc
DefaultPreRunE sets up viper, zerolog, and OpenTelemetry flag handling for a command.
func GRPCMetrics ¶ added in v1.30.0
func GRPCMetrics(disableLatencyHistogram bool) (grpc.UnaryServerInterceptor, grpc.StreamServerInterceptor)
GRPCMetrics returns the interceptors used for the default gRPC metrics from grpc-ecosystem/go-grpc-middleware
func MetricsHandler ¶
func MetricsHandler(telemetryRegistry *prometheus.Registry, c *Config) http.Handler
MetricsHandler sets up an HTTP server that handles serving Prometheus metrics and pprof endpoints.
func MustRegisterCacheFlags ¶ added in v1.35.1
func MustRegisterCacheFlags(flags *pflag.FlagSet, flagPrefix string, config, defaults *CacheConfig)
MustRegisterCacheFlags registers flags used to configure SpiceDB's various caches.
func ServeExample ¶
ServeExample creates an example usage string with the provided program name.
Types ¶
type CacheConfig ¶
type CacheConfig struct { Name string `debugmap:"visible"` MaxCost string `debugmap:"visible"` NumCounters int64 `debugmap:"visible"` Metrics bool `debugmap:"visible"` Enabled bool `debugmap:"visible"` CacheKindForTesting string `debugmap:"visible"` // contains filtered or unexported fields }
CacheConfig defines the configuration various SpiceDB caches.
func CacheConfigWithOptions ¶ added in v1.22.0
func CacheConfigWithOptions(c *CacheConfig, opts ...CacheConfigOption) *CacheConfig
CacheConfigWithOptions configures an existing CacheConfig with the passed in options set
func NewCacheConfigWithOptions ¶ added in v1.22.0
func NewCacheConfigWithOptions(opts ...CacheConfigOption) *CacheConfig
NewCacheConfigWithOptions creates a new CacheConfig with the passed in options set
func NewCacheConfigWithOptionsAndDefaults ¶ added in v1.22.0
func NewCacheConfigWithOptionsAndDefaults(opts ...CacheConfigOption) *CacheConfig
NewCacheConfigWithOptionsAndDefaults creates a new CacheConfig with the passed in options set starting from the defaults
func (CacheConfig) DebugMap ¶ added in v1.22.0
func (c CacheConfig) DebugMap() map[string]any
DebugMap returns a map form of CacheConfig for debugging
func (*CacheConfig) ToOption ¶ added in v1.22.0
func (c *CacheConfig) ToOption() CacheConfigOption
ToOption returns a new CacheConfigOption that sets the values from the passed in CacheConfig
func (*CacheConfig) WithOptions ¶ added in v1.22.0
func (c *CacheConfig) WithOptions(opts ...CacheConfigOption) *CacheConfig
WithOptions configures the receiver CacheConfig with the passed in options set
func (*CacheConfig) WithRevisionParameters ¶ added in v1.21.0
func (cc *CacheConfig) WithRevisionParameters( quantizationInterval time.Duration, followerReadDelay time.Duration, maxStalenessPercent float64, ) *CacheConfig
WithRevisionParameters configures a cache such that all entries are given a TTL that will expire safely outside of the quantization window.
type CacheConfigOption ¶ added in v1.22.0
type CacheConfigOption func(c *CacheConfig)
func WithCacheKindForTesting ¶ added in v1.35.1
func WithCacheKindForTesting(cacheKindForTesting string) CacheConfigOption
WithCacheKindForTesting returns an option that can set CacheKindForTesting on a CacheConfig
func WithEnabled ¶ added in v1.22.0
func WithEnabled(enabled bool) CacheConfigOption
WithEnabled returns an option that can set Enabled on a CacheConfig
func WithMaxCost ¶ added in v1.22.0
func WithMaxCost(maxCost string) CacheConfigOption
WithMaxCost returns an option that can set MaxCost on a CacheConfig
func WithMetrics ¶ added in v1.22.0
func WithMetrics(metrics bool) CacheConfigOption
WithMetrics returns an option that can set Metrics on a CacheConfig
func WithName ¶ added in v1.22.0
func WithName(name string) CacheConfigOption
WithName returns an option that can set Name on a CacheConfig
func WithNumCounters ¶ added in v1.22.0
func WithNumCounters(numCounters int64) CacheConfigOption
WithNumCounters returns an option that can set NumCounters on a CacheConfig
type Config ¶
type Config struct { // API config GRPCServer util.GRPCServerConfig `debugmap:"visible"` GRPCAuthFunc grpc_auth.AuthFunc `debugmap:"visible"` ShutdownGracePeriod time.Duration `debugmap:"visible"` DisableVersionResponse bool `debugmap:"visible"` // GRPC Gateway config HTTPGateway util.HTTPServerConfig `debugmap:"visible"` HTTPGatewayUpstreamAddr string `debugmap:"visible"` HTTPGatewayUpstreamTLSCertPath string `debugmap:"visible"` HTTPGatewayCorsEnabled bool `debugmap:"visible"` HTTPGatewayCorsAllowedOrigins []string `debugmap:"visible-format"` // Datastore DatastoreConfig datastorecfg.Config `debugmap:"visible"` Datastore datastore.Datastore `debugmap:"visible"` // Datastore usage MaxCaveatContextSize int `debugmap:"visible" default:"4096"` MaxRelationshipContextSize int `debugmap:"visible" default:"25_000"` // Namespace cache EnableExperimentalWatchableSchemaCache bool `debugmap:"visible"` SchemaWatchHeartbeat time.Duration `debugmap:"visible"` NamespaceCacheConfig CacheConfig `debugmap:"visible"` // Schema options SchemaPrefixesRequired bool `debugmap:"visible"` // Dispatch options DispatchServer util.GRPCServerConfig `debugmap:"visible"` DispatchMaxDepth uint32 `debugmap:"visible"` GlobalDispatchConcurrencyLimit uint16 `debugmap:"visible"` DispatchConcurrencyLimits graph.ConcurrencyLimits `debugmap:"visible"` DispatchUpstreamAddr string `debugmap:"visible"` DispatchUpstreamCAPath string `debugmap:"visible"` DispatchUpstreamTimeout time.Duration `debugmap:"visible"` DispatchClientMetricsEnabled bool `debugmap:"visible"` DispatchClientMetricsPrefix string `debugmap:"visible"` DispatchClusterMetricsEnabled bool `debugmap:"visible"` DispatchClusterMetricsPrefix string `debugmap:"visible"` Dispatcher dispatch.Dispatcher `debugmap:"visible"` DispatchHashringReplicationFactor uint16 `debugmap:"visible"` DispatchHashringSpread uint8 `debugmap:"visible"` DispatchChunkSize uint16 `debugmap:"visible" default:"100"` DispatchSecondaryUpstreamAddrs map[string]string `debugmap:"visible"` DispatchSecondaryUpstreamExprs map[string]string `debugmap:"visible"` DispatchCacheConfig CacheConfig `debugmap:"visible"` ClusterDispatchCacheConfig CacheConfig `debugmap:"visible"` // API Behavior DisableV1SchemaAPI bool `debugmap:"visible"` V1SchemaAdditiveOnly bool `debugmap:"visible"` MaximumUpdatesPerWrite uint16 `debugmap:"visible"` MaximumPreconditionCount uint16 `debugmap:"visible"` MaxDatastoreReadPageSize uint64 `debugmap:"visible"` StreamingAPITimeout time.Duration `debugmap:"visible"` WatchHeartbeat time.Duration `debugmap:"visible"` MaxReadRelationshipsLimit uint32 `debugmap:"visible"` MaxDeleteRelationshipsLimit uint32 `debugmap:"visible"` MaxLookupResourcesLimit uint32 `debugmap:"visible"` MaxBulkExportRelationshipsLimit uint32 `debugmap:"visible"` EnableExperimentalLookupResources bool `debugmap:"visible"` // Additional Services MetricsAPI util.HTTPServerConfig `debugmap:"visible"` // Middleware for grpc API UnaryMiddlewareModification []MiddlewareModification[grpc.UnaryServerInterceptor] `debugmap:"hidden"` StreamingMiddlewareModification []MiddlewareModification[grpc.StreamServerInterceptor] `debugmap:"hidden"` // Middleware for internal dispatch API DispatchUnaryMiddleware []grpc.UnaryServerInterceptor `debugmap:"hidden"` DispatchStreamingMiddleware []grpc.StreamServerInterceptor `debugmap:"hidden"` // Telemetry SilentlyDisableTelemetry bool `debugmap:"visible"` TelemetryCAOverridePath string `debugmap:"visible"` TelemetryEndpoint string `debugmap:"visible"` TelemetryInterval time.Duration `debugmap:"visible"` // Logs EnableRequestLogs bool `debugmap:"visible"` EnableResponseLogs bool `debugmap:"visible"` // Metrics DisableGRPCLatencyHistogram bool `debugmap:"visible"` }
func ConfigWithOptions ¶
func ConfigWithOptions(c *Config, opts ...ConfigOption) *Config
ConfigWithOptions configures an existing Config with the passed in options set
func NewConfigWithOptions ¶
func NewConfigWithOptions(opts ...ConfigOption) *Config
NewConfigWithOptions creates a new Config with the passed in options set
func NewConfigWithOptionsAndDefaults ¶ added in v1.22.0
func NewConfigWithOptionsAndDefaults(opts ...ConfigOption) *Config
NewConfigWithOptionsAndDefaults creates a new Config with the passed in options set starting from the defaults
func (*Config) Complete ¶
func (c *Config) Complete(ctx context.Context) (RunnableServer, error)
Complete validates the config and fills out defaults. if there is no error, a completedServerConfig (with limited options for mutation) is returned.
func (*Config) ToOption ¶
func (c *Config) ToOption() ConfigOption
ToOption returns a new ConfigOption that sets the values from the passed in Config
func (*Config) WithOptions ¶ added in v1.22.0
func (c *Config) WithOptions(opts ...ConfigOption) *Config
WithOptions configures the receiver Config with the passed in options set
type ConfigOption ¶
type ConfigOption func(c *Config)
func SetDispatchSecondaryUpstreamAddrs ¶ added in v1.27.0
func SetDispatchSecondaryUpstreamAddrs(dispatchSecondaryUpstreamAddrs map[string]string) ConfigOption
SetDispatchSecondaryUpstreamAddrs returns an option that can set DispatchSecondaryUpstreamAddrs on a Config
func SetDispatchSecondaryUpstreamExprs ¶ added in v1.27.0
func SetDispatchSecondaryUpstreamExprs(dispatchSecondaryUpstreamExprs map[string]string) ConfigOption
SetDispatchSecondaryUpstreamExprs returns an option that can set DispatchSecondaryUpstreamExprs on a Config
func SetDispatchStreamingMiddleware ¶
func SetDispatchStreamingMiddleware(dispatchStreamingMiddleware []grpc.StreamServerInterceptor) ConfigOption
SetDispatchStreamingMiddleware returns an option that can set DispatchStreamingMiddleware on a Config
func SetDispatchUnaryMiddleware ¶
func SetDispatchUnaryMiddleware(dispatchUnaryMiddleware []grpc.UnaryServerInterceptor) ConfigOption
SetDispatchUnaryMiddleware returns an option that can set DispatchUnaryMiddleware on a Config
func SetHTTPGatewayCorsAllowedOrigins ¶
func SetHTTPGatewayCorsAllowedOrigins(hTTPGatewayCorsAllowedOrigins []string) ConfigOption
SetHTTPGatewayCorsAllowedOrigins returns an option that can set HTTPGatewayCorsAllowedOrigins on a Config
func SetPresharedSecureKey ¶ added in v1.22.0
func SetPresharedSecureKey(presharedSecureKey []string) ConfigOption
SetPresharedSecureKey returns an option that can set PresharedSecureKey on a Config
func SetStreamingMiddlewareModification ¶ added in v1.22.2
func SetStreamingMiddlewareModification(streamingMiddlewareModification []MiddlewareModification[grpc.StreamServerInterceptor]) ConfigOption
SetStreamingMiddlewareModification returns an option that can set StreamingMiddlewareModification on a Config
func SetUnaryMiddlewareModification ¶ added in v1.22.2
func SetUnaryMiddlewareModification(unaryMiddlewareModification []MiddlewareModification[grpc.UnaryServerInterceptor]) ConfigOption
SetUnaryMiddlewareModification returns an option that can set UnaryMiddlewareModification on a Config
func WithClusterDispatchCacheConfig ¶
func WithClusterDispatchCacheConfig(clusterDispatchCacheConfig CacheConfig) ConfigOption
WithClusterDispatchCacheConfig returns an option that can set ClusterDispatchCacheConfig on a Config
func WithDatastore ¶
func WithDatastore(datastore datastore1.Datastore) ConfigOption
WithDatastore returns an option that can set Datastore on a Config
func WithDatastoreConfig ¶
func WithDatastoreConfig(datastoreConfig datastore.Config) ConfigOption
WithDatastoreConfig returns an option that can set DatastoreConfig on a Config
func WithDisableGRPCLatencyHistogram ¶ added in v1.30.0
func WithDisableGRPCLatencyHistogram(disableGRPCLatencyHistogram bool) ConfigOption
WithDisableGRPCLatencyHistogram returns an option that can set DisableGRPCLatencyHistogram on a Config
func WithDisableV1SchemaAPI ¶
func WithDisableV1SchemaAPI(disableV1SchemaAPI bool) ConfigOption
WithDisableV1SchemaAPI returns an option that can set DisableV1SchemaAPI on a Config
func WithDisableVersionResponse ¶ added in v1.8.0
func WithDisableVersionResponse(disableVersionResponse bool) ConfigOption
WithDisableVersionResponse returns an option that can set DisableVersionResponse on a Config
func WithDispatchCacheConfig ¶
func WithDispatchCacheConfig(dispatchCacheConfig CacheConfig) ConfigOption
WithDispatchCacheConfig returns an option that can set DispatchCacheConfig on a Config
func WithDispatchChunkSize ¶ added in v1.35.0
func WithDispatchChunkSize(dispatchChunkSize uint16) ConfigOption
WithDispatchChunkSize returns an option that can set DispatchChunkSize on a Config
func WithDispatchClientMetricsEnabled ¶ added in v1.17.0
func WithDispatchClientMetricsEnabled(dispatchClientMetricsEnabled bool) ConfigOption
WithDispatchClientMetricsEnabled returns an option that can set DispatchClientMetricsEnabled on a Config
func WithDispatchClientMetricsPrefix ¶
func WithDispatchClientMetricsPrefix(dispatchClientMetricsPrefix string) ConfigOption
WithDispatchClientMetricsPrefix returns an option that can set DispatchClientMetricsPrefix on a Config
func WithDispatchClusterMetricsEnabled ¶ added in v1.17.0
func WithDispatchClusterMetricsEnabled(dispatchClusterMetricsEnabled bool) ConfigOption
WithDispatchClusterMetricsEnabled returns an option that can set DispatchClusterMetricsEnabled on a Config
func WithDispatchClusterMetricsPrefix ¶ added in v1.6.0
func WithDispatchClusterMetricsPrefix(dispatchClusterMetricsPrefix string) ConfigOption
WithDispatchClusterMetricsPrefix returns an option that can set DispatchClusterMetricsPrefix on a Config
func WithDispatchConcurrencyLimits ¶ added in v1.16.0
func WithDispatchConcurrencyLimits(dispatchConcurrencyLimits graph.ConcurrencyLimits) ConfigOption
WithDispatchConcurrencyLimits returns an option that can set DispatchConcurrencyLimits on a Config
func WithDispatchHashringReplicationFactor ¶ added in v1.18.1
func WithDispatchHashringReplicationFactor(dispatchHashringReplicationFactor uint16) ConfigOption
WithDispatchHashringReplicationFactor returns an option that can set DispatchHashringReplicationFactor on a Config
func WithDispatchHashringSpread ¶ added in v1.20.0
func WithDispatchHashringSpread(dispatchHashringSpread uint8) ConfigOption
WithDispatchHashringSpread returns an option that can set DispatchHashringSpread on a Config
func WithDispatchMaxDepth ¶
func WithDispatchMaxDepth(dispatchMaxDepth uint32) ConfigOption
WithDispatchMaxDepth returns an option that can set DispatchMaxDepth on a Config
func WithDispatchSecondaryUpstreamAddrs ¶ added in v1.27.0
func WithDispatchSecondaryUpstreamAddrs(key string, value string) ConfigOption
WithDispatchSecondaryUpstreamAddrs returns an option that can append DispatchSecondaryUpstreamAddrss to Config.DispatchSecondaryUpstreamAddrs
func WithDispatchSecondaryUpstreamExprs ¶ added in v1.27.0
func WithDispatchSecondaryUpstreamExprs(key string, value string) ConfigOption
WithDispatchSecondaryUpstreamExprs returns an option that can append DispatchSecondaryUpstreamExprss to Config.DispatchSecondaryUpstreamExprs
func WithDispatchServer ¶
func WithDispatchServer(dispatchServer util.GRPCServerConfig) ConfigOption
WithDispatchServer returns an option that can set DispatchServer on a Config
func WithDispatchStreamingMiddleware ¶
func WithDispatchStreamingMiddleware(dispatchStreamingMiddleware grpc.StreamServerInterceptor) ConfigOption
WithDispatchStreamingMiddleware returns an option that can append DispatchStreamingMiddlewares to Config.DispatchStreamingMiddleware
func WithDispatchUnaryMiddleware ¶
func WithDispatchUnaryMiddleware(dispatchUnaryMiddleware grpc.UnaryServerInterceptor) ConfigOption
WithDispatchUnaryMiddleware returns an option that can append DispatchUnaryMiddlewares to Config.DispatchUnaryMiddleware
func WithDispatchUpstreamAddr ¶
func WithDispatchUpstreamAddr(dispatchUpstreamAddr string) ConfigOption
WithDispatchUpstreamAddr returns an option that can set DispatchUpstreamAddr on a Config
func WithDispatchUpstreamCAPath ¶
func WithDispatchUpstreamCAPath(dispatchUpstreamCAPath string) ConfigOption
WithDispatchUpstreamCAPath returns an option that can set DispatchUpstreamCAPath on a Config
func WithDispatchUpstreamTimeout ¶ added in v1.16.2
func WithDispatchUpstreamTimeout(dispatchUpstreamTimeout time.Duration) ConfigOption
WithDispatchUpstreamTimeout returns an option that can set DispatchUpstreamTimeout on a Config
func WithDispatcher ¶
func WithDispatcher(dispatcher dispatch.Dispatcher) ConfigOption
WithDispatcher returns an option that can set Dispatcher on a Config
func WithEnableExperimentalLookupResources ¶ added in v1.35.0
func WithEnableExperimentalLookupResources(enableExperimentalLookupResources bool) ConfigOption
WithEnableExperimentalLookupResources returns an option that can set EnableExperimentalLookupResources on a Config
func WithEnableExperimentalWatchableSchemaCache ¶ added in v1.25.0
func WithEnableExperimentalWatchableSchemaCache(enableExperimentalWatchableSchemaCache bool) ConfigOption
WithEnableExperimentalWatchableSchemaCache returns an option that can set EnableExperimentalWatchableSchemaCache on a Config
func WithEnableRequestLogs ¶ added in v1.27.0
func WithEnableRequestLogs(enableRequestLogs bool) ConfigOption
WithEnableRequestLogs returns an option that can set EnableRequestLogs on a Config
func WithEnableResponseLogs ¶ added in v1.27.0
func WithEnableResponseLogs(enableResponseLogs bool) ConfigOption
WithEnableResponseLogs returns an option that can set EnableResponseLogs on a Config
func WithGRPCAuthFunc ¶
func WithGRPCAuthFunc(gRPCAuthFunc auth.AuthFunc) ConfigOption
WithGRPCAuthFunc returns an option that can set GRPCAuthFunc on a Config
func WithGRPCServer ¶
func WithGRPCServer(gRPCServer util.GRPCServerConfig) ConfigOption
WithGRPCServer returns an option that can set GRPCServer on a Config
func WithGlobalDispatchConcurrencyLimit ¶ added in v1.16.0
func WithGlobalDispatchConcurrencyLimit(globalDispatchConcurrencyLimit uint16) ConfigOption
WithGlobalDispatchConcurrencyLimit returns an option that can set GlobalDispatchConcurrencyLimit on a Config
func WithHTTPGateway ¶
func WithHTTPGateway(hTTPGateway util.HTTPServerConfig) ConfigOption
WithHTTPGateway returns an option that can set HTTPGateway on a Config
func WithHTTPGatewayCorsAllowedOrigins ¶
func WithHTTPGatewayCorsAllowedOrigins(hTTPGatewayCorsAllowedOrigins string) ConfigOption
WithHTTPGatewayCorsAllowedOrigins returns an option that can append HTTPGatewayCorsAllowedOriginss to Config.HTTPGatewayCorsAllowedOrigins
func WithHTTPGatewayCorsEnabled ¶
func WithHTTPGatewayCorsEnabled(hTTPGatewayCorsEnabled bool) ConfigOption
WithHTTPGatewayCorsEnabled returns an option that can set HTTPGatewayCorsEnabled on a Config
func WithHTTPGatewayUpstreamAddr ¶
func WithHTTPGatewayUpstreamAddr(hTTPGatewayUpstreamAddr string) ConfigOption
WithHTTPGatewayUpstreamAddr returns an option that can set HTTPGatewayUpstreamAddr on a Config
func WithHTTPGatewayUpstreamTLSCertPath ¶
func WithHTTPGatewayUpstreamTLSCertPath(hTTPGatewayUpstreamTLSCertPath string) ConfigOption
WithHTTPGatewayUpstreamTLSCertPath returns an option that can set HTTPGatewayUpstreamTLSCertPath on a Config
func WithMaxBulkExportRelationshipsLimit ¶ added in v1.32.0
func WithMaxBulkExportRelationshipsLimit(maxBulkExportRelationshipsLimit uint32) ConfigOption
WithMaxBulkExportRelationshipsLimit returns an option that can set MaxBulkExportRelationshipsLimit on a Config
func WithMaxCaveatContextSize ¶ added in v1.18.0
func WithMaxCaveatContextSize(maxCaveatContextSize int) ConfigOption
WithMaxCaveatContextSize returns an option that can set MaxCaveatContextSize on a Config
func WithMaxDatastoreReadPageSize ¶ added in v1.21.0
func WithMaxDatastoreReadPageSize(maxDatastoreReadPageSize uint64) ConfigOption
WithMaxDatastoreReadPageSize returns an option that can set MaxDatastoreReadPageSize on a Config
func WithMaxDeleteRelationshipsLimit ¶ added in v1.32.0
func WithMaxDeleteRelationshipsLimit(maxDeleteRelationshipsLimit uint32) ConfigOption
WithMaxDeleteRelationshipsLimit returns an option that can set MaxDeleteRelationshipsLimit on a Config
func WithMaxLookupResourcesLimit ¶ added in v1.32.0
func WithMaxLookupResourcesLimit(maxLookupResourcesLimit uint32) ConfigOption
WithMaxLookupResourcesLimit returns an option that can set MaxLookupResourcesLimit on a Config
func WithMaxReadRelationshipsLimit ¶ added in v1.32.0
func WithMaxReadRelationshipsLimit(maxReadRelationshipsLimit uint32) ConfigOption
WithMaxReadRelationshipsLimit returns an option that can set MaxReadRelationshipsLimit on a Config
func WithMaxRelationshipContextSize ¶ added in v1.22.0
func WithMaxRelationshipContextSize(maxRelationshipContextSize int) ConfigOption
WithMaxRelationshipContextSize returns an option that can set MaxRelationshipContextSize on a Config
func WithMaximumPreconditionCount ¶ added in v1.12.0
func WithMaximumPreconditionCount(maximumPreconditionCount uint16) ConfigOption
WithMaximumPreconditionCount returns an option that can set MaximumPreconditionCount on a Config
func WithMaximumUpdatesPerWrite ¶ added in v1.12.0
func WithMaximumUpdatesPerWrite(maximumUpdatesPerWrite uint16) ConfigOption
WithMaximumUpdatesPerWrite returns an option that can set MaximumUpdatesPerWrite on a Config
func WithMetricsAPI ¶
func WithMetricsAPI(metricsAPI util.HTTPServerConfig) ConfigOption
WithMetricsAPI returns an option that can set MetricsAPI on a Config
func WithNamespaceCacheConfig ¶
func WithNamespaceCacheConfig(namespaceCacheConfig CacheConfig) ConfigOption
WithNamespaceCacheConfig returns an option that can set NamespaceCacheConfig on a Config
func WithPresharedSecureKey ¶ added in v1.22.0
func WithPresharedSecureKey(presharedSecureKey string) ConfigOption
WithPresharedSecureKey returns an option that can append PresharedSecureKeys to Config.PresharedSecureKey
func WithSchemaPrefixesRequired ¶
func WithSchemaPrefixesRequired(schemaPrefixesRequired bool) ConfigOption
WithSchemaPrefixesRequired returns an option that can set SchemaPrefixesRequired on a Config
func WithSchemaWatchHeartbeat ¶ added in v1.29.0
func WithSchemaWatchHeartbeat(schemaWatchHeartbeat time.Duration) ConfigOption
WithSchemaWatchHeartbeat returns an option that can set SchemaWatchHeartbeat on a Config
func WithShutdownGracePeriod ¶
func WithShutdownGracePeriod(shutdownGracePeriod time.Duration) ConfigOption
WithShutdownGracePeriod returns an option that can set ShutdownGracePeriod on a Config
func WithSilentlyDisableTelemetry ¶ added in v1.7.0
func WithSilentlyDisableTelemetry(silentlyDisableTelemetry bool) ConfigOption
WithSilentlyDisableTelemetry returns an option that can set SilentlyDisableTelemetry on a Config
func WithStreamingAPITimeout ¶ added in v1.21.0
func WithStreamingAPITimeout(streamingAPITimeout time.Duration) ConfigOption
WithStreamingAPITimeout returns an option that can set StreamingAPITimeout on a Config
func WithStreamingMiddlewareModification ¶ added in v1.22.2
func WithStreamingMiddlewareModification(streamingMiddlewareModification MiddlewareModification[grpc.StreamServerInterceptor]) ConfigOption
WithStreamingMiddlewareModification returns an option that can append StreamingMiddlewareModifications to Config.StreamingMiddlewareModification
func WithTelemetryCAOverridePath ¶ added in v1.7.0
func WithTelemetryCAOverridePath(telemetryCAOverridePath string) ConfigOption
WithTelemetryCAOverridePath returns an option that can set TelemetryCAOverridePath on a Config
func WithTelemetryEndpoint ¶ added in v1.7.0
func WithTelemetryEndpoint(telemetryEndpoint string) ConfigOption
WithTelemetryEndpoint returns an option that can set TelemetryEndpoint on a Config
func WithTelemetryInterval ¶ added in v1.7.0
func WithTelemetryInterval(telemetryInterval time.Duration) ConfigOption
WithTelemetryInterval returns an option that can set TelemetryInterval on a Config
func WithUnaryMiddlewareModification ¶ added in v1.22.2
func WithUnaryMiddlewareModification(unaryMiddlewareModification MiddlewareModification[grpc.UnaryServerInterceptor]) ConfigOption
WithUnaryMiddlewareModification returns an option that can append UnaryMiddlewareModifications to Config.UnaryMiddlewareModification
func WithV1SchemaAdditiveOnly ¶ added in v1.15.0
func WithV1SchemaAdditiveOnly(v1SchemaAdditiveOnly bool) ConfigOption
WithV1SchemaAdditiveOnly returns an option that can set V1SchemaAdditiveOnly on a Config
func WithWatchHeartbeat ¶ added in v1.29.0
func WithWatchHeartbeat(watchHeartbeat time.Duration) ConfigOption
WithWatchHeartbeat returns an option that can set WatchHeartbeat on a Config
type Middleware ¶ added in v1.35.2
type Middleware interface { UnaryServerInterceptor() grpc.UnaryServerInterceptor StreamServerInterceptor() grpc.StreamServerInterceptor }
type MiddlewareChain ¶ added in v1.16.0
type MiddlewareChain[T middlewareTypes] struct {
// contains filtered or unexported fields
}
MiddlewareChain describes an ordered sequence of middlewares that can be modified with one or more MiddlewareModification. This struct is used to facilitate the creation and modification of gRPC middleware chains
func DefaultStreamingMiddleware ¶ added in v1.22.2
func DefaultStreamingMiddleware(opts MiddlewareOption) (*MiddlewareChain[grpc.StreamServerInterceptor], error)
DefaultStreamingMiddleware generates the default middleware chain used for the public SpiceDB Streaming gRPC methods
func DefaultUnaryMiddleware ¶ added in v1.22.2
func DefaultUnaryMiddleware(opts MiddlewareOption) (*MiddlewareChain[grpc.UnaryServerInterceptor], error)
DefaultUnaryMiddleware generates the default middleware chain used for the public SpiceDB Unary gRPC methods
func NewMiddlewareChain ¶ added in v1.16.0
func NewMiddlewareChain[T middlewareTypes](mw ...ReferenceableMiddleware[T]) (MiddlewareChain[T], error)
NewMiddlewareChain creates a new middleware chain given zero or more named middlewares. An error will be returned in case validation of the NamedMiddlewares fail.
func (*MiddlewareChain[T]) Names ¶ added in v1.16.0
func (mc *MiddlewareChain[T]) Names() *mapz.Set[string]
Names returns the names of the middlewares in a chain
func (*MiddlewareChain[T]) ToGRPCInterceptors ¶ added in v1.16.0
func (mc *MiddlewareChain[T]) ToGRPCInterceptors() []T
ToGRPCInterceptors generates slices of gRPC interceptors ready to be installed in a server
type MiddlewareModification ¶ added in v1.16.0
type MiddlewareModification[T middlewareTypes] struct { // DependencyMiddlewareName is used to define with respect to which middleware an operation is performed. // Dependency is not required for ReplaceAll operation DependencyMiddlewareName string // Operation describes the type of operation to be performed Operation MiddlewareOperation // Middlewares are the named middlewares that will be part of this modification Middlewares []ReferenceableMiddleware[T] }
MiddlewareModification describes an operation to modify a MiddlewareChain
type MiddlewareOperation ¶ added in v1.16.0
type MiddlewareOperation int
MiddlewareOperation describes the type of operation that will be performed in a MiddlewareModification
const ( // OperationPrepend adds the middlewares right before the referenced dependency OperationPrepend MiddlewareOperation = iota // OperationReplace substitutes the referenced dependency with the middlewares of a modification. // If replaced with an empty modification, this acts like a deletion OperationReplace // OperationAppend adds the middlewares right after the referenced dependency OperationAppend // OperationReplaceAllUnsafe replaces all middlewares in a chain with those in the modification // this operation is only meant to be used in tests. OperationReplaceAllUnsafe )
type MiddlewareOption ¶ added in v1.27.0
type MiddlewareOption struct { Logger zerolog.Logger `debugmap:"hidden"` AuthFunc grpcauth.AuthFunc `debugmap:"hidden"` EnableVersionResponse bool `debugmap:"visible"` DispatcherForMiddleware dispatch.Dispatcher `debugmap:"hidden"` EnableRequestLog bool `debugmap:"visible"` EnableResponseLog bool `debugmap:"visible"` DisableGRPCHistogram bool `debugmap:"visible"` // contains filtered or unexported fields }
func MiddlewareOptionWithOptions ¶ added in v1.35.2
func MiddlewareOptionWithOptions(m *MiddlewareOption, opts ...MiddlewareOptionOption) *MiddlewareOption
MiddlewareOptionWithOptions configures an existing MiddlewareOption with the passed in options set
func NewMiddlewareOptionWithOptions ¶ added in v1.35.2
func NewMiddlewareOptionWithOptions(opts ...MiddlewareOptionOption) *MiddlewareOption
NewMiddlewareOptionWithOptions creates a new MiddlewareOption with the passed in options set
func NewMiddlewareOptionWithOptionsAndDefaults ¶ added in v1.35.2
func NewMiddlewareOptionWithOptionsAndDefaults(opts ...MiddlewareOptionOption) *MiddlewareOption
NewMiddlewareOptionWithOptionsAndDefaults creates a new MiddlewareOption with the passed in options set starting from the defaults
func (MiddlewareOption) DebugMap ¶ added in v1.35.2
func (m MiddlewareOption) DebugMap() map[string]any
DebugMap returns a map form of MiddlewareOption for debugging
func (*MiddlewareOption) ToOption ¶ added in v1.35.2
func (m *MiddlewareOption) ToOption() MiddlewareOptionOption
ToOption returns a new MiddlewareOptionOption that sets the values from the passed in MiddlewareOption
func (MiddlewareOption) WithDatastore ¶ added in v1.35.2
func (m MiddlewareOption) WithDatastore(ds datastore.Datastore) MiddlewareOption
func (MiddlewareOption) WithDatastoreMiddleware ¶ added in v1.35.2
func (m MiddlewareOption) WithDatastoreMiddleware(middleware Middleware) MiddlewareOption
func (*MiddlewareOption) WithOptions ¶ added in v1.35.2
func (m *MiddlewareOption) WithOptions(opts ...MiddlewareOptionOption) *MiddlewareOption
WithOptions configures the receiver MiddlewareOption with the passed in options set
type MiddlewareOptionOption ¶ added in v1.35.2
type MiddlewareOptionOption func(m *MiddlewareOption)
func WithAuthFunc ¶ added in v1.35.2
func WithAuthFunc(authFunc auth.AuthFunc) MiddlewareOptionOption
WithAuthFunc returns an option that can set AuthFunc on a MiddlewareOption
func WithDisableGRPCHistogram ¶ added in v1.35.2
func WithDisableGRPCHistogram(disableGRPCHistogram bool) MiddlewareOptionOption
WithDisableGRPCHistogram returns an option that can set DisableGRPCHistogram on a MiddlewareOption
func WithDispatcherForMiddleware ¶ added in v1.35.2
func WithDispatcherForMiddleware(dispatcherForMiddleware dispatch.Dispatcher) MiddlewareOptionOption
WithDispatcherForMiddleware returns an option that can set DispatcherForMiddleware on a MiddlewareOption
func WithEnableRequestLog ¶ added in v1.35.2
func WithEnableRequestLog(enableRequestLog bool) MiddlewareOptionOption
WithEnableRequestLog returns an option that can set EnableRequestLog on a MiddlewareOption
func WithEnableResponseLog ¶ added in v1.35.2
func WithEnableResponseLog(enableResponseLog bool) MiddlewareOptionOption
WithEnableResponseLog returns an option that can set EnableResponseLog on a MiddlewareOption
func WithEnableVersionResponse ¶ added in v1.35.2
func WithEnableVersionResponse(enableVersionResponse bool) MiddlewareOptionOption
WithEnableVersionResponse returns an option that can set EnableVersionResponse on a MiddlewareOption
func WithLogger ¶ added in v1.35.2
func WithLogger(logger zerolog.Logger) MiddlewareOptionOption
WithLogger returns an option that can set Logger on a MiddlewareOption
type ReferenceableMiddleware ¶ added in v1.16.0
ReferenceableMiddleware represents a middleware in a MiddlewareChain. Middlewares can be referenced by name in MiddlewareModification, for example "append after middleware abc". Internal middlewares can also be referenced for operations like append or prepend, but cannot be referenced for replace operations. Middlewares must always be named.
type RunnableServer ¶
type RunnableServer interface { Run(ctx context.Context) error GRPCDialContext(ctx context.Context, opts ...grpc.DialOption) (*grpc.ClientConn, error) DispatchNetDialContext(ctx context.Context, s string) (net.Conn, error) }
RunnableServer is a spicedb service set ready to run
type StreamOrderEnforcerBuilder ¶ added in v1.22.2
type StreamOrderEnforcerBuilder struct {
// contains filtered or unexported fields
}
func NewStreamMiddleware ¶ added in v1.22.2
func NewStreamMiddleware() *StreamOrderEnforcerBuilder
func (*StreamOrderEnforcerBuilder) Done ¶ added in v1.22.2
func (soeb *StreamOrderEnforcerBuilder) Done() ReferenceableMiddleware[grpc.StreamServerInterceptor]
func (*StreamOrderEnforcerBuilder) EnsureInterceptorAlreadyExecuted ¶ added in v1.22.2
func (soeb *StreamOrderEnforcerBuilder) EnsureInterceptorAlreadyExecuted(name string) *StreamOrderEnforcerBuilder
func (*StreamOrderEnforcerBuilder) EnsureInterceptorNotExecuted ¶ added in v1.22.2
func (soeb *StreamOrderEnforcerBuilder) EnsureInterceptorNotExecuted(name string) *StreamOrderEnforcerBuilder
func (*StreamOrderEnforcerBuilder) EnsureWrapperAlreadyExecuted ¶ added in v1.22.2
func (soeb *StreamOrderEnforcerBuilder) EnsureWrapperAlreadyExecuted(name string) *StreamOrderEnforcerBuilder
func (*StreamOrderEnforcerBuilder) EnsureWrapperNotExecuted ¶ added in v1.22.2
func (soeb *StreamOrderEnforcerBuilder) EnsureWrapperNotExecuted(name string) *StreamOrderEnforcerBuilder
func (*StreamOrderEnforcerBuilder) WithInterceptor ¶ added in v1.22.2
func (soeb *StreamOrderEnforcerBuilder) WithInterceptor(interceptor grpc.StreamServerInterceptor) *StreamOrderEnforcerBuilder
func (*StreamOrderEnforcerBuilder) WithInternal ¶ added in v1.22.2
func (soeb *StreamOrderEnforcerBuilder) WithInternal(internal bool) *StreamOrderEnforcerBuilder
func (*StreamOrderEnforcerBuilder) WithName ¶ added in v1.22.2
func (soeb *StreamOrderEnforcerBuilder) WithName(name string) *StreamOrderEnforcerBuilder
type UnaryOrderEnforcerBuilder ¶ added in v1.22.2
type UnaryOrderEnforcerBuilder struct {
// contains filtered or unexported fields
}
func NewUnaryMiddleware ¶ added in v1.22.2
func NewUnaryMiddleware() *UnaryOrderEnforcerBuilder
func (*UnaryOrderEnforcerBuilder) Done ¶ added in v1.22.2
func (soeb *UnaryOrderEnforcerBuilder) Done() ReferenceableMiddleware[grpc.UnaryServerInterceptor]
func (*UnaryOrderEnforcerBuilder) EnsureAlreadyExecuted ¶ added in v1.22.2
func (soeb *UnaryOrderEnforcerBuilder) EnsureAlreadyExecuted(name string) *UnaryOrderEnforcerBuilder
func (*UnaryOrderEnforcerBuilder) EnsureNotExecuted ¶ added in v1.22.2
func (soeb *UnaryOrderEnforcerBuilder) EnsureNotExecuted(name string) *UnaryOrderEnforcerBuilder
func (*UnaryOrderEnforcerBuilder) WithInterceptor ¶ added in v1.22.2
func (soeb *UnaryOrderEnforcerBuilder) WithInterceptor(interceptor grpc.UnaryServerInterceptor) *UnaryOrderEnforcerBuilder
func (*UnaryOrderEnforcerBuilder) WithInternal ¶ added in v1.22.2
func (soeb *UnaryOrderEnforcerBuilder) WithInternal(internal bool) *UnaryOrderEnforcerBuilder
func (*UnaryOrderEnforcerBuilder) WithName ¶ added in v1.22.2
func (soeb *UnaryOrderEnforcerBuilder) WithName(name string) *UnaryOrderEnforcerBuilder