Versions in this module Expand all Collapse all v1 v1.1.0 Jan 30, 2024 Changes in this version + type Collection struct + func NewCollection() *Collection + func (tc *Collection) Get(ctx context.Context, hash string) (template *Template, found bool) + func (tc *Collection) Pop(ctx context.Context, hash string) (template *Template, found bool) + func (tc *Collection) Push(ctx context.Context, hash string, config TemplateConfig) (added bool, unlock Unlock) + func (tc *Collection) RemoveAll(ctx context.Context) + func (tc *Collection) RemoveUnsafe(_ context.Context, hash string) + type LockedTemplate struct + func (l *LockedTemplate) Unlock() + func (l LockedTemplate) SetState(_ context.Context, newState TemplateState) + type Template struct + func NewTemplate(hash string, config TemplateConfig) *Template + func (t *Template) GetConfig(_ context.Context) TemplateConfig + func (t *Template) GetState(_ context.Context) TemplateState + func (t *Template) GetStateWithLock(_ context.Context) (TemplateState, LockedTemplate) + func (t *Template) SetState(ctx context.Context, newState TemplateState) + func (t *Template) WaitUntilFinalized(ctx context.Context, timeout time.Duration) (exitState TemplateState) + type TemplateConfig struct + func (c TemplateConfig) Equals(other TemplateConfig) bool + type TemplateState int32 + const TemplateStateDiscarded + const TemplateStateFinalized + const TemplateStateInit + type Unlock func()