inmemory

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package inmemory provides an in-memory implementation of the RegistryService interface

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeCursor added in v0.3.8

func EncodeCursor(index int) string

EncodeCursor encodes an index position to a base64-encoded cursor string. This can be used by callers to generate cursors for pagination. For example, after fetching a page of N items starting at index X, the next cursor would be EncodeCursor(X + N).

func New

func New(
	ctx context.Context,
	registryProvider service.RegistryDataProvider,
	opts ...Option,
) (service.RegistryService, error)

New creates a new registry regSvc with the given providers and options. registryProvider is required for registry data access. deploymentProvider can be nil if deployed servers functionality is not needed.

Types

type Option

type Option func(*regSvc)

Option is a functional option for configuring the regSvc

func WithCacheDuration

func WithCacheDuration(duration time.Duration) Option

WithCacheDuration sets a custom cache duration for registry data

func WithConfig added in v0.3.8

func WithConfig(cfg *config.Config) Option

WithConfig sets the config for registry validation

Jump to

Keyboard shortcuts

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