factory

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEngine

func GetEngine(ctx context.Context, config types.Config, nodename, endpoint string) (client engine.API, err error)

GetEngine returns the cached engine for an endpoint, building one if absent.

func GetEngineFromCache

func GetEngineFromCache(_ context.Context, endpoint string) engine.API

GetEngineFromCache returns the cached engine for an endpoint, or nil.

func InitEngineCache

func InitEngineCache(ctx context.Context, config types.Config, stor store.Store)

InitEngineCache builds the global engine cache and starts its checkers.

func RemoveEngineFromCache

func RemoveEngineFromCache(ctx context.Context, endpoint string)

RemoveEngineFromCache drops the cached engine for an endpoint.

Types

type EngineCache

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

EngineCache holds one engine client per node endpoint and keeps it alive.

func NewEngineCache

func NewEngineCache(config types.Config, stor store.Store) *EngineCache

NewEngineCache builds an empty engine cache.

func (*EngineCache) Delete

func (e *EngineCache) Delete(key string)

func (*EngineCache) Get

func (e *EngineCache) Get(key string) engine.API

func (*EngineCache) Set

func (e *EngineCache) Set(key string, client engine.API)

Jump to

Keyboard shortcuts

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