Documentation ¶
Index ¶
- type TaskCfgCache
- func (_m *TaskCfgCache) Cleanup(ctx context.Context, period time.Duration) error
- func (_m *TaskCfgCache) Close() error
- func (_m *TaskCfgCache) Get(_a0 context.Context, _a1 types.RepoState) (*specs.TasksCfg, error, error)
- func (_m *TaskCfgCache) Set(ctx context.Context, rs types.RepoState, cfg *specs.TasksCfg, storedErr error) error
- func (_m *TaskCfgCache) SetIfUnset(ctx context.Context, rs types.RepoState, ...) (*task_cfg_cache.CachedValue, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TaskCfgCache ¶
TaskCfgCache is an autogenerated mock type for the TaskCfgCache type
func FixedTasksCfg ¶
func FixedTasksCfg(cfg *specs.TasksCfg) *TaskCfgCache
FixedTasksCfg returns a TaskCfgCache which always produces the given TasksCfg instance.
func NewTaskCfgCache ¶
func NewTaskCfgCache(t interface { mock.TestingT Cleanup(func()) }) *TaskCfgCache
NewTaskCfgCache creates a new instance of TaskCfgCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func TasksAlwaysDefined ¶
func TasksAlwaysDefined(taskNames ...string) *TaskCfgCache
TasksAlwaysDefined returns a TaskCfgCache which always produces a TasksCfg with the given tasks defined. It does not provide details for the tasks.
func (*TaskCfgCache) Close ¶
func (_m *TaskCfgCache) Close() error
Close provides a mock function with given fields:
func (*TaskCfgCache) Get ¶
func (_m *TaskCfgCache) Get(_a0 context.Context, _a1 types.RepoState) (*specs.TasksCfg, error, error)
Get provides a mock function with given fields: _a0, _a1
func (*TaskCfgCache) Set ¶
func (_m *TaskCfgCache) Set(ctx context.Context, rs types.RepoState, cfg *specs.TasksCfg, storedErr error) error
Set provides a mock function with given fields: ctx, rs, cfg, storedErr
func (*TaskCfgCache) SetIfUnset ¶
func (_m *TaskCfgCache) SetIfUnset(ctx context.Context, rs types.RepoState, fn func(context.Context) (*task_cfg_cache.CachedValue, error)) (*task_cfg_cache.CachedValue, error)
SetIfUnset provides a mock function with given fields: ctx, rs, fn