types

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 3 Imported by: 169

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSyncID added in v0.3.58

func GetSyncID(ctx context.Context) string

GetSyncID retrieves the sync ID from the context, returning empty string if not found.

func SetSyncIDInContext added in v0.3.58

func SetSyncIDInContext(ctx context.Context, syncID string) context.Context

Types

type ClientWrapper

type ClientWrapper interface {
	C(ctx context.Context) (ConnectorClient, error)
	Run(ctx context.Context, cfg *connectorwrapperV1.ServerConfig) error
	Close() error
}

ClientWrapper is an interface that returns a connector client.

type SessionCache added in v0.3.58

type SessionCache interface {
	Get(ctx context.Context, key string, opt ...SessionCacheOption) ([]byte, bool, error)
	GetMany(ctx context.Context, keys []string, opt ...SessionCacheOption) (map[string][]byte, error)
	Set(ctx context.Context, key string, value []byte, opt ...SessionCacheOption) error
	SetMany(ctx context.Context, values map[string][]byte, opt ...SessionCacheOption) error
	Delete(ctx context.Context, key string, opt ...SessionCacheOption) error
	Clear(ctx context.Context, opt ...SessionCacheOption) error
	GetAll(ctx context.Context, opt ...SessionCacheOption) (map[string][]byte, error)
	Close(ctx context.Context) error
}

SessionCache is an interface for caching session data.

type SessionCacheBag added in v0.3.58

type SessionCacheBag struct {
	SyncID string
	Prefix string
}

SessionCacheBag holds the configuration for session cache operations.

type SessionCacheConstructor added in v0.3.58

type SessionCacheConstructor func(ctx context.Context, opt ...SessionCacheConstructorOption) (SessionCache, error)

SessionCacheConstructor is a function that creates a SessionCache instance.

type SessionCacheConstructorOption added in v0.3.58

type SessionCacheConstructorOption func(ctx context.Context) (context.Context, error)

SessionCacheConstructorOption is a function that modifies the context for session cache construction.

type SessionCacheKey added in v0.3.58

type SessionCacheKey struct{}

SessionCacheKey is the context key for storing the session cache instance.

type SessionCacheOption added in v0.3.58

type SessionCacheOption func(ctx context.Context, bag *SessionCacheBag) error

SessionCacheOption is a function that modifies a SessionCacheBag.

func WithSyncID added in v0.3.58

func WithSyncID(syncID string) SessionCacheOption

WithSyncID returns a SessionCacheOption that sets the sync ID for the operation.

type SyncIDKey added in v0.3.58

type SyncIDKey struct{}

SyncIDKey is the context key for storing the current sync ID.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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