Documentation
¶
Index ¶
- func GetEngine(ctx context.Context, config types.Config, nodename, endpoint string) (engine.API, error)
- func GetEngineFromCache(_ context.Context, endpoint string) engine.API
- func InitEngineCache(ctx context.Context, config types.Config, stor store.Store)
- func RemoveEngineFromCache(ctx context.Context, endpoint string)
- type EngineCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEngine ¶
func GetEngine(ctx context.Context, config types.Config, nodename, endpoint string) (engine.API, error)
GetEngine returns the cached engine for an endpoint, building one if absent.
func GetEngineFromCache ¶
GetEngineFromCache returns the cached engine for an endpoint, or nil.
func InitEngineCache ¶
InitEngineCache builds the global engine cache and starts its checkers.
func RemoveEngineFromCache ¶
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)
Click to show internal directories.
Click to hide internal directories.