manager

package
v1.0.0-beta.222 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	CacheReloadInterval time.Duration
	CacheReloadTimeout  time.Duration
	CachePrefillCount   int
	CacheSize           int
	Ent                 *db.Client
	Logger              *slog.Logger
	PaginationSize      int
}

Config is the configuration for the subject manager

type Manager

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

Manager is a subject manager

func NewManager

func NewManager(config *Config) (*Manager, error)

NewManager creates a new subject manager

func (*Manager) Ensure

func (m *Manager) Ensure(ctx context.Context, params ...*SubjectRef) error

Ensure creates subjects when they do not exist in the cache

func (*Manager) EventBatchedIngestHandlerFactory

func (m *Manager) EventBatchedIngestHandlerFactory() cqrs.GroupEventHandler

EventBatchedIngestHandlerFactory returns a handler for batched ingest events The handler ensures that the subjects in the ingested events exist in the database. This handler is used in the watermill event router.

type SubjectRef

type SubjectRef struct {
	Namespace string
	Key       string
}

SubjectRef references a subject

Jump to

Keyboard shortcuts

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